🔧(ci) fix argocd notification
Argocd deployment use numerique-gouv/lasuite-deploiement as source so the webhook need to tell argocd to refresh apps that use this repos
This commit is contained in:
7
.github/workflows/docker-hub.yml
vendored
7
.github/workflows/docker-hub.yml
vendored
@@ -117,8 +117,7 @@ jobs:
|
|||||||
- build-and-push-backend
|
- build-and-push-backend
|
||||||
- build-and-push-summary
|
- build-and-push-summary
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: |
|
if: github.event_name != 'pull_request'
|
||||||
github.event_name != 'pull_request'
|
|
||||||
steps:
|
steps:
|
||||||
-
|
-
|
||||||
name: Checkout repository
|
name: Checkout repository
|
||||||
@@ -126,6 +125,6 @@ jobs:
|
|||||||
-
|
-
|
||||||
name: Call argocd github webhook
|
name: Call argocd github webhook
|
||||||
run: |
|
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 "${{ secrets.ARGOCD_WEBHOOK_SECRET }}" | awk '{print "X-Hub-Signature: sha1="$2}')
|
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 }}
|
curl -X POST -H 'X-GitHub-Event:push' -H "Content-Type: application/json" -H "${sig}" --data "${data}" ${{ vars.ARGOCD_PREPROD_WEBHOOK_URL }}
|
||||||
|
|||||||
Reference in New Issue
Block a user