-
Notifications
You must be signed in to change notification settings - Fork 176
31 lines (28 loc) · 931 Bytes
/
cd.yml
File metadata and controls
31 lines (28 loc) · 931 Bytes
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
name: CD
run-name: Trigger deployment of main to dev
on:
workflow_run:
workflows: [CI]
types: [completed]
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
if: github.event.workflow_run.conclusion == 'success' && github.repository == 'openops-cloud/openops'
steps:
- name: Get token from Github App
id: app_token
uses: actions/create-github-app-token@v3.0.0
with:
app-id: ${{ vars.DEVOPS_GITHUB_APP_ID }}
private-key: ${{ secrets.DEVOPS_GITHUB_APP_PEM }}
owner: ${{ github.repository_owner }}
- name: Trigger deployment
env:
GITHUB_TOKEN: ${{ steps.app_token.outputs.token }}
SHA: ${{ github.sha }}
run: |
gh workflow run deploy -r main -R openops-cloud/devops \
-f repository=openops-cloud/openops \
-f revision=${SHA::8} \
-f environment=dev-oss