-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (60 loc) · 1.87 KB
/
Copy pathupdate-summary.yml
File metadata and controls
71 lines (60 loc) · 1.87 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: update-summary
on:
schedule:
- cron: "0 */3 * * *"
workflow_dispatch:
permissions:
contents: write
concurrency:
group: update-summary
cancel-in-progress: true
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: voidzero-dev/setup-vp@v1
with:
node-version: "22"
cache: true
- run: vp install --frozen-lockfile
- name: Validate cross-repo token
env:
TASKGRAPH_REPO_TOKEN: ${{ secrets.TASKGRAPH_REPO_TOKEN }}
run: |
if [ -z "$TASKGRAPH_REPO_TOKEN" ]; then
echo "TASKGRAPH_REPO_TOKEN secret is required to read public-vault and private-vault." >&2
exit 1
fi
- uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/public-vault
path: repos/public-vault
token: ${{ secrets.TASKGRAPH_REPO_TOKEN }}
persist-credentials: false
- uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/private-vault
path: repos/private-vault
token: ${{ secrets.TASKGRAPH_REPO_TOKEN }}
persist-credentials: false
- name: Generate summary
env:
OUTPUT_PATH: summary.md
PUBLIC_VAULT_PATH: repos/public-vault
PRIVATE_VAULT_PATH: repos/private-vault
run: vp run generate:summary
- name: Commit summary
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add summary.md
if git diff --cached --quiet; then
echo "No summary changes to commit"
exit 0
fi
git commit -m "chore: update task summary"
git pull --rebase
git push