Skip to content
Open
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
17 changes: 17 additions & 0 deletions .github/linters/actionlint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# FIXME: Remove only the code-quality exception when Actionlint supports it.
# https://github.com/rhysd/actionlint/pull/674
# FIXME: Temporary ignores to bypass actionlint limitations. See https://github.com/rhysd/actionlint/issues/590.
paths:
.github/workflows/continuous-integration.yml:
Expand All @@ -9,3 +11,18 @@ paths:
- '"ports" section must be sequence node but got scalar node'
- '"volumes" section must be sequence node but got scalar node'
- '"runs-on" section is alias node but mapping node is expected'
.github/workflows/__main-ci.yml:
ignore:
- ^unknown permission scope "code-quality"\.
.github/workflows/__pull-request-ci.yml:
ignore:
- ^unknown permission scope "code-quality"\.
.github/workflows/__release.yml:
ignore:
- ^unknown permission scope "code-quality"\.
.github/workflows/__shared-ci.yml:
ignore:
- ^unknown permission scope "code-quality"\.
.github/workflows/__test-workflow-continuous-integration.yml:
ignore:
- ^unknown permission scope "code-quality"\.
153 changes: 153 additions & 0 deletions .github/workflows/__checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,153 @@
name: Internal - CI checks

on:
workflow_call:
outputs:
job-results:
description: Every check result, supplied automatically by GitHub.
value: ${{ toJSON(jobs) }}

permissions: {}

jobs:
lint:
name: linter
uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0
permissions:
actions: read
contents: read
issues: write
packages: read
pull-requests: write
security-events: write
statuses: write

continuous-integration:
name: CI (${{ matrix.directory }})
strategy:
fail-fast: false
matrix:
directory:
- actions/lint
- actions/package/restore
- actions/release/finalize
- actions/release/prepare
- actions/release/verify
- actions/test
uses: $/.github/workflows/continuous-integration.yml
permissions:
actions: read
contents: read
packages: read
security-events: write
with:
working-directory: ${{ matrix.directory }}
code-ql: ${{ strategy.job-index == 0 && 'typescript' || '' }}
dependency-review: ${{ strategy.job-index == 0 }}

test-release:
name: Test release preparation and recovery
uses: $/.github/workflows/__test-release.yml
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: write
security-events: write

test-action-dependencies-cache:
name: Test action "dependencies-cache"
needs: lint
uses: $/.github/workflows/__test-action-dependencies-cache.yml
permissions:
actions: read
contents: read

test-action-get-package-manager:
name: Test action "get-package-manager"
needs: lint
uses: $/.github/workflows/__test-action-get-package-manager.yml
permissions:
actions: read
contents: read

test-action-has-installed-dependencies:
name: Test action "has-installed-dependencies"
needs: lint
uses: $/.github/workflows/__test-action-has-installed-dependencies.yml
permissions:
actions: read
contents: read

test-action-package-create:
name: Test action "package/create"
needs: lint
uses: $/.github/workflows/__test-action-package-create.yml
permissions:
actions: read
contents: read

test-action-package-test:
name: Test action "package/test"
needs: lint
uses: $/.github/workflows/__test-action-package-test.yml
permissions:
actions: read
contents: read

test-action-package-discover:
name: Test action "package/discover"
needs: lint
uses: $/.github/workflows/__test-action-package-discover.yml
permissions:
actions: read
contents: read

test-action-setup-node:
name: Test action "setup-node"
needs: lint
uses: $/.github/workflows/__test-action-setup-node.yml
permissions:
actions: read
contents: read

test-action-package-publish:
name: Test action "package/publish"
needs: lint
uses: $/.github/workflows/__test-action-package-publish.yml
permissions:
actions: read
contents: read

test-workflow-continuous-integration:
name: Test workflow "continuous-integration"
needs: lint
uses: $/.github/workflows/__test-workflow-continuous-integration.yml
permissions:
actions: read
attestations: write
contents: read
packages: write
pull-requests: write
id-token: write
issues: read
security-events: write

test-action-test:
needs: lint
uses: $/.github/workflows/__test-action-test.yml
permissions:
actions: read
contents: read
packages: read
security-events: write

test-action-lint:
needs: lint
uses: $/.github/workflows/__test-action-lint.yml
permissions:
actions: read
contents: read
packages: read
security-events: write
22 changes: 22 additions & 0 deletions .github/workflows/__commit-action-distributions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Internal - Commit action distributions

on: # zizmor: ignore[dangerous-triggers] Trusted writer validates origin, actor, PR head and paths; it never executes PR code.
workflow_run:
workflows: [Internal - Pull request - Continuous Integration]
types: [completed]

permissions: {}

