From 8d05e8b276a468edaebf25f2fd9cb8860d1f6ba8 Mon Sep 17 00:00:00 2001 From: Jamil Date: Thu, 5 Jun 2025 14:09:53 -0700 Subject: [PATCH] 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 --- .github/workflows/cd.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 422b3a0ce..c29fa463d 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -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 }}"