Feat(Medusa): Trigger staging deployment (#2695)

* initial implementation of trigger action

* rename access token

* update paths ignore
This commit is contained in:
Philip Korsholm
2022-11-29 16:46:28 +01:00
committed by GitHub
parent 70a8d3450f
commit ea193b6830
2 changed files with 21 additions and 0 deletions

View File

@@ -4,6 +4,9 @@ on:
push:
branches:
- develop
paths-ignore:
- "docs/**"
- "www/**"
concurrency: ${{ github.workflow }}-${{ github.ref }}

View File

@@ -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"}'