Skip to content

Commit 2837a0e

Browse files
authored
chore(actions): use gov repo for reused actions (#7904)
* chore(actions): use gov repo * fixup!
1 parent 76ee24a commit 2837a0e

14 files changed

+34
-469
lines changed

.github/scripts/report-inactive-collaborators.mjs

Lines changed: 0 additions & 131 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -39,40 +39,25 @@ jobs:
3939
os: [ubuntu-latest, windows-latest]
4040

4141
steps:
42-
- name: Harden Runner
43-
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
42+
- uses: nodejs/web-team/actions/setup-environment@2c2897a93eb99b4cdca270729100bc0887c758d9
4443
with:
45-
egress-policy: audit
44+
pnpm: true
45+
use-version-file: true
46+
# We only want to install required production packages
47+
install-flags: --prod
4648

4749
- name: Use GNU tar instead BSD tar
4850
# This ensures that we use GNU `tar` which is more efficient for extracting caches's
4951
if: matrix.os == 'windows-latest'
5052
shell: cmd
5153
run: echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"
5254

53-
- name: Git Checkout
54-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
55-
5655
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
5756
with:
5857
path: ${{ github.workspace }}/apps/site/.next/cache
5958
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
6059
restore-keys: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
6160

62-
- name: Set up pnpm
63-
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
64-
65-
- name: Set up Node.js
66-
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
67-
with:
68-
# We want to ensure that the Node.js version running here respects our supported versions
69-
node-version-file: '.nvmrc'
70-
cache: 'pnpm'
71-
72-
- name: Install packages
73-
# We only want to install required production packages
74-
run: pnpm install --prod --frozen-lockfile
75-
7661
- name: Build Next.js
7762
# We want a ISR build on CI to ensure that regular Next.js builds work as expected.
7863
run: node_modules/.bin/turbo build ${{ env.TURBO_ARGS }}

.github/workflows/chromatic.yml

Lines changed: 3 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -53,32 +53,10 @@ jobs:
5353
url: ${{ steps.chromatic-deploy.outputs.storybookUrl }}
5454

5555
steps:
56-
- name: Harden Runner
57-
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
56+
- uses: nodejs/web-team/actions/setup-environment@2c2897a93eb99b4cdca270729100bc0887c758d9
5857
with:
59-
egress-policy: audit
60-
61-
- name: Git Checkout
62-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
63-
with:
64-
# Provides the Pull Request commit SHA or the GitHub merge group ref
65-
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.ref }}
66-
# The Chromatic (@chromaui/action) Action requires a full history of the current branch in order to be able to compare
67-
# previous changes and previous commits and determine which Storybooks should be tested against and what should be built
68-
fetch-depth: 0
69-
70-
- name: Set up pnpm
71-
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
72-
73-
- name: Set up Node.js
74-
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
75-
with:
76-
# We want to ensure that the Node.js version running here respects our supported versions
77-
node-version-file: '.nvmrc'
78-
cache: 'pnpm'
79-
80-
- name: Install packages
81-
run: pnpm install --frozen-lockfile
58+
pnpm: true
59+
use-version-file: true
8260

8361
- name: Start Visual Regression Tests (Chromatic)
8462
# This assigns the Environment Deployment for Storybook

.github/workflows/codeql.yml

Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
1-
# For most projects, this workflow file will not need changing; you simply need
2-
# to commit it to your repository.
3-
#
4-
# You may wish to alter this file to override the set of languages analyzed,
5-
# or to provide custom queries or build logic.
6-
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
#
121
name: 'CodeQL'
132

143
on:
@@ -26,53 +15,8 @@ permissions:
2615
jobs:
2716
analyze:
2817
name: Analyze
29-
runs-on: ubuntu-latest
18+
uses: nodejs/web-team/.github/workflows/codeql.yml@2c2897a93eb99b4cdca270729100bc0887c758d9
3019
permissions:
3120
actions: read
3221
contents: read
3322
security-events: write
34-
35-
strategy:
36-
fail-fast: false
37-
matrix:
38-
language: ['javascript', 'typescript']
39-
# CodeQL supports [ $supported-codeql-languages ]
40-
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
41-
42-
steps:
43-
- name: Harden Runner
44-
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
45-
with:
46-
egress-policy: audit
47-
48-
- name: Checkout repository
49-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
50-
51-
# Initializes the CodeQL tools for scanning.
52-
- name: Initialize CodeQL
53-
uses: github/codeql-action/init@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
54-
with:
55-
languages: ${{ matrix.language }}
56-
# If you wish to specify custom queries, you can do so here or in a config file.
57-
# By default, queries listed here will override any specified in a config file.
58-
# Prefix the list here with "+" to use these queries and those in the config file.
59-
60-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
61-
# If this step fails, then you should remove it and run the build manually (see below)
62-
- name: Autobuild
63-
uses: github/codeql-action/autobuild@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
64-
65-
# ℹ️ Command-line programs to run using the OS shell.
66-
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
67-
68-
# If the Autobuild fails above, remove it and uncomment the following three lines.
69-
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
70-
71-
# - run: |
72-
# echo "Run, Build Application using script"
73-
# ./location_of_script_within_repo/buildscript.sh
74-
75-
- name: Perform CodeQL Analysis
76-
uses: github/codeql-action/analyze@3599b3baa15b485a2e49ef411a7a4bb2452e7f93 # v3.30.5
77-
with:
78-
category: '/language:${{matrix.language}}'
Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
# Dependency Review Action
2-
#
3-
# This Action will scan dependency manifest files that change as part of a Pull Request,
4-
# surfacing known-vulnerable versions of the packages declared or updated in the PR.
5-
# Once installed, if the workflow run is marked as required,
6-
# PRs introducing known-vulnerable packages will be blocked from merging.
7-
#
8-
# Source repository: https://github.com/actions/dependency-review-action
91
name: Review Dependencies
102

113
on:
@@ -23,15 +15,4 @@ permissions:
2315

2416
jobs:
2517
dependency-review:
26-
runs-on: ubuntu-latest
27-
steps:
28-
- name: Harden Runner
29-
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
30-
with:
31-
egress-policy: audit
32-
33-
- name: Git Checkout
34-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
35-
36-
- name: Review Dependencies
37-
uses: actions/dependency-review-action@56339e523c0409420f6c2c9a2f4292bbb3c07dd3 # v4.8.0
18+
uses: nodejs/web-team/.github/workflows/dependency-review.yml@2c2897a93eb99b4cdca270729100bc0887c758d9

.github/workflows/find-inactive-collaborators.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)