mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 18:18:55 +00:00
chore: trigger staging deploy on checks passed (#9439)
Now that our infra-as-code is moved into another repo, we need a mechanism to trigger the staging deploy. We can use `repository_dispatch` for that, which allows us to trigger the staging workflow by sending an HTTP API request that matches the configuration of the `repository_dispatch` workflow trigger on that repo. Related: https://github.com/firezone/infra/pull/36
This commit is contained in:
16
.github/workflows/cd.yml
vendored
16
.github/workflows/cd.yml
vendored
@@ -34,3 +34,19 @@ jobs:
|
||||
with:
|
||||
profile: "release"
|
||||
stage: "release"
|
||||
|
||||
notify:
|
||||
needs: ci
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Send 'checks-passed' event
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.INFRA_REPOSITORY_TOKEN }}
|
||||
run: |
|
||||
gh api \
|
||||
--method POST \
|
||||
--header "Accept: application/vnd.github+json" \
|
||||
--header "X-GitHub-Api-Version: 2022-11-28" \
|
||||
/repos/firezone/firezone/dispatches \
|
||||
--raw-field "event_type=checks-passed" \
|
||||
--field "client_payload[sha]=${{ github.sha }}"
|
||||
|
||||
Reference in New Issue
Block a user