This repository was archived by the owner on Mar 3, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (44 loc) · 1.35 KB
/
Copy pathauto-update.yml
File metadata and controls
52 lines (44 loc) · 1.35 KB
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
name: Auto Update
on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 1"
permissions:
contents: write
jobs:
run-hash-pipeline:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
working-directory: tools
run: npm install
- name: Run hash pipeline script
id: script
working-directory: tools
env:
RA_API_KEY: ${{ secrets.RA_API_KEY }}
run: |
output=$(npm run start --silent)
echo "commit_message<<EOF" >> $GITHUB_OUTPUT
echo "$output" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
- name: Commit and push changes
run: |
git config --global user.name 'mentalblank'
git config --global user.email '12580160+mentalblank@users.noreply.github.com'
git add hashlinks.json missinghashes.json README.md
if git diff --cached --quiet; then
echo "No changes to commit"
else
printf "%s" "${{ steps.script.outputs.commit_message }}" > commit.txt
git commit -F commit.txt
git push
fi