forked from furthemore/APIS
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 1.01 KB
/
deploy_sirencon.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Deploy to SirenCon Kubernetes Cluster
on:
push:
branches:
- deploy/prod
jobs:
deploy:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.WORKFLOW_TRIGGER_APP_ID }}
private-key: ${{ secrets.WORKFLOW_TRIGGER_SSH_PRIVATE_KEY }}
repositories:
- SirenCon/fm-apis
- SirenCon/fm-apis-deployment
- name: Invoke deployment workflow
run: |
BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}
DEPLOY_REVISION=$(git rev-parse --short HEAD)
DEPLOY_ENVIRONMENT=${BRANCH#deploy/}
gh auth status
gh workflow run deploy.yml \
--repo SirenCon/fm-apis-deployment \
--ref main \
--field deploy_revision=$DEPLOY_REVISION \
--field deploy_environment=$DEPLOY_ENVIRONMENT
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}