From ea193b68301682783a7da3bed885e5829f56ec17 Mon Sep 17 00:00:00 2001 From: Philip Korsholm <88927411+pKorsholm@users.noreply.github.com> Date: Tue, 29 Nov 2022 16:46:28 +0100 Subject: [PATCH] Feat(Medusa): Trigger staging deployment (#2695) * initial implementation of trigger action * rename access token * update paths ignore --- .github/workflows/staging-release.yml | 3 +++ .github/workflows/trigger-staging-release.yml | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 .github/workflows/trigger-staging-release.yml diff --git a/.github/workflows/staging-release.yml b/.github/workflows/staging-release.yml index f4f850d12b..b7b5a9caa2 100644 --- a/.github/workflows/staging-release.yml +++ b/.github/workflows/staging-release.yml @@ -4,6 +4,9 @@ on: push: branches: - develop + paths-ignore: + - "docs/**" + - "www/**" concurrency: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/trigger-staging-release.yml b/.github/workflows/trigger-staging-release.yml new file mode 100644 index 0000000000..6b9b45ae04 --- /dev/null +++ b/.github/workflows/trigger-staging-release.yml @@ -0,0 +1,18 @@ +name: Trigger staging deploy + +on: + workflow_run: + workflows: [Staging Release and Publish] + types: + - completed + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - run: | + curl -X POST \ + -H "Authorization: Bearer ${{secrets.STAGING_ACCESS_TOKEN}}" \ + -H "Accept: application/vnd.github.v3+json" \ + https://api.github.com/repos/@medusajs/medusa-staging/actions/workflows/deploy.yml/dispatches \ + -d '{"ref":"main"}' \ No newline at end of file