Skip to content

Commit

Permalink
ci: 👷 improve ci to deploy new image
Browse files Browse the repository at this point in the history
  • Loading branch information
this-is-tobi committed Jun 17, 2024
1 parent cb03973 commit aebae81
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
paths:
- docs/**
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -41,6 +43,9 @@ jobs:
platforms: linux/amd64,linux/arm64
push: true

- name: Sync dso
- name: Deploy new image
run: |
curl -X POST --fail -F token=${{ secrets.GITLAB_TRIGGER_TOKEN }} -F ref=main -F "variables[GIT_BRANCH_DEPLOY]=${{ github.ref_name }}" -F variables[PROJECT_NAME]=doc ${{secrets.URL_MIRROR}}
curl -X POST https://gitops.fabrique-numerique.fr/api/v1/applications/cloud-pi-native-docs/sync \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${{ secrets.ARGOCD_TOKEN }}" \
-d '${{ vars.ARGOCD_SYNC_PAYLOAD }}'
7 changes: 7 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,10 @@ jobs:
target: prod
platforms: linux/amd64,linux/arm64
push: true

- name: Deploy new image
run: |
curl -X POST https://gitops.fabrique-numerique.fr/api/v1/applications/cloud-pi-native-docs/sync \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${{ secrets.ARGOCD_TOKEN }}" \
-d '${{ vars.ARGOCD_SYNC_PAYLOAD }}'

0 comments on commit aebae81

Please sign in to comment.