🐛(ci) fix argocd webhook to auto deploy on staging

Changing the deployment repository broke the automatic deployment of the
main branch. This commit fixes it.
This commit is contained in:
Jacques ROUSSEL
2025-01-20 14:51:51 +01:00
committed by Marie
parent 870ef424f5
commit 9de20a496e

View File

@@ -186,6 +186,6 @@ jobs:
-
name: Call argocd github webhook
run: |
data='{"ref": "'$GITHUB_REF'","repository": {"html_url":"'$GITHUB_SERVER_URL'/'$GITHUB_REPOSITORY'"}}'
data='{"ref": "'$GITHUB_REF'","repository": {"html_url":"'$GITHUB_SERVER_URL'/numerique-gouv/lasuite-deploiement"}}'
sig=$(echo -n ${data} | openssl dgst -sha1 -hmac ''${ARGOCD_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}" $ARGOCD_WEBHOOK_URL