Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(OpenAPI):[xxx] update OpenAPI spec only on Trace-X release #1107

Merged
merged 9 commits into from
Jun 25, 2024
25 changes: 25 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@ on:
tags:
- '[0-9]+.[0-9]+.[0-9]+'

env:
JAVA_VERSION: 17

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: '${{ env.JAVA_VERSION }}'
distribution: 'temurin'
cache: 'maven'

- name: Calculate Helm release version from CHANGELOG
run: echo HELM_VERSION=$(cat charts/traceability-foss/CHANGELOG.md | sed -n 's/.*\[\([0-9]\+\.[0-9]\+\.[0-9]\+\)\].*/\1/p' | head -n 1) >> $GITHUB_ENV

Expand Down Expand Up @@ -74,6 +83,22 @@ jobs:
Please check whether the Chart was updated correctly and that the CHANGELOG contains the relevant information
for this release. Also, make sure that the values.yaml is correct before merging this PR.

- name: Update OpenAPI spec
run: mvn test -Dsurefire.failIfNoSpecifiedTests=false -Dtest=OpenApiDocumentationIT -Dopenapi-doc.generate=true

- name: Create pull request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: action/update-openapi-spec
title: "chore(OpenAPI): updated OpenAPI spec"
labels: automated
delete-branch: true
body: |
This PR updates the OpenAPI spec. Please check whether the spec was updated correctly. Unfortunately, this
action causes a lot of nonsensical changes which should, however, be clearly recognizable.
You can safely ignore these.

- name: Get previous version
run: echo PREVIOUS_VERSION=$(git tag | grep -E ^[0-9]+\\.[0-9]+\\.[0-9]+ | tail -2 | head -n +1) >> $GITHUB_ENV

Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ _**For better traceability add the corresponding GitHub issue number in each cha
### Changed

- XXX updated JsonSchemaTest now the test pulls the latest version of the json file
- XXX deactivated a test class in tx-backend which behaved undesirably

### Added

Expand Down
Loading
Loading