-
Notifications
You must be signed in to change notification settings - Fork 2
36 lines (31 loc) · 877 Bytes
/
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
name: 'Update data'
on:
schedule:
# Run at 05:00 UTC on the 1st of every month.
- cron: '00 05 1 * *'
workflow_dispatch:
jobs:
update-data:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm install
- name: Update data
run: |
npm run build
git config user.name 'Tibia War bot'
git config user.email 'war@tibiamaps.io'
# Update frag data.
date=$(date +'%Y-%m-%d')
git add data
git commit data -m "Add frag data for date=${date}" || true
git push