Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .github/workflows/__test-workflow-continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@ jobs:
uses: $/.github/workflows/continuous-integration.yml
permissions:
contents: read
id-token: write
packages: read
pull-requests: write
security-events: write
with:
working-directory: tests/continuous-integration
build: ""
Expand All @@ -28,10 +25,7 @@ jobs:
uses: $/.github/workflows/continuous-integration.yml
permissions:
contents: read
id-token: write
packages: read
pull-requests: write
security-events: write
with:
checks: false
container: invalid.example.invalid/must-not-be-pulled:latest
Expand All @@ -55,10 +49,7 @@ jobs:
uses: $/.github/workflows/continuous-integration.yml
permissions:
contents: read
id-token: write
packages: read
pull-requests: write
security-events: write
with:
working-directory: tests/source-package
build: ""
Expand Down Expand Up @@ -354,10 +345,7 @@ jobs:
needs: arrange-with-container
permissions:
contents: read
id-token: write
packages: read
pull-requests: write
security-events: write
with:
container: ${{ fromJSON(needs.arrange-with-container.outputs.built-images).ci-npm.images[0] }}
working-directory: /usr/src/app/
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/continuous-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# GitHub Reusable Workflow: Node.js Continuous Integration

<div align="center">
<img src="https://opengraph.githubassets.com/798861777139bae96adc7ee652339a4713d1b50ce3b11cfb3ce6c363f2339b53/hoverkraft-tech/ci-github-nodejs" width="60px" align="center" alt="Node.js Continuous Integration" />
<img src="https://opengraph.githubassets.com/7e9813f9e19bd5adf686a5ff854c41da9068e2fb45a0d01f3d74b94a77ffe027/hoverkraft-tech/ci-github-nodejs" width="60px" align="center" alt="Node.js Continuous Integration" />
</div>

