Skip to content

Commit

Permalink
Dispatch master-pushes to dev deployment. (#497)
Browse files Browse the repository at this point in the history
  • Loading branch information
floitsch authored Sep 19, 2024
1 parent fde5238 commit ffbb1d3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ env:
HAS_PROTOBUF: false
RUN_TESTS: true
ARTIFACT_EXTENSION: tgz
DEV_DEPLOYMENT_OWNER: toitware
DEV_DEPLOYMENT_REPO: web-docs-dev
DEV_DEPLOYMENT_WORKFLOW: ci.yml

jobs:
snippets:
Expand Down Expand Up @@ -104,6 +107,22 @@ jobs:
${{ env.VERSION }}.${{ env.ARTIFACT_EXTENSION }}
VERSION
- name: Dispatch dev-deployment
if: github.ref == 'refs/heads/master'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.LEON_REPOSITORY_DISPATCH }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: '${{ env.DEV_DEPLOYMENT_OWNER }}',
repo: '${{ env.DEV_DEPLOYMENT_REPO }}',
workflow_id: '${{ env.DEV_DEPLOYMENT_WORKFLOW }}',
ref: 'main',
inputs: {
'run-id': '${{ github.run_id }}',
},
});
deploy:
if: |
github.event.inputs.deploy == 'true' ||
Expand Down

0 comments on commit ffbb1d3

Please sign in to comment.