@htekdev/actions-debugger 1.0.91 → 1.0.93
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/errors/permissions-auth/github-models-missing-models-read-permission.yml +115 -0
- package/errors/runner-environment/setup-go-gotoolchain-auto-download.yml +122 -0
- package/errors/runner-environment/windows-max-path-260-npm-build-failure.yml +87 -0
- package/errors/silent-failures/pull-request-branches-filter-not-inherited.yml +73 -0
- package/errors/triggers/delete-event-fires-branch-and-tag.yml +75 -0
- package/errors/triggers/deployment-status-all-types-default.yml +123 -0
- package/errors/triggers/pull-request-review-all-types-default.yml +69 -0
- package/errors/yaml-syntax/workflow-call-boolean-input-default-string.yml +122 -0
- package/package.json +1 -1
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
id: permissions-auth-052
|
|
2
|
+
title: 'GitHub Models API in Actions requires models: read permission — not in default GITHUB_TOKEN scopes'
|
|
3
|
+
category: permissions-auth
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- models
|
|
7
|
+
- github-models
|
|
8
|
+
- ai
|
|
9
|
+
- permissions
|
|
10
|
+
- GITHUB_TOKEN
|
|
11
|
+
- 403
|
|
12
|
+
- inference
|
|
13
|
+
patterns:
|
|
14
|
+
- regex: 'models:\s*read'
|
|
15
|
+
flags: 'i'
|
|
16
|
+
- regex: 'Resource not accessible by integration.*model'
|
|
17
|
+
flags: 'i'
|
|
18
|
+
- regex: 'models.*permission.*required|permission.*models.*required'
|
|
19
|
+
flags: 'i'
|
|
20
|
+
- regex: '403.*github\.com/models|github\.com/models.*403'
|
|
21
|
+
flags: 'i'
|
|
22
|
+
error_messages:
|
|
23
|
+
- 'Error: Resource not accessible by integration'
|
|
24
|
+
- '403 Forbidden — models: read permission is required'
|
|
25
|
+
- 'HttpError: 403 Resource not accessible by integration'
|
|
26
|
+
- 'Error: The models permission is required to use the GitHub Models API'
|
|
27
|
+
root_cause: |
|
|
28
|
+
GitHub Models (launched in 2024) provides access to AI inference models (GPT-4o,
|
|
29
|
+
Claude, Llama, etc.) via the GitHub Models API at https://models.inference.ai.azure.com
|
|
30
|
+
and via the GitHub REST API at api.github.com/models. When workflows use these
|
|
31
|
+
endpoints with the GITHUB_TOKEN (for example, via `actions/ai-inference` or via
|
|
32
|
+
`actions/github-script` calling `github.rest.models.*`), the token must have the
|
|
33
|
+
`models: read` permission explicitly declared.
|
|
34
|
+
|
|
35
|
+
The `models: read` permission was introduced as a new GITHUB_TOKEN scope alongside
|
|
36
|
+
the GitHub Models feature. It is NOT included in the default GITHUB_TOKEN permissions
|
|
37
|
+
and is NOT implied by any other existing permission (not `contents: read`, not
|
|
38
|
+
`packages: read`, not `id-token: write`).
|
|
39
|
+
|
|
40
|
+
Common failure patterns:
|
|
41
|
+
1. Adding an AI inference step or action to an existing workflow that has a
|
|
42
|
+
permissions: block — the block narrows all unspecified permissions to none,
|
|
43
|
+
and models: read was never added.
|
|
44
|
+
2. Using GitHub Models for the first time in a workflow that relies on the
|
|
45
|
+
repository's default "Read and write" permissions — models: read is not
|
|
46
|
+
included even in the broadest default permission set.
|
|
47
|
+
3. Reusable workflow callers that use `secrets: inherit` but do NOT pass through
|
|
48
|
+
permissions — the called workflow must declare its own `models: read`.
|
|
49
|
+
4. Fine-grained PATs used as a token override: the PAT must have the "Models: read"
|
|
50
|
+
resource permission enabled for the target repository or organization.
|
|
51
|
+
|
|
52
|
+
The error message "Resource not accessible by integration" is the same 403 error
|
|
53
|
+
used for other missing permissions, making it hard to identify models: read as the
|
|
54
|
+
specific missing scope without checking the API response body.
|
|
55
|
+
fix: |
|
|
56
|
+
Add `models: read` to the `permissions:` block of the job (or workflow) that calls
|
|
57
|
+
the GitHub Models API. If using a fine-grained PAT instead of GITHUB_TOKEN, ensure
|
|
58
|
+
the PAT has the "Models" permission enabled.
|
|
59
|
+
fix_code:
|
|
60
|
+
- language: yaml
|
|
61
|
+
label: 'Add models: read to job permissions for AI inference steps'
|
|
62
|
+
code: |
|
|
63
|
+
jobs:
|
|
64
|
+
ai-analysis:
|
|
65
|
+
runs-on: ubuntu-latest
|
|
66
|
+
permissions:
|
|
67
|
+
contents: read
|
|
68
|
+
models: read # Required for GitHub Models API access
|
|
69
|
+
steps:
|
|
70
|
+
- uses: actions/checkout@v4
|
|
71
|
+
- name: Run AI inference via GitHub Models
|
|
72
|
+
uses: actions/ai-inference@v1
|
|
73
|
+
with:
|
|
74
|
+
model: openai/gpt-4o
|
|
75
|
+
system-prompt: 'You are a code reviewer. Be concise.'
|
|
76
|
+
user-prompt: 'Review the changes in this PR for security issues.'
|
|
77
|
+
- language: yaml
|
|
78
|
+
label: 'Workflow with multiple permissions including models: read'
|
|
79
|
+
code: |
|
|
80
|
+
on:
|
|
81
|
+
pull_request:
|
|
82
|
+
|
|
83
|
+
permissions:
|
|
84
|
+
contents: read
|
|
85
|
+
pull-requests: write
|
|
86
|
+
models: read # Required for any AI model inference step
|
|
87
|
+
|
|
88
|
+
jobs:
|
|
89
|
+
review:
|
|
90
|
+
runs-on: ubuntu-latest
|
|
91
|
+
steps:
|
|
92
|
+
- uses: actions/checkout@v4
|
|
93
|
+
- name: AI code review
|
|
94
|
+
uses: actions/github-script@v7
|
|
95
|
+
with:
|
|
96
|
+
script: |
|
|
97
|
+
// github.rest.models requires models: read permission
|
|
98
|
+
const response = await github.request('POST /repos/{owner}/{repo}/actions/generate-summary', {
|
|
99
|
+
owner: context.repo.owner,
|
|
100
|
+
repo: context.repo.repo
|
|
101
|
+
});
|
|
102
|
+
prevention:
|
|
103
|
+
- "Always add `models: read` to the permissions block when using GitHub Models API, AI inference actions, or any `github.rest.models.*` API calls"
|
|
104
|
+
- "The `models: read` scope is not inherited, implied, or included in any default permission set — it must be declared explicitly"
|
|
105
|
+
- "When upgrading a workflow to add AI features, audit the existing permissions: block and add models: read before deploying"
|
|
106
|
+
- "Fine-grained PATs used as token overrides must explicitly include the Models permission for the relevant repositories"
|
|
107
|
+
docs:
|
|
108
|
+
- url: 'https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/controlling-permissions-for-github_token'
|
|
109
|
+
label: 'GitHub Docs: Controlling permissions for GITHUB_TOKEN — available scopes'
|
|
110
|
+
- url: 'https://docs.github.com/en/github-models/use-github-models/integrating-ai-models-into-your-application'
|
|
111
|
+
label: 'GitHub Docs: Using GitHub Models — authentication and permissions'
|
|
112
|
+
- url: 'https://github.com/actions/ai-inference'
|
|
113
|
+
label: 'actions/ai-inference — GitHub Models inference action'
|
|
114
|
+
- url: 'https://github.com/marketplace/actions/ai-inference'
|
|
115
|
+
label: 'GitHub Marketplace: AI Inference action'
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
id: runner-environment-159
|
|
2
|
+
title: 'setup-go@v5 with Go 1.21+ toolchain directive — GOTOOLCHAIN=auto downloads newer Go toolchain mid-CI'
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: warning
|
|
5
|
+
tags:
|
|
6
|
+
- setup-go
|
|
7
|
+
- go
|
|
8
|
+
- gotoolchain
|
|
9
|
+
- toolchain-directive
|
|
10
|
+
- go-version
|
|
11
|
+
- network
|
|
12
|
+
- go-mod
|
|
13
|
+
patterns:
|
|
14
|
+
- regex: 'go: downloading go1\.\d+\.\d+ \(linux/amd64\)'
|
|
15
|
+
flags: 'i'
|
|
16
|
+
- regex: 'go: module requires GOTOOLCHAIN at least go1\.'
|
|
17
|
+
flags: 'i'
|
|
18
|
+
- regex: 'go: toolchain.*not available'
|
|
19
|
+
flags: 'i'
|
|
20
|
+
- regex: 'toolchain go1\.\d+\.\d+ required, have go1\.'
|
|
21
|
+
flags: 'i'
|
|
22
|
+
error_messages:
|
|
23
|
+
- 'go: downloading go1.22.3 (linux/amd64)'
|
|
24
|
+
- 'go: module requires GOTOOLCHAIN at least go1.22.0'
|
|
25
|
+
- 'go: toolchain download not available: dial tcp: lookup proxy.golang.org: no such host'
|
|
26
|
+
- 'toolchain go1.22.3 required, have go1.21.13'
|
|
27
|
+
root_cause: |
|
|
28
|
+
Go 1.21 introduced the `toolchain` directive in `go.mod` and `go.sum`, along with the
|
|
29
|
+
`GOTOOLCHAIN` environment variable that controls toolchain version management. The default
|
|
30
|
+
value `GOTOOLCHAIN=auto` causes the Go runtime to automatically download a newer Go
|
|
31
|
+
toolchain if the installed version is older than the version specified by the `toolchain`
|
|
32
|
+
directive (or the `go` directive when no explicit `toolchain` key exists).
|
|
33
|
+
|
|
34
|
+
When `actions/setup-go@v5` installs Go 1.21.x but the project's `go.mod` contains:
|
|
35
|
+
toolchain go1.22.3
|
|
36
|
+
Go will automatically attempt to download the go1.22.3 toolchain from proxy.golang.org
|
|
37
|
+
at runtime — during `go build`, `go test`, or any go command. This download adds
|
|
38
|
+
15-120 seconds to CI jobs and can fail entirely in:
|
|
39
|
+
- Self-hosted runners in air-gapped or network-restricted environments
|
|
40
|
+
- Runners with strict egress firewall rules blocking proxy.golang.org
|
|
41
|
+
- Flaky network conditions during toolchain resolution
|
|
42
|
+
|
|
43
|
+
The behavior is often invisible in logs because the download proceeds silently before
|
|
44
|
+
each `go` invocation. The symptom is slower-than-expected build times or a cryptic
|
|
45
|
+
`dial tcp: lookup proxy.golang.org: no such host` error that appears unrelated to
|
|
46
|
+
the Go version.
|
|
47
|
+
|
|
48
|
+
Note: This is distinct from the Go 1.23 telemetry cache tar collision
|
|
49
|
+
(runner-environment-041). That is a cache restore bug; this is an unexpected network
|
|
50
|
+
download triggered by the toolchain directive.
|
|
51
|
+
fix: |
|
|
52
|
+
Option 1 (recommended): Set `GOTOOLCHAIN=local` to prevent auto-downloads and fail fast
|
|
53
|
+
if the installed version doesn't satisfy the toolchain directive. Then configure
|
|
54
|
+
`actions/setup-go@v5` to install exactly the required Go version.
|
|
55
|
+
|
|
56
|
+
Option 2: Use `go-version-file: go.mod` so that setup-go installs the exact Go version
|
|
57
|
+
matching the `go` line in go.mod — ensure this matches or exceeds the `toolchain`
|
|
58
|
+
directive to prevent downloads.
|
|
59
|
+
|
|
60
|
+
Option 3: Remove the `toolchain` directive from `go.mod` if it is not intentionally
|
|
61
|
+
pinning a minimum toolchain version. The directive was added automatically by
|
|
62
|
+
`go mod tidy` in Go 1.21+ and many projects don't need it.
|
|
63
|
+
fix_code:
|
|
64
|
+
- language: yaml
|
|
65
|
+
label: 'Set GOTOOLCHAIN=local to prevent mid-CI toolchain downloads'
|
|
66
|
+
code: |
|
|
67
|
+
jobs:
|
|
68
|
+
build:
|
|
69
|
+
runs-on: ubuntu-latest
|
|
70
|
+
env:
|
|
71
|
+
GOTOOLCHAIN: local # Never auto-download; use only the installed toolchain
|
|
72
|
+
steps:
|
|
73
|
+
- uses: actions/checkout@v4
|
|
74
|
+
- uses: actions/setup-go@v5
|
|
75
|
+
with:
|
|
76
|
+
go-version: '1.22.x' # Install the exact version needed by go.mod
|
|
77
|
+
cache: true
|
|
78
|
+
- run: go build ./...
|
|
79
|
+
- language: yaml
|
|
80
|
+
label: 'Use go-version-file to pin version from go.mod'
|
|
81
|
+
code: |
|
|
82
|
+
jobs:
|
|
83
|
+
build:
|
|
84
|
+
runs-on: ubuntu-latest
|
|
85
|
+
env:
|
|
86
|
+
GOTOOLCHAIN: local
|
|
87
|
+
steps:
|
|
88
|
+
- uses: actions/checkout@v4
|
|
89
|
+
- uses: actions/setup-go@v5
|
|
90
|
+
with:
|
|
91
|
+
go-version-file: go.mod # Reads 'go' directive from go.mod
|
|
92
|
+
cache: true
|
|
93
|
+
# go.mod should specify 'go 1.22.3' matching or exceeding the toolchain directive
|
|
94
|
+
- run: go build ./...
|
|
95
|
+
- language: yaml
|
|
96
|
+
label: 'Remove toolchain directive from go.mod to avoid the download trigger'
|
|
97
|
+
code: |
|
|
98
|
+
# In go.mod, remove the toolchain line if your project does not require a
|
|
99
|
+
# minimum toolchain version beyond what setup-go installs:
|
|
100
|
+
# BEFORE (triggers GOTOOLCHAIN=auto download):
|
|
101
|
+
# go 1.21
|
|
102
|
+
# toolchain go1.22.3
|
|
103
|
+
#
|
|
104
|
+
# AFTER (no automatic download):
|
|
105
|
+
# go 1.22.3
|
|
106
|
+
# (no toolchain directive)
|
|
107
|
+
#
|
|
108
|
+
# Run `go mod tidy` with GOTOOLCHAIN=local after editing go.mod to clean up.
|
|
109
|
+
prevention:
|
|
110
|
+
- "Set `GOTOOLCHAIN: local` as a job-level env var in all Go workflows to prevent unexpected toolchain downloads"
|
|
111
|
+
- "When upgrading Go versions, use `go-version-file: go.mod` in setup-go so CI always installs the correct version"
|
|
112
|
+
- "After running `go mod tidy` locally with Go 1.21+, check whether a `toolchain` directive was added to go.mod before committing"
|
|
113
|
+
- "In air-gapped environments, always set GOTOOLCHAIN=local and pre-bake the required toolchain into the self-hosted runner image"
|
|
114
|
+
docs:
|
|
115
|
+
- url: 'https://go.dev/doc/toolchain'
|
|
116
|
+
label: 'Go Toolchains — official documentation for GOTOOLCHAIN and toolchain directive'
|
|
117
|
+
- url: 'https://go.dev/blog/toolchain'
|
|
118
|
+
label: 'Go Blog: Go Toolchains (Go 1.21 announcement)'
|
|
119
|
+
- url: 'https://github.com/actions/setup-go/blob/main/README.md'
|
|
120
|
+
label: 'actions/setup-go README — go-version-file input'
|
|
121
|
+
- url: 'https://pkg.go.dev/cmd/go#hdr-Go_toolchain_management'
|
|
122
|
+
label: 'go command: toolchain management — GOTOOLCHAIN environment variable'
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
id: runner-environment-158
|
|
2
|
+
title: 'Windows MAX_PATH 260-character limit causes npm and build tool failures'
|
|
3
|
+
category: runner-environment
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- windows
|
|
7
|
+
- max-path
|
|
8
|
+
- npm
|
|
9
|
+
- node_modules
|
|
10
|
+
- path-length
|
|
11
|
+
- enoent
|
|
12
|
+
- build
|
|
13
|
+
patterns:
|
|
14
|
+
- regex: 'The filename or extension is too long'
|
|
15
|
+
flags: 'i'
|
|
16
|
+
- regex: 'ENOENT.*node_modules.*node_modules'
|
|
17
|
+
flags: 'i'
|
|
18
|
+
- regex: 'error MSB3095.*path.*too long'
|
|
19
|
+
flags: 'i'
|
|
20
|
+
- regex: 'The system cannot find the path specified'
|
|
21
|
+
flags: 'i'
|
|
22
|
+
error_messages:
|
|
23
|
+
- "The filename or extension is too long."
|
|
24
|
+
- "ENOENT: no such file or directory, open 'C:\\Users\\runner\\work\\..."
|
|
25
|
+
- "error MSB3095: Invalid argument. 'path' is too long."
|
|
26
|
+
- "npm ERR! path C:\\Users\\runner\\work\\..."
|
|
27
|
+
root_cause: |
|
|
28
|
+
Windows enforces a 260-character maximum path length (MAX_PATH) inherited from
|
|
29
|
+
the Win32 API. Deep node_modules dependency trees easily exceed this limit: the
|
|
30
|
+
GitHub-hosted runner workspace is already at
|
|
31
|
+
C:\Users\runner\work\<repository>\<repository>\ (~50 characters) before any
|
|
32
|
+
source files are added. A typical transitive npm dependency path like
|
|
33
|
+
node_modules\pkg\node_modules\sub\node_modules\deep\index.js can push the total
|
|
34
|
+
well past 260 characters. MSBuild, Java build tools, and other Windows toolchains
|
|
35
|
+
have the same limitation.
|
|
36
|
+
|
|
37
|
+
GitHub-hosted Windows runners (windows-2022, windows-latest) have the
|
|
38
|
+
LongPathsEnabled registry key set to 1 at the OS level, but Git must still be
|
|
39
|
+
separately configured with core.longpaths = true, and some Node.js internal APIs
|
|
40
|
+
call the legacy Win32 CreateFile path which ignores the registry opt-in unless
|
|
41
|
+
the application explicitly declares long-path awareness in its executable manifest.
|
|
42
|
+
The result is ENOENT or "path too long" failures that appear to indicate missing
|
|
43
|
+
files rather than a path-length limit.
|
|
44
|
+
fix: |
|
|
45
|
+
Option 1 (most effective): Use a short path: in actions/checkout to reduce the
|
|
46
|
+
base path length. path: a sets the workspace to C:\...\work\repo\a.
|
|
47
|
+
Option 2: Configure Git long paths and use --legacy-peer-deps to flatten
|
|
48
|
+
npm dependency nesting.
|
|
49
|
+
Option 3: Shorten the repository name, which directly reduces the workspace
|
|
50
|
+
path length.
|
|
51
|
+
fix_code:
|
|
52
|
+
- language: yaml
|
|
53
|
+
label: 'Use short checkout path to reduce base path length'
|
|
54
|
+
code: |
|
|
55
|
+
jobs:
|
|
56
|
+
build:
|
|
57
|
+
runs-on: windows-latest
|
|
58
|
+
steps:
|
|
59
|
+
- uses: actions/checkout@v4
|
|
60
|
+
with:
|
|
61
|
+
path: a # Reduces base path by ~20-30 characters vs default
|
|
62
|
+
- run: npm ci
|
|
63
|
+
working-directory: a
|
|
64
|
+
- language: yaml
|
|
65
|
+
label: 'Enable Git long paths and flatten npm tree'
|
|
66
|
+
code: |
|
|
67
|
+
jobs:
|
|
68
|
+
build:
|
|
69
|
+
runs-on: windows-latest
|
|
70
|
+
steps:
|
|
71
|
+
- name: Configure Git long paths
|
|
72
|
+
run: git config --global core.longpaths true
|
|
73
|
+
- uses: actions/checkout@v4
|
|
74
|
+
- name: Install with flattened dependencies
|
|
75
|
+
run: npm ci --legacy-peer-deps
|
|
76
|
+
prevention:
|
|
77
|
+
- 'Use path: a (or another single-char name) in actions/checkout to reduce baseline path length on Windows'
|
|
78
|
+
- 'Keep GitHub repository names short when Windows CI is required'
|
|
79
|
+
- 'Avoid deeply nested workspace directory structures'
|
|
80
|
+
- 'Run npm ci --legacy-peer-deps to reduce node_modules nesting on npm 7+ which introduced deeper trees'
|
|
81
|
+
docs:
|
|
82
|
+
- url: 'https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation'
|
|
83
|
+
label: 'Microsoft Docs: Maximum file path limitation (MAX_PATH)'
|
|
84
|
+
- url: 'https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreprotectNTFS'
|
|
85
|
+
label: 'Git: core.longpaths config'
|
|
86
|
+
- url: 'https://docs.npmjs.com/cli/v10/commands/npm-ci'
|
|
87
|
+
label: 'npm ci — clean install'
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
id: silent-failures-086
|
|
2
|
+
title: 'on.pull_request does not inherit branches filter from sibling on.push trigger'
|
|
3
|
+
category: silent-failures
|
|
4
|
+
severity: silent-failure
|
|
5
|
+
tags:
|
|
6
|
+
- pull_request
|
|
7
|
+
- push
|
|
8
|
+
- branches-filter
|
|
9
|
+
- trigger
|
|
10
|
+
- unexpected-runs
|
|
11
|
+
- filter-inheritance
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: 'on:\s*\n\s*push:\s*\n\s*branches:\s*\n.*\n\s*pull_request:\s*\n(?!\s*branches:)'
|
|
14
|
+
flags: 'ms'
|
|
15
|
+
error_messages: []
|
|
16
|
+
root_cause: |
|
|
17
|
+
When a workflow defines multiple triggers under on:, each trigger's configuration
|
|
18
|
+
is fully independent — there is no filter inheritance between sibling triggers.
|
|
19
|
+
A common pattern is to restrict on.push to specific branches (e.g., main,
|
|
20
|
+
release/**) while adding on.pull_request with no branches: key, expecting the
|
|
21
|
+
PR trigger to respect the same branch scope.
|
|
22
|
+
|
|
23
|
+
In YAML mapping semantics, on.push.branches: [main] applies exclusively to push
|
|
24
|
+
events. on.pull_request with no branches: key means "trigger for pull requests
|
|
25
|
+
targeting ANY branch in the repository." This causes the workflow to run on every
|
|
26
|
+
PR opened against feature branches, release candidates, or any other branch —
|
|
27
|
+
running expensive CI on PRs the developer intended to exclude.
|
|
28
|
+
|
|
29
|
+
The GitHub Actions UI shows these runs as triggered by pull_request with no
|
|
30
|
+
indication that the branches: filter was missing. The behavior appears correct
|
|
31
|
+
(workflow ran) but occurs on unintended PRs.
|
|
32
|
+
fix: |
|
|
33
|
+
Explicitly add a branches: filter to on.pull_request that defines the target
|
|
34
|
+
branches for which CI should run. Note that on.pull_request.branches matches the
|
|
35
|
+
BASE branch (the branch the PR targets), not the head/feature branch.
|
|
36
|
+
fix_code:
|
|
37
|
+
- language: yaml
|
|
38
|
+
label: 'Explicit branches filter on both triggers'
|
|
39
|
+
code: |
|
|
40
|
+
on:
|
|
41
|
+
push:
|
|
42
|
+
branches: [main, 'release/**']
|
|
43
|
+
pull_request:
|
|
44
|
+
branches: [main, 'release/**'] # Required — NOT inherited from on.push
|
|
45
|
+
jobs:
|
|
46
|
+
ci:
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
steps:
|
|
49
|
+
- run: npm test
|
|
50
|
+
- language: yaml
|
|
51
|
+
label: 'Common mistake — missing branches on pull_request'
|
|
52
|
+
code: |
|
|
53
|
+
# WRONG — pull_request triggers for ALL target branches
|
|
54
|
+
on:
|
|
55
|
+
push:
|
|
56
|
+
branches: [main]
|
|
57
|
+
pull_request: # No branches filter — triggers for every PR
|
|
58
|
+
# CORRECT
|
|
59
|
+
on:
|
|
60
|
+
push:
|
|
61
|
+
branches: [main]
|
|
62
|
+
pull_request:
|
|
63
|
+
branches: [main] # Only PRs targeting main
|
|
64
|
+
prevention:
|
|
65
|
+
- 'Review each trigger block independently — on.push and on.pull_request filters are never shared'
|
|
66
|
+
- 'Add an explicit branches: under on.pull_request whenever you use branches: under on.push'
|
|
67
|
+
- 'Remember: on.pull_request.branches matches the BASE branch of the PR, not the feature branch'
|
|
68
|
+
- 'Use actionlint to validate trigger configurations before committing'
|
|
69
|
+
docs:
|
|
70
|
+
- url: 'https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#using-filters'
|
|
71
|
+
label: 'GitHub Docs: Using filters — each trigger is configured independently'
|
|
72
|
+
- url: 'https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onpull_requestpull_request_targetbranchesbranches-ignore'
|
|
73
|
+
label: 'GitHub Actions: pull_request branches filter matches base branch'
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
id: triggers-061
|
|
2
|
+
title: 'on.delete fires for branch and tag deletion — no ref_type filter at trigger level'
|
|
3
|
+
category: triggers
|
|
4
|
+
severity: silent-failure
|
|
5
|
+
tags:
|
|
6
|
+
- delete
|
|
7
|
+
- ref_type
|
|
8
|
+
- branch
|
|
9
|
+
- tag
|
|
10
|
+
- unexpected-runs
|
|
11
|
+
patterns:
|
|
12
|
+
- regex: 'on:\s*\n\s*delete:'
|
|
13
|
+
flags: 'ms'
|
|
14
|
+
error_messages: []
|
|
15
|
+
root_cause: |
|
|
16
|
+
The on.delete event fires whenever any branch or tag is deleted in the repository.
|
|
17
|
+
Unlike some events that support a types: activity filter, on.delete has no types
|
|
18
|
+
option — there is no trigger-level way to restrict it to branch deletions only or
|
|
19
|
+
tag deletions only. Workflows that perform branch-specific cleanup (removing
|
|
20
|
+
temporary deployment environments, rotating secrets, updating external project
|
|
21
|
+
boards, or archiving feature branch artifacts) run for EVERY tag deletion as well,
|
|
22
|
+
unless an explicit runtime condition is added inside the workflow.
|
|
23
|
+
|
|
24
|
+
The on.create event has the same dual-fire behavior (documented separately). Both
|
|
25
|
+
events expose github.event.ref_type in the workflow context as either 'branch' or
|
|
26
|
+
'tag', but this value is only available inside the workflow body — it cannot be
|
|
27
|
+
used as a trigger-level filter.
|
|
28
|
+
|
|
29
|
+
A common scenario: a workflow cleans up branch-specific cloud environments on
|
|
30
|
+
delete. When a developer deletes the release tag v1.2.3, the workflow fires
|
|
31
|
+
unexpectedly — potentially tearing down a production environment that was deployed
|
|
32
|
+
from that tag.
|
|
33
|
+
fix: |
|
|
34
|
+
Add an if: condition using github.event.ref_type to guard jobs or steps that
|
|
35
|
+
should only execute for one type of deletion. Use 'branch' or 'tag' as the
|
|
36
|
+
comparison value.
|
|
37
|
+
fix_code:
|
|
38
|
+
- language: yaml
|
|
39
|
+
label: 'Guard cleanup by ref_type at the job level'
|
|
40
|
+
code: |
|
|
41
|
+
on:
|
|
42
|
+
delete:
|
|
43
|
+
jobs:
|
|
44
|
+
cleanup-branch-environment:
|
|
45
|
+
# Only run for branch deletions — skip tag deletions
|
|
46
|
+
if: github.event.ref_type == 'branch'
|
|
47
|
+
runs-on: ubuntu-latest
|
|
48
|
+
steps:
|
|
49
|
+
- name: Remove branch-specific deployment
|
|
50
|
+
run: echo "Cleaning up env for branch ${{ github.event.ref }}"
|
|
51
|
+
- language: yaml
|
|
52
|
+
label: 'Separate jobs for branch vs tag deletion'
|
|
53
|
+
code: |
|
|
54
|
+
on:
|
|
55
|
+
delete:
|
|
56
|
+
jobs:
|
|
57
|
+
cleanup-branch:
|
|
58
|
+
if: github.event.ref_type == 'branch'
|
|
59
|
+
runs-on: ubuntu-latest
|
|
60
|
+
steps:
|
|
61
|
+
- run: echo "Branch deleted ${{ github.event.ref }}"
|
|
62
|
+
cleanup-tag:
|
|
63
|
+
if: github.event.ref_type == 'tag'
|
|
64
|
+
runs-on: ubuntu-latest
|
|
65
|
+
steps:
|
|
66
|
+
- run: echo "Tag deleted ${{ github.event.ref }}"
|
|
67
|
+
prevention:
|
|
68
|
+
- 'Always guard on.delete workflow jobs with if: github.event.ref_type == ''branch'' or ''tag'''
|
|
69
|
+
- 'Be aware that on.create has the same behavior — both create and delete fire for branches and tags'
|
|
70
|
+
- 'Test delete workflows by deleting both a branch and a tag to verify they behave as expected'
|
|
71
|
+
docs:
|
|
72
|
+
- url: 'https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#delete'
|
|
73
|
+
label: 'GitHub Docs: delete event — fires for branches and tags'
|
|
74
|
+
- url: 'https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/contexts#github-context'
|
|
75
|
+
label: 'GitHub Docs: github.event.ref_type context'
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
id: triggers-063
|
|
2
|
+
title: 'on.deployment_status fires for all deployment lifecycle statuses by default — add types: to filter'
|
|
3
|
+
category: triggers
|
|
4
|
+
severity: warning
|
|
5
|
+
tags:
|
|
6
|
+
- deployment_status
|
|
7
|
+
- deployment
|
|
8
|
+
- event-types
|
|
9
|
+
- trigger
|
|
10
|
+
- duplicate-runs
|
|
11
|
+
- types-filter
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: 'on:\s*\n\s*deployment_status:'
|
|
14
|
+
flags: 'ms'
|
|
15
|
+
- regex: 'deployment_status:\s*$'
|
|
16
|
+
flags: 'i'
|
|
17
|
+
error_messages:
|
|
18
|
+
- '(no error — workflow fires unexpectedly multiple times per deployment)'
|
|
19
|
+
root_cause: |
|
|
20
|
+
The `on.deployment_status` event fires whenever the status of a deployment changes.
|
|
21
|
+
A single end-to-end deployment lifecycle emits SIX distinct status events in sequence:
|
|
22
|
+
created → queued → in_progress → success (or failure / error)
|
|
23
|
+
Plus `inactive` when an older deployment is superseded by a new one.
|
|
24
|
+
|
|
25
|
+
When a workflow uses `on: deployment_status:` without a `types:` filter, it runs for
|
|
26
|
+
EVERY one of these status transitions. For a typical deployment:
|
|
27
|
+
- GitHub creates the deployment (fires `deployment_status` with state `created`)
|
|
28
|
+
- The deployment starts running (fires `in_progress`)
|
|
29
|
+
- The deployment completes (fires `success`)
|
|
30
|
+
- Any prior deployment for the same environment becomes inactive (fires `inactive`)
|
|
31
|
+
|
|
32
|
+
This causes a workflow to run 3-4 times per deployment. Common consequences:
|
|
33
|
+
- Post-deployment smoke tests run before the deployment is complete (`in_progress` run)
|
|
34
|
+
- Notification steps send duplicate Slack/email messages for each status transition
|
|
35
|
+
- Downstream `workflow_run` triggers fire multiple times, causing race conditions
|
|
36
|
+
- GitHub-billed Actions minutes are wasted on unwanted runs
|
|
37
|
+
|
|
38
|
+
The `deployment_status` event does not have sensible defaults for status filtering —
|
|
39
|
+
unlike `pull_request` (which defaults to `opened`, `synchronize`, `reopened`),
|
|
40
|
+
`deployment_status` has no default type filter and fires for everything.
|
|
41
|
+
|
|
42
|
+
Note: This is analogous to `on.pull_request_review` firing for all review types by
|
|
43
|
+
default (documented in triggers-062). Both events require explicit `types:` filters
|
|
44
|
+
to limit scope to meaningful actions.
|
|
45
|
+
fix: |
|
|
46
|
+
Add a `types:` filter to `on.deployment_status` to limit which status transitions
|
|
47
|
+
trigger the workflow. For most use cases:
|
|
48
|
+
- Post-deployment tests: use `types: [success]`
|
|
49
|
+
- Deployment monitoring: use `types: [failure, error]`
|
|
50
|
+
- Full lifecycle tracking: use `types: [in_progress, success, failure, error]`
|
|
51
|
+
|
|
52
|
+
Additionally, add an `if:` condition using `github.event.deployment_status.state`
|
|
53
|
+
for fine-grained control when multiple types are needed.
|
|
54
|
+
fix_code:
|
|
55
|
+
- language: yaml
|
|
56
|
+
label: 'Filter to success only — post-deployment smoke tests'
|
|
57
|
+
code: |
|
|
58
|
+
on:
|
|
59
|
+
deployment_status:
|
|
60
|
+
types:
|
|
61
|
+
- success # Only runs when deployment reaches success state
|
|
62
|
+
|
|
63
|
+
jobs:
|
|
64
|
+
smoke-test:
|
|
65
|
+
runs-on: ubuntu-latest
|
|
66
|
+
steps:
|
|
67
|
+
- name: Run smoke tests against deployed environment
|
|
68
|
+
run: |
|
|
69
|
+
ENV_URL="${{ github.event.deployment_status.environment_url }}"
|
|
70
|
+
echo "Testing $ENV_URL"
|
|
71
|
+
curl -f "$ENV_URL/health"
|
|
72
|
+
- language: yaml
|
|
73
|
+
label: 'Filter to failure and error — deployment monitoring'
|
|
74
|
+
code: |
|
|
75
|
+
on:
|
|
76
|
+
deployment_status:
|
|
77
|
+
types:
|
|
78
|
+
- failure
|
|
79
|
+
- error
|
|
80
|
+
|
|
81
|
+
jobs:
|
|
82
|
+
alert:
|
|
83
|
+
runs-on: ubuntu-latest
|
|
84
|
+
steps:
|
|
85
|
+
- name: Notify on deployment failure
|
|
86
|
+
run: |
|
|
87
|
+
echo "Deployment failed: ${{ github.event.deployment_status.state }}"
|
|
88
|
+
echo "Environment: ${{ github.event.deployment.environment }}"
|
|
89
|
+
- language: yaml
|
|
90
|
+
label: 'Multiple types with runtime if: check for nuanced handling'
|
|
91
|
+
code: |
|
|
92
|
+
on:
|
|
93
|
+
deployment_status:
|
|
94
|
+
types:
|
|
95
|
+
- success
|
|
96
|
+
- failure
|
|
97
|
+
- error
|
|
98
|
+
|
|
99
|
+
jobs:
|
|
100
|
+
post-deploy:
|
|
101
|
+
runs-on: ubuntu-latest
|
|
102
|
+
steps:
|
|
103
|
+
- name: Run tests on success
|
|
104
|
+
if: github.event.deployment_status.state == 'success'
|
|
105
|
+
run: echo "Running post-deployment tests"
|
|
106
|
+
|
|
107
|
+
- name: Alert on failure
|
|
108
|
+
if: |
|
|
109
|
+
github.event.deployment_status.state == 'failure' ||
|
|
110
|
+
github.event.deployment_status.state == 'error'
|
|
111
|
+
run: echo "Alerting on deployment failure"
|
|
112
|
+
prevention:
|
|
113
|
+
- "Always add `types:` to `on.deployment_status` — the default of no filter fires for all 6 status transitions"
|
|
114
|
+
- "Check `github.event.deployment_status.state` in workflow conditions when using multiple status types"
|
|
115
|
+
- "Use `environment_url` from `github.event.deployment_status` to target the correct environment in post-deployment tests"
|
|
116
|
+
- "Monitor your Actions run history after deploying — multiple runs per deployment indicates a missing types: filter"
|
|
117
|
+
docs:
|
|
118
|
+
- url: 'https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#deployment_status'
|
|
119
|
+
label: 'GitHub Docs: deployment_status event — activity types'
|
|
120
|
+
- url: 'https://docs.github.com/en/rest/deployments/statuses?apiVersion=2022-11-28'
|
|
121
|
+
label: 'GitHub REST API: Deployment statuses — state values'
|
|
122
|
+
- url: 'https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/contexts#github-context'
|
|
123
|
+
label: 'GitHub Docs: github.event.deployment_status context fields'
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
id: triggers-062
|
|
2
|
+
title: 'on.pull_request_review fires for all review types (submitted, edited, dismissed) when types is omitted'
|
|
3
|
+
category: triggers
|
|
4
|
+
severity: silent-failure
|
|
5
|
+
tags:
|
|
6
|
+
- pull_request_review
|
|
7
|
+
- review
|
|
8
|
+
- types
|
|
9
|
+
- dismissed
|
|
10
|
+
- submitted
|
|
11
|
+
- unexpected-runs
|
|
12
|
+
patterns:
|
|
13
|
+
- regex: 'on:\s*\n\s*pull_request_review:\s*\n(?!\s*types:)'
|
|
14
|
+
flags: 'ms'
|
|
15
|
+
error_messages: []
|
|
16
|
+
root_cause: |
|
|
17
|
+
The pull_request_review event fires for three activity types:
|
|
18
|
+
- submitted: a new review is posted (approved, changes_requested, or commented)
|
|
19
|
+
- edited: a reviewer edits their review comment text
|
|
20
|
+
- dismissed: an existing approval or changes_requested review is dismissed
|
|
21
|
+
|
|
22
|
+
When on.pull_request_review: is specified without a types: filter, GitHub fires
|
|
23
|
+
the workflow for ALL three activity types. Developers typically use this event to
|
|
24
|
+
trigger a deployment or notification on PR approval. Without types: [submitted],
|
|
25
|
+
the workflow also runs when a reviewer edits their comment spelling or when an
|
|
26
|
+
approval is dismissed by a maintainer — often causing incorrect or failed workflow
|
|
27
|
+
runs in contexts where the PR is no longer in an approved state.
|
|
28
|
+
|
|
29
|
+
This behavior mirrors on.pull_request without types: (which fires for opened,
|
|
30
|
+
synchronize, and reopened by default) but is arguably more surprising because
|
|
31
|
+
"editing a review comment" and "dismissing a review" are far less common
|
|
32
|
+
developer actions than submitting a new review.
|
|
33
|
+
fix: |
|
|
34
|
+
Add types: [submitted] to restrict the trigger to new review submissions.
|
|
35
|
+
If you only want to react to approvals specifically, also add an if: condition
|
|
36
|
+
checking github.event.review.state == 'approved'.
|
|
37
|
+
fix_code:
|
|
38
|
+
- language: yaml
|
|
39
|
+
label: 'Restrict to submitted reviews only'
|
|
40
|
+
code: |
|
|
41
|
+
on:
|
|
42
|
+
pull_request_review:
|
|
43
|
+
types: [submitted] # Only new review submissions — not edited or dismissed
|
|
44
|
+
jobs:
|
|
45
|
+
notify-on-review:
|
|
46
|
+
runs-on: ubuntu-latest
|
|
47
|
+
steps:
|
|
48
|
+
- run: echo "Review state ${{ github.event.review.state }}"
|
|
49
|
+
- language: yaml
|
|
50
|
+
label: 'Trigger only on PR approvals'
|
|
51
|
+
code: |
|
|
52
|
+
on:
|
|
53
|
+
pull_request_review:
|
|
54
|
+
types: [submitted]
|
|
55
|
+
jobs:
|
|
56
|
+
deploy-on-approval:
|
|
57
|
+
if: github.event.review.state == 'approved'
|
|
58
|
+
runs-on: ubuntu-latest
|
|
59
|
+
steps:
|
|
60
|
+
- run: echo "PR approved — proceeding with staging deploy"
|
|
61
|
+
prevention:
|
|
62
|
+
- 'Always specify types: [submitted] under on.pull_request_review unless dismissed or edited is explicitly needed'
|
|
63
|
+
- 'Combine types: [submitted] with if: github.event.review.state == ''approved'' for approval-gated workflows'
|
|
64
|
+
- 'Test pull_request_review workflows by also dismissing reviews to ensure unexpected runs are avoided'
|
|
65
|
+
docs:
|
|
66
|
+
- url: 'https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#pull_request_review'
|
|
67
|
+
label: 'GitHub Docs: pull_request_review event — activity types'
|
|
68
|
+
- url: 'https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request_review'
|
|
69
|
+
label: 'GitHub Webhooks: pull_request_review payload — review.state values'
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
id: yaml-syntax-058
|
|
2
|
+
title: 'on.workflow_call.inputs boolean default must be YAML boolean not a quoted string — default: ''true'' causes validation error'
|
|
3
|
+
category: yaml-syntax
|
|
4
|
+
severity: error
|
|
5
|
+
tags:
|
|
6
|
+
- workflow-call
|
|
7
|
+
- reusable-workflow
|
|
8
|
+
- inputs
|
|
9
|
+
- boolean
|
|
10
|
+
- default
|
|
11
|
+
- validation-error
|
|
12
|
+
- type-mismatch
|
|
13
|
+
patterns:
|
|
14
|
+
- regex: 'Unexpected\s+value\s+''true'''
|
|
15
|
+
flags: 'i'
|
|
16
|
+
- regex: 'Unexpected\s+value\s+''false'''
|
|
17
|
+
flags: 'i'
|
|
18
|
+
- regex: 'on\.workflow_call\.inputs\.[^.]+\.default.*''(?:true|false)'''
|
|
19
|
+
flags: 'i'
|
|
20
|
+
- regex: 'default:\s+''(?:true|false)'''
|
|
21
|
+
flags: 'i'
|
|
22
|
+
error_messages:
|
|
23
|
+
- "Invalid workflow file: .github/workflows/deploy.yml: on.workflow_call.inputs.dry_run.default: Unexpected value 'true'"
|
|
24
|
+
- "Unexpected value 'true'"
|
|
25
|
+
- "Unexpected value 'false'"
|
|
26
|
+
- "on.workflow_call.inputs.X.default: Unexpected value 'true'"
|
|
27
|
+
root_cause: |
|
|
28
|
+
In GitHub Actions, `on.workflow_call.inputs` supports three types: `string`, `boolean`,
|
|
29
|
+
and `number`. When declaring a `type: boolean` input, the `default:` value must be
|
|
30
|
+
a YAML boolean literal (`true` or `false`), NOT a quoted string (`'true'` or `'false'`).
|
|
31
|
+
|
|
32
|
+
Quoted strings ('true', 'false') are YAML string scalars. GitHub Actions validates
|
|
33
|
+
the `default:` value against the declared input `type:`, and when a string is given
|
|
34
|
+
where a boolean is expected, workflow validation fails with:
|
|
35
|
+
"on.workflow_call.inputs.X.default: Unexpected value 'true'"
|
|
36
|
+
|
|
37
|
+
This mistake is extremely common for two reasons:
|
|
38
|
+
1. Developers working with YAML often quote boolean-like values defensively to avoid
|
|
39
|
+
YAML parsing surprises — but in this specific field, the quotes cause the error.
|
|
40
|
+
2. The error message "Unexpected value 'true'" is confusing: `true` is expected, but
|
|
41
|
+
the quotes around it in the error output make it look like 'true' is a bad value,
|
|
42
|
+
not that the quotes themselves are the problem.
|
|
43
|
+
|
|
44
|
+
This is distinct from `silent-failures/workflow-call-boolean-input-string-coercion.yml`
|
|
45
|
+
which covers the receiving side: even when defaults are declared correctly, the called
|
|
46
|
+
workflow receives boolean input values as strings ('true'/'false') in the `inputs`
|
|
47
|
+
context and must compare using `== 'true'` not `== true`. This entry is about the
|
|
48
|
+
DECLARATION error before the workflow even runs.
|
|
49
|
+
fix: |
|
|
50
|
+
Remove the quotes from the `default:` value for `type: boolean` inputs in
|
|
51
|
+
`on.workflow_call.inputs`. Use bare YAML booleans `true` and `false`.
|
|
52
|
+
|
|
53
|
+
If you want to document the type explicitly, add a `description:` field instead of
|
|
54
|
+
relying on the default value to communicate the type.
|
|
55
|
+
fix_code:
|
|
56
|
+
- language: yaml
|
|
57
|
+
label: 'WRONG: quoted string default causes validation error'
|
|
58
|
+
code: |
|
|
59
|
+
# BROKEN: 'true' is a string, not a boolean — validation fails
|
|
60
|
+
on:
|
|
61
|
+
workflow_call:
|
|
62
|
+
inputs:
|
|
63
|
+
dry_run:
|
|
64
|
+
type: boolean
|
|
65
|
+
default: 'true' # ERROR: Unexpected value 'true'
|
|
66
|
+
description: 'Run in dry-run mode'
|
|
67
|
+
- language: yaml
|
|
68
|
+
label: 'CORRECT: bare YAML boolean for default value'
|
|
69
|
+
code: |
|
|
70
|
+
# FIXED: true (no quotes) is a YAML boolean — validation passes
|
|
71
|
+
on:
|
|
72
|
+
workflow_call:
|
|
73
|
+
inputs:
|
|
74
|
+
dry_run:
|
|
75
|
+
type: boolean
|
|
76
|
+
default: true # Correct YAML boolean literal
|
|
77
|
+
description: 'Run in dry-run mode (default: enabled)'
|
|
78
|
+
skip_tests:
|
|
79
|
+
type: boolean
|
|
80
|
+
default: false # Correct YAML boolean literal
|
|
81
|
+
description: 'Skip test suite'
|
|
82
|
+
- language: yaml
|
|
83
|
+
label: 'Complete reusable workflow with correct boolean inputs'
|
|
84
|
+
code: |
|
|
85
|
+
# .github/workflows/deploy-reusable.yml
|
|
86
|
+
on:
|
|
87
|
+
workflow_call:
|
|
88
|
+
inputs:
|
|
89
|
+
environment:
|
|
90
|
+
type: string
|
|
91
|
+
required: true
|
|
92
|
+
description: 'Target environment: staging or production'
|
|
93
|
+
dry_run:
|
|
94
|
+
type: boolean
|
|
95
|
+
default: false # bare boolean, no quotes
|
|
96
|
+
description: 'Perform a dry run without making changes'
|
|
97
|
+
notify:
|
|
98
|
+
type: boolean
|
|
99
|
+
default: true # bare boolean, no quotes
|
|
100
|
+
description: 'Send Slack notification on completion'
|
|
101
|
+
|
|
102
|
+
jobs:
|
|
103
|
+
deploy:
|
|
104
|
+
runs-on: ubuntu-latest
|
|
105
|
+
steps:
|
|
106
|
+
- uses: actions/checkout@v4
|
|
107
|
+
# Note: inputs.dry_run arrives as the STRING 'true' or 'false'
|
|
108
|
+
# in the job body — compare with == 'true', not == true
|
|
109
|
+
- if: inputs.dry_run != 'true'
|
|
110
|
+
run: echo "Deploying to ${{ inputs.environment }}"
|
|
111
|
+
prevention:
|
|
112
|
+
- "Never quote boolean default values in workflow_call inputs — use bare `true` or `false`"
|
|
113
|
+
- "Remember that while the DECLARATION requires bare booleans, the VALUE received by steps is always a string: compare with `== 'true'`, not `== true`"
|
|
114
|
+
- "Run `actionlint` locally to catch input type/default mismatches before pushing"
|
|
115
|
+
- "Validate workflow files with `gh workflow view` or push to a test branch to surface validation errors early"
|
|
116
|
+
docs:
|
|
117
|
+
- url: 'https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#workflow_call'
|
|
118
|
+
label: 'GitHub Docs: workflow_call inputs — supported types and default values'
|
|
119
|
+
- url: 'https://docs.github.com/en/actions/sharing-automations/reusing-workflows#using-inputs-and-secrets-in-a-reusable-workflow'
|
|
120
|
+
label: 'GitHub Docs: Reusable workflow inputs'
|
|
121
|
+
- url: 'https://github.com/orgs/community/discussions/39357'
|
|
122
|
+
label: 'GitHub Community: workflow_call input type validation discussion'
|
package/package.json
CHANGED