---
Expand All @@ -16,7 +16,6 @@
[![License](https://img.shields.io/github/license/hoverkraft-tech/ci-github-nodejs)](http://choosealicense.com/licenses/mit/)
[![Stars](https://img.shields.io/github/stars/hoverkraft-tech/ci-github-nodejs?style=social)](https://img.shields.io/github/stars/hoverkraft-tech/ci-github-nodejs?style=social)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/hoverkraft-tech/ci-github-nodejs/blob/main/CONTRIBUTING.md)
![GitHub Verified Creator](https://img.shields.io/badge/GitHub-Verified%20Creator-4493F8?logo=data:image/svg%2bxml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNiAxNiIgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJyZ2IoNjgsIDE0NywgMjQ4KSI+CiAgPHBhdGggZD0ibTkuNTg1LjUyLjkyOS42OGMuMTUzLjExMi4zMzEuMTg2LjUxOC4yMTVsMS4xMzguMTc1YTIuNjc4IDIuNjc4IDAgMCAxIDIuMjQgMi4yNGwuMTc0IDEuMTM5Yy4wMjkuMTg3LjEwMy4zNjUuMjE1LjUxOGwuNjguOTI4YTIuNjc3IDIuNjc3IDAgMCAxIDAgMy4xN2wtLjY4LjkyOGExLjE3NCAxLjE3NCAwIDAgMC0uMjE1LjUxOGwtLjE3NSAxLjEzOGEyLjY3OCAyLjY3OCAwIDAgMS0yLjI0MSAyLjI0MWwtMS4xMzguMTc1YTEuMTcgMS4xNyAwIDAgMC0uNTE4LjIxNWwtLjkyOC42OGEyLjY3NyAyLjY3NyAwIDAgMS0zLjE3IDBsLS45MjgtLjY4YTEuMTc0IDEuMTc0IDAgMCAwLS41MTgtLjIxNUwzLjgzIDE0LjQxYTIuNjc4IDIuNjc4IDAgMCAxLTIuMjQtMi4yNGwtLjE3NS0xLjEzOGExLjE3IDEuMTcgMCAwIDAtLjIxNS0uNTE4bC0uNjgtLjkyOGEyLjY3NyAyLjY3NyAwIDAgMSAwLTMuMTdsLjY4LS45MjhjLjExMi0uMTUzLjE4Ni0uMzMxLjIxNS0uNTE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43NTEuNzUxIDAgMCAxIDEuMDQyLS4wMThMNyA4Ljk0bDMuMjItMy4yMmEuNzUxLjc1MSAwIDAgMSAxLjA0Mi4wMTguNzUxLjc1MSAwIDAgMSAuMDE4IDEuMDQyWiI+PC9wYXRoPgo8L3N2Zz4K)

<!-- badges:end -->

Expand All @@ -35,13 +34,20 @@ Workflow to performs continuous integration steps against a Node.js project:
- Build
- Test

Set permissions on the calling job for the enabled features. Build, lint and
tests require contents: read and packages: read. CodeQL additionally requires
security-events: write; Codecov requires id-token: write; GitHub coverage
comments require pull-requests: write (unless using a separate github-token).
Disable coverage reporting with test: '{"coverage":null}' for read-only tests.
Test and CodeQL jobs inherit the caller's permissions; other jobs restrict
their permissions explicitly. Grant only the scopes your selected checks need.
The generated permission list below is the read-only baseline. Default checks
also need security-events: write and pull-requests: write on the calling job.

### Permissions

- **`contents`**: `read`
- **`id-token`**: `write`
- **`packages`**: `read`
- **`pull-requests`**: `write`
- **`security-events`**: `write`

<!-- overview:end -->

Expand All @@ -61,10 +67,7 @@ jobs:
uses: hoverkraft-tech/ci-github-nodejs/.github/workflows/continuous-integration.yml@02a04ad25ceaacdf3b7200e45fb7fec07fadf4fa # 2.1.0
permissions:
contents: read
id-token: write
packages: read
pull-requests: write
security-events: write
secrets:
# Secrets to be used during the build step.
# Must be a multi-line env formatted string.
Expand Down
22 changes: 13 additions & 9 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@
# - Linting
# - Build
# - Test
#
# Set permissions on the calling job for the enabled features. Build, lint and
# tests require contents: read and packages: read. CodeQL additionally requires
# security-events: write; Codecov requires id-token: write; GitHub coverage
# comments require pull-requests: write (unless using a separate github-token).
# Disable coverage reporting with test: '{"coverage":null}' for read-only tests.
# Test and CodeQL jobs inherit the caller's permissions; other jobs restrict
# their permissions explicitly. Grant only the scopes your selected checks need.
# The generated permission list below is the read-only baseline. Default checks
# also need security-events: write and pull-requests: write on the calling job.

name: Node.js Continuous Integration

Expand Down Expand Up @@ -227,8 +237,7 @@ on:
description: "ID of the build artifact) uploaded during the build step."
value: ${{ jobs.build.outputs.artifact-id }}

permissions: {}

# Optional reporting permissions are supplied by the calling job.
jobs:
prepare:
name: 📦 Prepare configuration
Expand Down Expand Up @@ -484,8 +493,7 @@ jobs:
code-ql:
name: 🛡️ CodeQL Analysis
if: inputs.checks == true && inputs.code-ql != ''
permissions:
security-events: write
# Inherit the caller's permission grant when CodeQL is enabled.
runs-on: *ci-runner
steps:
- uses: hoverkraft-tech/ci-github-common/actions/checkout@ce885f8dd6bf7191a79e3eebdf37bca805d40932 # 3.0.0
Expand Down Expand Up @@ -643,11 +651,7 @@ jobs:
needs:
- prepare
- build
permissions:
contents: read
id-token: write # Required for Codecov uploads with OIDC authentication
packages: read
pull-requests: write
# Inherit the caller's reporting permissions; coverage can be disabled.
steps:
- uses: hoverkraft-tech/ci-github-common/actions/checkout@ce885f8dd6bf7191a79e3eebdf37bca805d40932 # 3.0.0
if: inputs.container == ''
Expand Down
Loading