Skip to content

cache EOL data

cache EOL data #114

Workflow file for this run

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
if:
env:
CI_COMMIT_MESSAGE: '[cron] update data'
CI_COMMIT_AUTHOR: Github Actions
CI_COMMIT_EMAIL: [email protected]
run: |
git update-index --really-refresh
git diff-index --quiet HEAD || {
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
}