-
-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (43 loc) · 1.33 KB
/
update.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
name: update (hourly)
on:
workflow_dispatch:
schedule:
- cron: "30 * * * *"
jobs:
check-update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: main
path: main
- uses: actions/checkout@v4
with:
ref: data
path: data
- uses: actions/setup-python@v5
with:
python-version: "3.12.4"
- uses: oven-sh/setup-bun@v1
- working-directory: main
run: bun install
- name: Check for version
id: versioner
working-directory: main
run: echo "version=$(bun run check)" >> $GITHUB_OUTPUT
- name: Update
if: steps.versioner.outcome.version != 'false'
env:
code_webhook: ${{ secrets.CODE_WEBHOOK }}
color_webhook: ${{ secrets.COLOR_WEBHOOK }}
icons_webhook: ${{ secrets.ICONS_WEBHOOK }}
working-directory: main
run: bun run update
- name: Publish changes
working-directory: data
run: |
git config user.name github-actions
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add .
git commit -m "chore: update for version ${{ steps.versioner.outputs.version }}" || true
git push