-
Notifications
You must be signed in to change notification settings - Fork 76
57 lines (47 loc) · 1.52 KB
/
on-commit-dispatch.yml
File metadata and controls
57 lines (47 loc) · 1.52 KB
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
name: On Commit Dispatch
on:
repository_dispatch:
types: [sync-from-ui-commit]
permissions:
id-token: write
contents: write
jobs:
sync:
runs-on: ubuntu-latest
outputs:
commit_hash: ${{ steps.commit_changes.outputs.commit_hash }}
steps:
- name: Generate token
id: generate_token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.TEMPORAL_CICD_APP_ID }}
private-key: ${{ secrets.TEMPORAL_CICD_PRIVATE_KEY }}
- name: Checkout ui-server
uses: actions/checkout@v4
with:
token: ${{ steps.generate_token.outputs.token }}
fetch-depth: 0
- name: Configure Git
run: |
echo ${{ steps.generate_token.outputs.token }} | gh auth login --with-token
gh auth status -a
git config --global user.name "temporal-cicd[bot]"
git config --global user.email "[email protected]"
- name: Download and Build UI
uses: ./.github/actions/download-and-build-ui
with:
ref: ${{ github.event.client_payload.ref }}
upstream_org: ${{ vars.UPSTREAM_ORG }}
upstream_repo: ${{ vars.UPSTREAM_REPO }}
- name: Commit changes
id: commit_changes
uses: ./.github/actions/commit-changes
with:
message: "Sync from UI commit ${{ github.sha }}"
commit:
uses: ./.github/workflows/on-commit.yaml
needs: [sync]
secrets: inherit
with:
ref: ${{ needs.sync.outputs.commit_hash }}