Skip to content

Commit

Permalink
fix: Proper release workflow (#727)
Browse files Browse the repository at this point in the history
* refactor(release): improve release workflow
  • Loading branch information
ds-pweick authored and ds-jhartmann committed Jul 12, 2024
1 parent 7d9f9c5 commit 3681a82
Show file tree
Hide file tree
Showing 10 changed files with 323 additions and 304 deletions.
12 changes: 11 additions & 1 deletion .github/workflows/helm-chart-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Release Helm Charts

on:
workflow_dispatch: # Trigger manually
workflow_call:
inputs:
ref-to-check-out:
description: 'Ref of branch/tag from which to execute workflow'
required: true
type: string
push:
branches:
- main
Expand All @@ -21,6 +27,8 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: 'true'
ref: ${{ inputs.ref-to-check-out || github.ref }}

- name: Get helm charts latest tag version
id: step1
Expand All @@ -36,7 +44,7 @@ jobs:
echo "Exported $chartVersion helm charts version"
release:
needs: "get-helm-charts-versions-irs"
needs: [get-helm-charts-versions-irs]
if: needs.get-helm-charts-versions-irs.outputs.latest_version != needs.get-helm-charts-versions-irs.outputs.current_version
# depending on default permission settings for your org (contents being read-only or read-write for workloads), you will have to add permissions
# see: https://docs.github.com/en/actions/security-guides/automatic-token-authentication#modifying-the-permissions-for-the-github_token
Expand All @@ -48,6 +56,8 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: 'true'
ref: ${{ inputs.ref-to-check-out || github.ref }}

- name: Configure Git
run: |
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/irs-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ name: IRS build

on:
workflow_dispatch: # Trigger manually
workflow_call:
inputs:
ref-to-check-out:
description: 'Ref of branch/tag from which to execute workflow'
required: true
type: string

pull_request:
paths-ignore:
- '**/*.md'
Expand All @@ -26,6 +33,9 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-tags: 'true'
ref: ${{ inputs.ref-to-check-out || github.ref }}

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down Expand Up @@ -66,7 +76,9 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of sonar analysis
fetch-depth: 0
fetch-tags: 'true'
ref: ${{ inputs.ref-to-check-out || github.ref }}

- name: Set up JDK 17
uses: actions/setup-java@v4
Expand Down Expand Up @@ -108,6 +120,9 @@ jobs:
image-tag: ${{ steps.version.outputs.image_tag }}
steps:
- uses: actions/checkout@v4
with:
fetch-tags: 'true'
ref: ${{ inputs.ref-to-check-out || github.ref }}

# Needed to create multi-platform image
- name: Set up Docker Buildx
Expand Down Expand Up @@ -168,3 +183,5 @@ jobs:
needs:
- build_images
uses: ./.github/workflows/trivy-docker-hub-scan.yml
with:
ref-to-check-out: ${{ inputs.ref-to-check-out || github.ref }}
50 changes: 0 additions & 50 deletions .github/workflows/publish-swagger-hub.yml

This file was deleted.

Loading

0 comments on commit 3681a82

Please sign in to comment.