Skip to content

Commit

Permalink
chore: postinstall for dependabot template-oss PR
Browse files Browse the repository at this point in the history
  • Loading branch information
lukekarrys committed Oct 28, 2022
1 parent 9199635 commit 106e518
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 66 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/audit.yml
Expand Up @@ -33,5 +33,7 @@ jobs:
run: npm -v
- name: Install Dependencies
run: npm i --ignore-scripts --no-audit --no-fund --package-lock
- name: Run Audit
run: npm audit
- name: Run Production Audit
run: npm audit --omit=dev
- name: Run Full Audit
run: npm audit --audit-level=none
18 changes: 12 additions & 6 deletions .github/workflows/ci-release.yml
Expand Up @@ -3,6 +3,12 @@
name: CI - Release

on:
workflow_dispatch:
inputs:
ref:
required: true
type: string
default: main
workflow_call:
inputs:
ref:
Expand All @@ -23,7 +29,7 @@ jobs:
steps:
- name: Get Workflow Job
uses: actions/github-script@v6

if: inputs.check-sha
id: check-output
env:
JOB_NAME: "Lint All"
Expand Down Expand Up @@ -57,7 +63,7 @@ jobs:
- name: Create Check
uses: LouisBrunner/checks-action@v1.3.1
id: check

if: inputs.check-sha
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: in_progress
Expand Down Expand Up @@ -88,7 +94,7 @@ jobs:
run: npm run postlint --ignore-scripts
- name: Conclude Check
uses: LouisBrunner/checks-action@v1.3.1
if: always()
if: steps.check.outputs.check_id && always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
conclusion: ${{ job.status }}
Expand Down Expand Up @@ -121,7 +127,7 @@ jobs:
steps:
- name: Get Workflow Job
uses: actions/github-script@v6

if: inputs.check-sha
id: check-output
env:
JOB_NAME: "Test All"
Expand Down Expand Up @@ -155,7 +161,7 @@ jobs:
- name: Create Check
uses: LouisBrunner/checks-action@v1.3.1
id: check

if: inputs.check-sha
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: in_progress
Expand Down Expand Up @@ -200,7 +206,7 @@ jobs:
run: npm test --ignore-scripts
- name: Conclude Check
uses: LouisBrunner/checks-action@v1.3.1
if: always()
if: steps.check.outputs.check_id && always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
conclusion: ${{ job.status }}
Expand Down
50 changes: 0 additions & 50 deletions .github/workflows/ci.yml
Expand Up @@ -14,56 +14,6 @@ on:
- cron: "0 9 * * 1"

jobs:
engines:
name: Engines - ${{ matrix.platform.name }} - ${{ matrix.node-version }}
if: github.repository_owner == 'npm'
strategy:
fail-fast: false
matrix:
platform:
- name: Linux
os: ubuntu-latest
shell: bash
node-version:
- 14.17.0
- 16.13.0
- 18.0.0
runs-on: ${{ matrix.platform.os }}
defaults:
run:
shell: ${{ matrix.platform.shell }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Git User
run: |
git config --global user.email "npm-cli+bot@github.com"
git config --global user.name "npm CLI robot"
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Update Windows npm
# node 12 and 14 ship with npm@6, which is known to fail when updating itself in windows
if: matrix.platform.os == 'windows-latest' && (startsWith(matrix.node-version, '12.') || startsWith(matrix.node-version, '14.'))
run: |
curl -sO https://registry.npmjs.org/npm/-/npm-7.5.4.tgz
tar xf npm-7.5.4.tgz
cd package
node lib/npm.js install --no-fund --no-audit -g ..\npm-7.5.4.tgz
cd ..
rmdir /s /q package
- name: Install npm@7
if: startsWith(matrix.node-version, '10.')
run: npm i --prefer-online --no-fund --no-audit -g npm@7
- name: Install npm@latest
if: ${{ !startsWith(matrix.node-version, '10.') }}
run: npm i --prefer-online --no-fund --no-audit -g npm@latest
- name: npm Version
run: npm -v
- name: Install Dependencies
run: npm i --ignore-scripts --no-audit --no-fund --engines-strict

lint:
name: Lint
if: github.repository_owner == 'npm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/post-dependabot.yml
Expand Up @@ -69,7 +69,7 @@ jobs:
if [[ "${{ steps.metadata.outputs.update-type }}" == "version-update:semver-major" ]]; then
prefix='feat!'
else
prefix='chore!'
prefix='chore'
fi
echo "::set-output name=message::$prefix: postinstall for dependabot template-oss PR"
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/release.yml
Expand Up @@ -8,6 +8,7 @@ on:
branches:
- main
- latest
- release/v*

permissions:
contents: write
Expand Down Expand Up @@ -88,7 +89,7 @@ jobs:
return commentId
- name: Get Workflow Job
uses: actions/github-script@v6
if: steps.release.outputs.pr-number
if: steps.release.outputs.pr-sha
id: check-output
env:
JOB_NAME: "Release"
Expand Down Expand Up @@ -122,7 +123,7 @@ jobs:
- name: Create Check
uses: LouisBrunner/checks-action@v1.3.1
id: check
if: steps.release.outputs.pr-number
if: steps.release.outputs.pr-sha
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: in_progress
Expand Down Expand Up @@ -179,7 +180,7 @@ jobs:
echo "::set-output name=sha::$(git rev-parse HEAD)"
- name: Get Workflow Job
uses: actions/github-script@v6

if: steps.commit.outputs.sha
id: check-output
env:
JOB_NAME: "Update - Release"
Expand Down Expand Up @@ -213,7 +214,7 @@ jobs:
- name: Create Check
uses: LouisBrunner/checks-action@v1.3.1
id: check

if: steps.commit.outputs.sha
with:
token: ${{ secrets.GITHUB_TOKEN }}
status: in_progress
Expand All @@ -222,7 +223,7 @@ jobs:
output: ${{ steps.check-output.outputs.result }}
- name: Conclude Check
uses: LouisBrunner/checks-action@v1.3.1
if: always()
if: needs.release.outputs.check-id && always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
conclusion: ${{ job.status }}
Expand Down Expand Up @@ -260,7 +261,7 @@ jobs:
echo "::set-output name=result::$result"
- name: Conclude Check
uses: LouisBrunner/checks-action@v1.3.1
if: always()
if: needs.update.outputs.check-id && always()
with:
token: ${{ secrets.GITHUB_TOKEN }}
conclusion: ${{ steps.needs-result.outputs.result }}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -71,7 +71,7 @@
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"windowsCI": false,
"version": "4.6.2"
"version": "4.8.0"
},
"author": "GitHub Inc.",
"tap": {
Expand Down

0 comments on commit 106e518

Please sign in to comment.