-
Notifications
You must be signed in to change notification settings - Fork 29
48 lines (45 loc) · 1.26 KB
/
templates.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
name: templates
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'assets/**'
pull_request:
branches:
- main
paths:
- 'assets/**'
env:
# when the workflow is triggered by a pull_request event, the REF_NAME is of the form
# '<pr-#>/merge'. The actual branch name is in HEAD_REF but that variables isn't
# defined for 'push' events, hence the ternary assignment.
SOURCE_BRANCH: ${{ github.event_name == 'push' && github.ref_name || github.head_ref }}
jobs:
trigger:
runs-on: ubuntu-latest
steps:
-
name: Read Configuration
uses: hashicorp/vault-action@v3
id: vault
with:
url: https://vault.eng.aserto.com/
token: ${{ secrets.VAULT_TOKEN }}
secrets: |
kv/data/github "READ_WRITE_TOKEN" | READ_WRITE_TOKEN;
-
name: Dispatch to Topaz Website
uses: lasith-kg/dispatch-workflow@v2
with:
dispatch-method: workflow_dispatch
owner: aserto-dev
repo: topaz-website
ref: main
workflow: update_templates.yaml
token: ${{ env.READ_WRITE_TOKEN }}
workflow-inputs: |
{
"branch": "${{ env.SOURCE_BRANCH }}"
}