-
-
Notifications
You must be signed in to change notification settings - Fork 3
73 lines (66 loc) · 2.26 KB
/
update-static-files.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
62
63
64
65
66
67
68
69
70
71
72
73
name: Update Static Files
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 6'
jobs:
UpdateData:
name: Update All Static Files
runs-on: ubuntu-latest
env:
GITHUB_USER: github-actions[bot]
GITHUB_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout Project
uses: actions/checkout@v4
with:
token: ${{ secrets.SKYRA_TOKEN }}
- name: Use Node.js v22
uses: actions/setup-node@v4
with:
node-version: 22
cache: yarn
- name: Install Dependencies
run: yarn --immutable
- name: Configure git
run: |
git remote set-url origin "https://${GITHUB_TOKEN}:[email protected]/${GITHUB_REPOSITORY}.git";
git config --local user.email "${GITHUB_EMAIL}";
git config --local user.name "${GITHUB_USER}";
- name: Run the Emoji Extraction script
run: node ./scripts/extract-emoji-data.mjs
- name: Commit emoji data changes
id: emoji
run: |
git add .;
if ! git diff-index --quiet HEAD --; then
git commit -sm "refactor: update emoji data";
echo "has_commits=true" >> $GITHUB_OUTPUT
fi
- name: Run the Unicode Extraction script
run: node ./scripts/extract-unicode-data.mjs
- name: Commit unicode data changes
id: unicode
run: |
git add .;
if ! git diff-index --quiet HEAD --; then
git commit -sm "refactor: update unicode data";
echo "has_commits=true" >> $GITHUB_OUTPUT
fi
- name: Run the Timezone Extraction script
run: node ./scripts/extract-timezone-data.mjs
- name: Commit timezone data changes
id: timezones
run: |
git add .;
if ! git diff-index --quiet HEAD --; then
git commit -sm "refactor: update timezones data";
echo "has_commits=true" >> $GITHUB_OUTPUT
fi
- name: Push any commits
if: |
steps.emoji.outputs.has_commits == 'true' ||
steps.unicode.outputs.has_commits == 'true' ||
steps.timezones.outputs.has_commits == 'true'
run: git push