This repository was archived by the owner on Mar 3, 2026. It is now read-only.
Auto Update #22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |