From ce9c42cc668d7471be31ab355897b1cdc252aee1 Mon Sep 17 00:00:00 2001 From: "Nikolai S." <116316784+ns4plabs@users.noreply.github.com> Date: Tue, 20 Aug 2024 18:42:29 +0300 Subject: [PATCH] chore(ci): add github action for deployment (#160) This adds a Github action to invoke the deployment workflow hosted in our infra repository. --- .github/workflows/deploy.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..6b450e4 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,21 @@ +name: Deploy +on: + push: + branches: + - main + - staging + +jobs: + trigger-deploy: + runs-on: ubuntu-latest + steps: + - name: Trigger deployment workflow + - run: | + gh api --method POST \ + -H "Accept: application/vnd.github+json" -H "X-GitHub-Api-Version: 2022-11-28" \ + /repos/ipshipyard/waterworks-infra/dispatches \ + -f "event_type=deploy" \ + -F "client_payload[git_sha]=${GITHUB_SHA}" \ + -F "client_payload[git_ref]=${GITHUB_REF}" + env: + GH_TOKEN: ${{ secrets.DEPLOYMENT_GITHUB_PAT }}