ci: harden GitHub Actions workflows (SHA-pin, permissions, persist-credentials) (#1241)
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Mark Erikson · committed by GitHub · parent e38ad71 · Browse files · 3 files·+19 added−8 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
3 files+19 added−8 removed
- other:+19 added−8 removed
Provenance
- Commit
7cab3c2- Tree
1384ae5- Author
Mark Erikson <mark@isquaredsoftware.com>- Committer
GitHub <noreply@github.com>- Parent
e38ad71
3 files changed+19 added−8 removed
modified:.github/workflows/docs-public.yml+9 added-3 removed
7 unmodified lines8910111213141516171819202122232425222326272829303132333435303637383940417 unmodified lines
# Allows you to run this workflow manually from the Actions tab workflow_dispatch:
permissions: {}
# A workflow run is made up of one or more jobs that can run sequentially or in paralleljobs: # This workflow contains a single job called "build" build: # The type of runner that the job will run on runs-on: ubuntu-latest permissions: contents: write
# Steps represent a sequence of tasks that will be executed as part of the job steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v4 - uses: actions/setup-node@v6 - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 with: persist-credentials: false - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: 24 - name: Build website run: cd website && yarn && yarn build - name: Deploy to GitHub Pages if: success() uses: crazy-max/ghaction-github-pages@v2 uses: crazy-max/ghaction-github-pages@59173cb633d9a3514f5f4552a6a3e62c6710355c # v2.7.0 with: target_branch: gh-pages build_dir: website/build env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}modified:.github/workflows/release.yml+2 added-2 removed
15 unmodified lines16171819202120212223242511 unmodified lines15 unmodified linesjobs: release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v6 - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: 24 registry-url: https://registry.npmjs.org - name: install11 unmodified linesmodified:.github/workflows/test.yml+8 added-3 removed
3 unmodified lines456789101112131412131516171819202122232425262728242930313 unmodified linesname: Test
on: ["push", "pull_request"]
permissions: contents: read
jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v6 - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 with: persist-credentials: false - uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: 24 - name: yarn install run: yarn --frozen-lockfile - name: test run: yarn test - name: coverage test run: yarn coverage - name: perf test run: yarn test:perf - uses: coverallsapp/github-action@v1.1.2 - uses: coverallsapp/github-action@8cbef1dea373ebce56de0a14c68d6267baa10b44 # v1.1.2 with: github-token: ${{ secrets.GITHUB_TOKEN }}