ci(dependabot) Update GitHub actions #3996
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: tests | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: ["20.x"] | |
env: | |
IBM_TELEMETRY_DISABLED: 'true' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "pnpm" | |
- name: project - install | |
run: pnpm install --frozen-lockfile | |
- name: "GitHub Data: Generate Cache Key" | |
id: cache-key | |
run: echo "cache-key=$(pnpm --silent --filter @tony/cv-scripts run github --cache-key)-github-data" >> $GITHUB_ENV | |
env: | |
GITHUB_API_TOKEN: ${{ secrets.CI_GITHUB_API_TOKEN }} | |
- name: "GitHub Data: Restore Cache" | |
id: restore-github-data-cache | |
uses: actions/cache@v4 | |
with: | |
path: packages/data/scraped/ | |
key: ${{ env.cache-key }} | |
restore-keys: | | |
${{ env.cache-key }} | |
- name: "GitHub Data: Check if Cache Directory is Empty" | |
id: check-cache-dir | |
run: | | |
if [ -z "$(ls -A packages/data/scraped)" ]; then | |
echo "is-data-dir-empty=true" >> $GITHUB_ENV | |
else | |
echo "is-data-dir-empty=false" >> $GITHUB_ENV | |
fi | |
- name: "GitHub Data: Fetch Data" | |
if: steps.restore-github-data-cache.outputs.cache-hit != 'true' || env.is-data-dir-empty == 'true' | |
run: pnpm --filter @tony/cv-scripts run github | |
env: | |
GITHUB_API_TOKEN: ${{ secrets.CI_GITHUB_API_TOKEN }} | |
- name: "GitHub Data: Save Cache" | |
uses: actions/cache@v4 | |
with: | |
path: packages/data/scraped/ | |
key: ${{ env.cache-key }} | |
- name: pnpm biome format . | |
run: pnpm biome format . | |
- name: pnpm biome lint . | |
run: pnpm biome lint . | |
- name: pnpm biome check . | |
run: pnpm biome check . |