From 70136f2415f0326cb8293aa553b224999d08612d Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Thu, 13 Mar 2025 15:19:58 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(action)=20fix=20notify-argocd=20wo?= =?UTF-8?q?rkflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The notify-argocd workflow was not working correctly. The html_url sent to argocd was not the good one anymore. --- .github/workflows/docker-hub.yml | 9 ++++----- CHANGELOG.md | 1 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 7dca9637..935742d1 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -125,8 +125,7 @@ jobs: - build-and-push-frontend - build-and-push-backend runs-on: ubuntu-latest - if: | - github.event_name != 'pull_request' + if: github.event_name != 'pull_request' steps: - name: Checkout repository @@ -134,6 +133,6 @@ jobs: - name: Call argocd github webhook run: | - data='{"ref": "'$GITHUB_REF'","repository": {"html_url":"'$GITHUB_SERVER_URL'/'$GITHUB_REPOSITORY'"}}' - sig=$(echo -n ${data} | openssl dgst -sha1 -hmac ''${{ secrets.ARGOCD_PREPROD_WEBHOOK_SECRET}}'' | awk '{print "X-Hub-Signature: sha1="$2}') - curl -X POST -H 'X-GitHub-Event:push' -H "Content-Type: application/json" -H "${sig}" --data "${data}" ${{ vars.ARGOCD_PREPROD_WEBHOOK_URL }} + data='{"ref": "'$GITHUB_REF'","repository": {"html_url":"'$GITHUB_SERVER_URL'/${{ secrets.DEPLOYMENT_REPO_URL }}"}}' + sig=$(echo -n ${data} | openssl dgst -sha1 -hmac "${{ secrets.ARGOCD_PREPROD_WEBHOOK_SECRET }}" | awk '{print "X-Hub-Signature: sha1="$2}') + curl -X POST -H 'X-GitHub-Event:push' -H "Content-Type: application/json" -H "${sig}" --data "${data}" ${{ vars.ARGOCD_PREPROD_WEBHOOK_URL }} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d9c5567..3024cc9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,7 @@ and this project adheres to - 🔒️(back) restrict access to favorite_list endpoint #690 - 🐛(backend) refactor to fix filtering on children and descendants views #695 +- 🐛(action) fix notify-argocd workflow #713 ## [2.4.0] - 2025-03-06