-
-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (40 loc) · 1.28 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
name: update
on:
workflow_dispatch:
schedule:
- cron: "20 6 * * *" # this is right after Discord pushes a new alpha
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: 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 . || true
git commit -m "chore: update for version ${{ steps.versioner.outputs.version }}"
git push