-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 887 Bytes
/
run.yaml
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
name: toot on a schedule
on:
workflow_dispatch:
schedule:
- cron: "55 2,5,8,15,17,20,23 * * *"
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- name: Check out this repo
uses: actions/checkout@v3
- name: Setup Node JS
uses: actions/setup-node@v3
with:
node-version-file: ".tool-versions"
cache: "npm"
- run: npm ci
- run: npm run go
env:
NODE_ENV: "production"
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
URL: ${{ secrets.URL }}
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "actions@users.noreply.github.com"
git add -A
timestamp=$(date -u)
git commit -m "Latest updates: ${timestamp}" || exit 0
git pull --rebase
git push