Harden GitHub Actions workflows

This commit is contained in:
Shivam Mathur
2026-05-15 23:56:20 +05:30
parent 5825be4b77
commit deb2299a77
6 changed files with 82 additions and 36 deletions

View File

@@ -18,10 +18,14 @@ on:
- 'examples/**'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
run:
name: Run
environment: codecov
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
@@ -29,12 +33,13 @@ jobs:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 2
persist-credentials: false
- name: Setup Node.js 24.x
uses: actions/setup-node@v6
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: 24.x
@@ -54,7 +59,7 @@ jobs:
run: npm audit
- name: Send Coverage
uses: codecov/codecov-action@v6
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage/lcov.info