-
Notifications
You must be signed in to change notification settings - Fork 6
45 lines (43 loc) · 1.14 KB
/
sync.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
name: Sync Hourly
on:
schedule:
- cron: '0 * * * *'
workflow_dispatch:
inputs:
recipe:
description: Sync manually
required: false
jobs:
sync:
runs-on: ubuntu-latest
name: Check For Changes
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- name: Generate Stuff
run: |
npm install
npm upgrade pogo-data-generator
npm upgrade @na-ji/pogo-protos
npm start
- name: Check for changes
run: |
if git diff --quiet; then
echo "changes_exist=false" >> $GITHUB_ENV
else
echo "changes_exist=true" >> $GITHUB_ENV
fi
- name: Publish Changes
if: ${{ env.changes_exist == 'true' }}
run: |
git config --global user.name "turtlesocks-bot"
git config --global user.email "[email protected]"
git add --all
git commit --message "Hourly Sync"
git push