Skip to content

Commit cd4dcef

Browse files
committed
chore(actions): use gov repo for reused actions
1 parent 31191f7 commit cd4dcef

16 files changed

+36
-556
lines changed

.github/CODEOWNERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ apps/site/redirects.json @nodejs/web-infra
3131

3232
# Critical Documents
3333
LICENSE @nodejs/tsc
34-
GOVERNANCE.md @nodejs/tsc
3534
CONTRIBUTING.md @nodejs/nodejs-website @nodejs/web-infra
3635
docs @nodejs/nodejs-website @nodejs/web-infra
3736

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

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

.github/workflows/build.yml

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -47,49 +47,25 @@ jobs:
4747
os: [ubuntu-latest, windows-latest]
4848

4949
steps:
50-
- name: Harden Runner
51-
uses: step-security/harden-runner@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
50+
- uses: nodejs/web-team/actions/setup-environment@main
5251
with:
53-
egress-policy: audit
52+
pnpm: true
53+
use-version-file: true
54+
# We only want to install required production packages
55+
install-flags: --prod
5456

5557
- name: Use GNU tar instead BSD tar
5658
# This ensures that we use GNU `tar` which is more efficient for extracting caches's
5759
if: matrix.os == 'windows-latest'
5860
shell: cmd
5961
run: echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"
6062

61-
- name: Git Checkout
62-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
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-
# We only need to fetch the last commit from the head_ref
67-
# since we're not using the `--filter` operation from turborepo
68-
# We don't use the `--filter` as we always want to force builds regardless of having changes or not
69-
# this ensures that our bundle analysis script always runs and that we always ensure next.js is building
70-
# regardless of having code changes or not
71-
fetch-depth: 1
72-
7363
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
7464
with:
7565
path: ${{ github.workspace }}/apps/site/.next/cache
7666
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('**/*.js', '**/*.jsx', '**/*.ts', '**/*.tsx') }}
7767
restore-keys: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }}-
7868

79-
- name: Set up pnpm
80-
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
81-
82-
- name: Set up Node.js
83-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
84-
with:
85-
# We want to ensure that the Node.js version running here respects our supported versions
86-
node-version-file: '.nvmrc'
87-
cache: 'pnpm'
88-
89-
- name: Install packages
90-
# We only want to install required production packages
91-
run: pnpm install --prod --frozen-lockfile
92-
9369
- name: Build Next.js (ISR)
9470
# We want a ISR build on CI to ensure that regular Next.js builds work as expected.
9571
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@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
56+
- uses: nodejs/web-team/actions/setup-environment@main
5857
with:
59-
egress-policy: audit
60-
61-
- name: Git Checkout
62-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
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@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.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 & 62 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:
@@ -25,54 +14,4 @@ permissions:
2514

2615
jobs:
2716
analyze:
28-
name: Analyze
29-
runs-on: ubuntu-latest
30-
permissions:
31-
actions: read
32-
contents: read
33-
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@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
45-
with:
46-
egress-policy: audit
47-
48-
- name: Checkout repository
49-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
50-
51-
# Initializes the CodeQL tools for scanning.
52-
- name: Initialize CodeQL
53-
uses: github/codeql-action/init@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
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@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
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@ff0a06e83cb2de871e5a09832bc6a81e7276941f # v3.28.18
77-
with:
78-
category: '/language:${{matrix.language}}'
17+
uses: nodejs/web-team/.github/workflows/codeql.yml
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@0634a2670c59f64b4a01f0f96f84700a4088b9f0 # v2.12.0
30-
with:
31-
egress-policy: audit
32-
33-
- name: Git Checkout
34-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
35-
36-
- name: Review Dependencies
37-
uses: actions/dependency-review-action@da24556b548a50705dd671f47852072ea4c105d9 # v4.7.1
18+
uses: nodejs/web-team/.github/workflows/dependency-review.yml

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

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

0 commit comments

Comments
 (0)