Skip to content

Commit

Permalink
Add trigger deployment workflow (#60)
Browse files Browse the repository at this point in the history
* deploy workflow

* update
  • Loading branch information
anubhavmishra authored Feb 24, 2023
1 parent c070e0b commit 3e12200
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/trigger-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Trigger Deploy

on:
push:
branches: [main]
workflow_dispatch: {}

jobs:
trigger-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set git short
id: git_short_var
run: |
echo "github_sha_short=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT
- name: trigger workflow
run: |
curl -X POST -H 'Authorization: Bearer ${{secrets.HERMES_GH_SVC_ACCESS_TOKEN}}' -H 'Accept: application/vnd.github+json' -H 'X-GitHub-Api-Version: 2022-11-28' https://api.github.com/repos/${{secrets.HERMES_DEPLOY_TRIGGER_REPOSITORY_NAME}}/dispatches --data '{"event_type": "hermes_merge_to_main","client_payload":{"github_sha": "${{ github.sha }}","gitub_sha_short": "${{ steps.git_short_var.outputs.github_sha_short }}","message": "${{ github.repository }} - ${{ steps.git_short_var.outputs.github_sha_short }}"}}'

0 comments on commit 3e12200

Please sign in to comment.