Skip to content

Fix undefined exception by checking if artifact exists #574

Fix undefined exception by checking if artifact exists

Fix undefined exception by checking if artifact exists #574

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
jobs:
security_hardening:
name: Check security hardening
runs-on: ubuntu-latest
steps:
- name: Clone the repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
- name: Ensure SHA pinned actions
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@fc87bb5b5a97953d987372e74478de634726b3e5
build_test:
name: Build & Test
needs: security_hardening
runs-on: ubuntu-latest
steps:
- name: Clone the repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
ref: ${{ github.head_ref }} # https://github.com/stefanzweifel/git-auto-commit-action#checkout-the-correct-branch
- name: Get runs.using version
id: get-runs-using-version
uses: zgosalvez/github-actions-get-action-runs-using-version@0a8dcac2c28bdcbfcbdca07d46bae8eab7930dc2
- name: Set up Node
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
with:
node-version: v${{ steps.get-runs-using-version.outputs.version }}
- name: Cache Node Packages
id: node-cache
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830
with:
path: ~/.npm
key: node-cache-${{ steps.get-runs-using-version.outputs.prop }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
node-cache-${{ steps.get-runs-using-version.outputs.prop }}-
node-cache-
- name: Get Node packages
run: npm ci
- name: Run linter tool
run: npm run lint
- name: Prepare
run: npm run prepare
- uses: stefanzweifel/git-auto-commit-action@778341af668090896ca464160c2def5d1d1a3eb0
with:
commit_message: Apply `npm run prepare` changes