Skip to content

Commit

Permalink
Change: Move trigger steps into own job
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalholthaus committed Jan 17, 2024
1 parent 575d485 commit ba0b4b1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/helm-container-build-push-3rd-gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,19 @@ jobs:
scout-user: ${{ contains(inputs.scout, 'true') && secrets.DOCKERHUB_USERNAME || '' }}
scout-password: ${{ contains(inputs.scout, 'true') && secrets.DOCKERHUB_TOKEN || '' }}

building-chart:
needs:
- building-container
runs-on: "ubuntu-latest"
steps:
- name: Trigger service helm chart upgrade
if: (inputs.helm-chart) && (startsWith(github.ref, 'refs/tags/v'))
uses: greenbone/actions/trigger-workflow@v3
with:
token: ${{ secrets.GREENBONE_BOT_TOKEN }}
repository: "greenbone/product-helm-chart"
workflow: "service-chart-upgrade.yml"
inputs: '{"chart": "${{ inputs.helm-chart }}", "chart-version": "${{ github.ref_name }}", "container-digest": "${{ steps.build-and-push.outputs.digest }}", "init-container": "${{ inputs.init-container }}", "init-container-digest": "${{ inputs.init-container-digest }}"}'
inputs: '{"chart": "${{ inputs.helm-chart }}", "chart-version": "${{ github.ref_name }}", "container-digest": "${{ needs.building-container.outputs.digest }}", "init-container": "${{ inputs.init-container }}", "init-container-digest": "${{ inputs.init-container-digest }}"}'

- name: Trigger product helm chart upgrade
if: (inputs.helm-chart) && (startsWith(github.ref, 'refs/tags/v'))
Expand All @@ -131,6 +136,7 @@ jobs:
notify:
needs:
- building-container
- building-chart
if: ${{ !cancelled() && startsWith(github.ref, 'refs/tags/v') && startsWith(inputs.notify, 'true') }}
uses: greenbone/workflows/.github/workflows/notify-mattermost-3rd-gen.yml@main
with:
Expand Down

0 comments on commit ba0b4b1

Please sign in to comment.