-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (53 loc) · 1.76 KB
/
provision.yaml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Provision Tool
on:
workflow_dispatch: {}
pull_request:
branches:
- "*"
paths:
- "provision/**"
- .github/workflows/provision.yaml
push:
branches:
- master
paths:
- "provision/**"
- .github/workflows/provision.yaml
defaults:
run:
working-directory: provision
env:
TOOLKIT_AUTH_TOKEN: ${{ secrets.toolkit_auth_token }}
SNOWFLAKE_URL: ${{ secrets.snowflake_url }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run common setup
uses: ./.github/actions/common-setup
with:
toolkit_cli_download_token: ${{ secrets.toolkit_cli_download_token }}
toolkit_cli_version: ${{ vars.toolkit_cli_version }}
snowflake_private_key_pem: ${{ secrets.snowflake_private_key_pem }}
- name: Create metadata
run: toolkit provision init --metadata
- name: Plan changes
if: github.event_name == 'pull_request'
run: toolkit provision apply --plan
- name: Generate report
if: github.event_name == 'pull_request'
run: toolkit provision show phdatapartner-demo:plan:latest --output=provision-report.html
- name: Apply changes
run: toolkit provision apply
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
- name: Generate report
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
run: toolkit provision show phdatapartner-demo:apply:latest --output=provision-report.html
- name: Upload report
uses: actions/upload-artifact@v4
with:
name: provision-report
path: provision/provision-report.html
if-no-files-found: error