Audit #61
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: Audit | |
permissions: | |
contents: read | |
on: | |
schedule: | |
- cron: "0 0 * * 2,6" # Every Tuesday and Saturday at 09:00 JST | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
fetch-tags: true | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
cache: "npm" | |
- run: npm version | |
- run: | | |
STABLE_TAG=$(cat docs/release.json | jq -r .stable.tag) | |
LATEST_TAG=$(cat docs/release.json | jq -r .latest.tag) | |
echo "STABLE_TAG=$STABLE_TAG" >> $GITHUB_ENV | |
echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_ENV | |
- name: Latest Version | |
run: | | |
echo "Latest Version is $LATEST_TAG" | |
git checkout $LATEST_TAG | |
npm audit --audit-level critical | |
- name: Stable Version | |
run: | | |
echo "Stable Version is $STABLE_TAG" | |
git checkout $STABLE_TAG | |
npm audit --audit-level critical |