Skip to content

Commit

Permalink
Add gcp deployment script
Browse files Browse the repository at this point in the history
  • Loading branch information
milukove committed Jul 28, 2024
1 parent 880a2a8 commit 52355c0
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Deploy

on:
push:
branches: ["master", "main", "staging"]

jobs:
call-deployer:
runs-on: ubuntu-latest
steps:
- name: grindery-action-dispatcher token
id: grindery-action-dispatcher
uses: getsentry/action-github-app-token@v1
with:
app_id: ${{ secrets.DISPATCHER_APP_ID }}
private_key: ${{ secrets.DISPATCHER_APP_PRIVATE_KEY }}
- uses: actions/github-script@v6
env:
TARGET_REPO: ${{ secrets.DISPATCHER_TARGET_REPO }}
with:
github-token: ${{ steps.grindery-action-dispatcher.outputs.token }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: process.env.TARGET_REPO,
workflow_id: 'main.yml',
ref: 'main',
inputs: {
owner: context.repo.owner,
repo: context.repo.repo,
ref: process.env.GITHUB_REF_NAME,
},
});

0 comments on commit 52355c0

Please sign in to comment.