cache EOL data #31
This file contains 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: cache EOL data | |
on: | |
workflow_dispatch: | |
schedule: | |
# https://crontab.guru/#55_11,23_*_*_* | |
- cron: '55 11,23 * * *' | |
permissions: | |
contents: read | |
jobs: | |
cache: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: step-security/harden-runner@v1 | |
with: | |
egress-policy: block | |
allowed-endpoints: > | |
github.com:443 | |
nodejs.org:443 | |
prod.api.stepsecurity.io:443 | |
registry.npmjs.org:443 | |
endoflife.date:443 | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ljharb/actions/node/install@main | |
- run: node cacheCycles.mjs | |
name: cache EOL data | |
- run: node csv.mjs | |
name: update cached CSV data | |
- run: git checkout data | |
- run: git add -f out | |
- run: git mv -f out/* ./ | |
- name: GIT commit and push all changed files | |
env: | |
CI_COMMIT_MESSAGE: '[cron] update data' | |
CI_COMMIT_AUTHOR: Github Actions | |
CI_COMMIT_EMAIL: [email protected] | |
run: | | |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}" | |
git config --global user.email "${{ env.CI_COMMIT_EMAIL }}" | |
git commit -a -m "${{ env.CI_COMMIT_MESSAGE }}" | |
git push |