From 23a155b678ddfceb4f04e280aad516ad34b95cbe Mon Sep 17 00:00:00 2001 From: Mike Pond <32133001+P0NDER0SA@users.noreply.github.com> Date: Thu, 9 Jan 2025 08:59:02 -0500 Subject: [PATCH] Updating Docker Image Tags for Helm Release Process (#2034) * adding image update workflow * attempting to see if this works * changing order * more updates * push * updating to use secret for manifests * trying different token * moving around * updating * adding dummy file * trying a new approach * new approach * update name * adding back * fixing formatting * removing ref * adding back workflow dispatch * updating name * getting itv to show up * still broken? * trhying this more like the other one * trying a different key * trying this again * adding base checkout * trying to remove rthis * one last stab at this * removing pasth * trying this thing * breakthrough! * fixing path * adjusting branch protection * attempting to add the permission * trying the other way * trying it exasctly like the other one * outputting the file to see if it does the update properly * updating var * updating sha * fixing sha * fixing sha * fixing sha * fixing sha * updating repo * adjusting repo * adjusting branch protection * trying a different way * renaming file * udpating sha * formatting * formatting * TRYINg veriable * fixing docker tag * fixing gtrigger * push * finally fixing docker tag * final adjustments * updating to be able to run manually * fixing component * removing the var for component --- .../call-manifests-update-docker-tag.yaml | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/call-manifests-update-docker-tag.yaml diff --git a/.github/workflows/call-manifests-update-docker-tag.yaml b/.github/workflows/call-manifests-update-docker-tag.yaml new file mode 100644 index 000000000..2fead6674 --- /dev/null +++ b/.github/workflows/call-manifests-update-docker-tag.yaml @@ -0,0 +1,30 @@ +name: Call Manifests Update Docker Tag + +on: + workflow_dispatch: + push: + branches: + - main + +jobs: + update-docker-tag-in-manifests: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Set Docker Tag + run: echo "DOCKER_TAG=${GITHUB_SHA::7}" >> $GITHUB_ENV + env: + GITHUB_SHA: ${{ github.sha }} + + - name: Trigger repository_dispatch + run: | + curl -L \ + -X POST \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer ${{ secrets.MANIFESTS_WORKFLOW_TOKEN }}" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + https://api.github.com/repos/cds-snc/notification-manifests/dispatches \ + -d '{"event_type":"update-docker-image","client_payload":{"component":"ADMIN","docker_tag":"${{ env.DOCKER_TAG }}"}}'