jobs:
distributions:
uses: hoverkraft-tech/ci-github-common/.github/workflows/action-distributions.yml@f19f395c695e952a5b751b107db5a3e50807a74f # PR #701 (unreleased)
permissions:
actions: read
contents: read
pull-requests: read
with:
pull-request-authors: |
["dependabot", "renovate", "hoverkraft"]
github-app-client-id: ${{ vars.CI_BOT_APP_CLIENT_ID }}
secrets:
github-app-key: ${{ secrets.CI_BOT_APP_PRIVATE_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/__greetings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions: {}

jobs:
greetings:
uses: hoverkraft-tech/ci-github-common/.github/workflows/greetings.yml@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3
uses: hoverkraft-tech/ci-github-common/.github/workflows/greetings.yml@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0
permissions:
contents: read
issues: write
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/__main-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
issues: write
security-events: write
statuses: write
code-quality: write
# jscpd:ignore-end

release:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/__need-fix-to-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ permissions: {}

jobs:
main:
uses: hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3
uses: hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0
permissions:
contents: read
issues: write
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/__pull-request-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ jobs:
issues: write
security-events: write
statuses: write
code-quality: write
# jscpd:ignore-end
1 change: 1 addition & 0 deletions .github/workflows/__release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
issues: write
security-events: write
statuses: write
code-quality: write

release:
name: Create and publish release
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/__semantic-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
main:
permissions:
contents: read
uses: hoverkraft-tech/ci-github-common/.github/workflows/semantic-pull-request.yml@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3
uses: hoverkraft-tech/ci-github-common/.github/workflows/semantic-pull-request.yml@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0
118 changes: 18 additions & 100 deletions .github/workflows/__shared-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,120 +6,38 @@ on:
permissions: {}

jobs:
lint:
name: linter
uses: hoverkraft-tech/ci-github-common/.github/workflows/linter.yml@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3
checks:
uses: $/.github/workflows/__checks.yml
permissions:
actions: read
contents: read
issues: write
packages: read
packages: write
pull-requests: write
security-events: write
statuses: write
with:
comment: false

test-release:
name: Test release preparation and recovery
uses: $/.github/workflows/__test-release.yml
permissions:
actions: read
contents: read
id-token: write
packages: read
pull-requests: write
security-events: write

test-action-dependencies-cache:
name: Test action "dependencies-cache"
needs: lint
uses: $/.github/workflows/__test-action-dependencies-cache.yml
permissions:
contents: read

test-action-get-package-manager:
name: Test action "get-package-manager"
needs: lint
uses: $/.github/workflows/__test-action-get-package-manager.yml
permissions:
contents: read

test-action-has-installed-dependencies:
name: Test action "has-installed-dependencies"
needs: lint
uses: $/.github/workflows/__test-action-has-installed-dependencies.yml
permissions:
contents: read

test-action-package-create:
name: Test action "package/create"
needs: lint
uses: $/.github/workflows/__test-action-package-create.yml
permissions:
contents: read

test-action-package-test:
name: Test action "package/test"
needs: lint
uses: $/.github/workflows/__test-action-package-test.yml
permissions:
contents: read

test-action-package-discover:
name: Test action "package/discover"
needs: lint
uses: $/.github/workflows/__test-action-package-discover.yml
permissions:
contents: read

test-action-setup-node:
name: Test action "setup-node"
needs: lint
uses: $/.github/workflows/__test-action-setup-node.yml
permissions:
contents: read

test-action-package-publish:
name: Test action "package/publish"
needs: lint
uses: $/.github/workflows/__test-action-package-publish.yml
permissions:
actions: read
contents: read

test-workflow-continuous-integration:
name: Test workflow "continuous-integration"
needs: lint
uses: $/.github/workflows/__test-workflow-continuous-integration.yml
attestations: write
reports:
if: always()
needs: checks
uses: hoverkraft-tech/ci-github-common/.github/workflows/publish-ci-reports.yml@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0
permissions:
actions: read
attestations: write
contents: read
packages: write
pull-requests: write
code-quality: write
id-token: write
issues: read
security-events: write

test-action-test:
needs: lint
uses: $/.github/workflows/__test-action-test.yml
permissions:
contents: read

test-action-lint:
needs: lint
uses: $/.github/workflows/__test-action-lint.yml
permissions:
contents: read

reports:
needs: [lint, test-release]
with:
job-results: ${{ needs.checks.outputs.job-results || toJSON(needs) }}
complete:
name: CI complete
if: always()
uses: hoverkraft-tech/ci-github-common/.github/workflows/ci-reports.yml@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3
permissions:
contents: read
pull-requests: write
needs:
- checks
- reports
uses: hoverkraft-tech/ci-github-common/.github/workflows/check-jobs.yml@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0
permissions: {}
with:
job-results: ${{ toJSON(needs) }}
2 changes: 1 addition & 1 deletion .github/workflows/__stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ permissions: {}

jobs:
main:
uses: hoverkraft-tech/ci-github-common/.github/workflows/stale.yml@af0bdd6313bd49aaf4a8a7f0de005fb0db856b03 # 4.3.3
uses: hoverkraft-tech/ci-github-common/.github/workflows/stale.yml@26f3d6878844ec53849eec6ac75af8d14ea402e9 # 5.0.0
permissions:
issues: write
pull-requests: write
Loading
Loading