From ccca2b94726dc4f902a005256fcfd194d12830cb Mon Sep 17 00:00:00 2001 From: Jacques ROUSSEL Date: Fri, 21 Feb 2025 11:06:59 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7(ci)=20fix=20argocd=20notification?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Argocd deployment use numerique-gouv/lasuite-deploiement as source so the webhook need to tell argocd to refresh apps that use this repos --- .github/workflows/docker-hub.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-hub.yml b/.github/workflows/docker-hub.yml index 59f39b61..2a53af19 100644 --- a/.github/workflows/docker-hub.yml +++ b/.github/workflows/docker-hub.yml @@ -117,8 +117,7 @@ jobs: - build-and-push-backend - build-and-push-summary runs-on: ubuntu-latest - if: | - github.event_name != 'pull_request' + if: github.event_name != 'pull_request' steps: - name: Checkout repository @@ -126,6 +125,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_WEBHOOK_SECRET }}" | awk '{print "X-Hub-Signature: sha1="$2}') + data='{"ref": "'$GITHUB_REF'","repository": {"html_url":"'$GITHUB_SERVER_URL'/numerique-gouv/lasuite-deploiement"}}' + 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 }}