Skip to content

Commit 2d7c9df

Browse files
authoredSep 18, 2024
Add github workfow
1 parent 36176f4 commit 2d7c9df

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
 

‎.github/workflows/run.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Update behested payments
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: '0 0 1 * *'
7+
8+
jobs:
9+
run:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: actions/setup-node@v2
15+
with:
16+
node-version: '20'
17+
- name: Install Node dependencies
18+
run: npm install
19+
- name: Run scripts
20+
run: node scrape.mjs
21+
- name: Commit and push if it changed
22+
run: |-
23+
git config user.name "Automated"
24+
git config user.email "actions@users.noreply.github.com"
25+
git pull
26+
git add behested.csv
27+
timestamp=$(date -u)
28+
git commit -m "Latest data: ${timestamp}" || exit 0
29+
git push

0 commit comments

Comments
 (0)