-
-
Notifications
You must be signed in to change notification settings - Fork 7
61 lines (52 loc) · 1.51 KB
/
iconpack_tree_writer.yml
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
name: Iconpack Tree Writer
on:
push:
branches:
- main
paths:
- "iconpacks/list.json"
- ".github/scripts/iconpack_tree_writer/**/*.*"
- ".github/workflows/iconpack_tree_writer.yml"
schedule:
- cron: "*/30 * * * *"
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
jobs:
write:
runs-on: ubuntu-latest
name: Write files
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
path: main
- uses: actions/checkout@v4
with:
ref: iconpack-trees
path: trees
- uses: actions/setup-node@v4
with:
node-version: 18.x
- uses: pnpm/action-setup@v3
with:
package_json_file: main/package.json
- working-directory: main
run: pnpm i
- name: Write trees
working-directory: main
run: node .github/scripts/iconpack_tree_writer/index.mjs
- name: Commit changes
working-directory: trees
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
if [ "${{ github.event_name }}" == "push" ]; then
git commit -m "chore: update iconpacks trees (${{ github.sha }})" | true
else
git commit -m "chore: update iconpacks trees" | true
fi
git pull
git push