Skip to content

Commit

Permalink
fix(release): release workflow executes subsequent workflows correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-pweick committed Jul 3, 2024
1 parent 663adfe commit 1d498d4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 18 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/helm-chart-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ jobs:
with:
fetch-depth: 0
fetch-tags: 'true'

- run: git checkout ${{ needs.determine-ref.outputs.ref }}
ref: ${{ needs.determine-ref.outputs.ref }}

- name: Get helm charts latest tag version
id: step1
Expand Down Expand Up @@ -79,8 +78,7 @@ jobs:
with:
fetch-depth: 0
fetch-tags: 'true'

- run: git checkout ${{ needs.determine-ref.outputs.ref }}
ref: ${{ needs.determine-ref.outputs.ref }}

- name: Configure Git
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/irs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-tags: 'true'

- run: git checkout ${{ needs.determine-ref.outputs.ref }}
ref: ${{ needs.determine-ref.outputs.ref }}

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down Expand Up @@ -100,8 +99,7 @@ jobs:
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of sonar analysis
fetch-tags: 'true'

- run: git checkout ${{ needs.determine-ref.outputs.ref }}
ref: ${{ needs.determine-ref.outputs.ref }}

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down Expand Up @@ -146,8 +144,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-tags: 'true'

- run: git checkout ${{ needs.determine-ref.outputs.ref }}
ref: ${{ needs.determine-ref.outputs.ref }}

- name: Build image to make sure Dockerfile is valid
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ jobs:
uses: ./.github/workflows/helm-chart-release.yaml
with:
checkout-tag: true
ref-to-checkout: '${{ inputs.irs-version }}'
ref-to-checkout: 'refs/tags/${{ inputs.irs-version }}'

build-irs:
name: "Build IRS"
Expand All @@ -226,7 +226,7 @@ jobs:
secrets: inherit
with:
checkout-tag: true
ref-to-checkout: '${{ inputs.irs-version }}'
ref-to-checkout: 'refs/tags/${{ inputs.irs-version }}'

trivy-image-scan:
name: "Scan image in local registry with Trivy"
Expand All @@ -236,7 +236,7 @@ jobs:
secrets: inherit
with:
checkout-tag: true
ref-to-checkout: '${{ inputs.irs-version }}'
ref-to-checkout: 'refs/tags/${{ inputs.irs-version }}'

validate-openapi-definition:
needs:
Expand All @@ -246,4 +246,4 @@ jobs:
secrets: inherit
with:
checkout-tag: true
ref-to-checkout: '${{ inputs.irs-version }}'
ref-to-checkout: 'refs/tags/${{ inputs.irs-version }}'
3 changes: 1 addition & 2 deletions .github/workflows/swagger-editor-validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-tags: 'true'

- run: git checkout ${{ needs.determine-ref.outputs.ref }}
ref: ${{ needs.determine-ref.outputs.ref }}

- name: Validate OpenAPI definition
uses: char0n/swagger-editor-validate@v1
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/trivy-image-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-tags: 'true'

- run: git checkout ${{ needs.determine-ref.outputs.ref }}
ref: ${{ needs.determine-ref.outputs.ref }}

- name: Build image
uses: docker/build-push-action@v6
Expand Down

0 comments on commit 1d498d4

Please sign in to comment.