You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: convert from reusable workflow to composite action (#2)
The v1.0.0 reusable workflow used a two-checkout pattern with
${{ github.workflow_ref }} to pull in its own scripts. That context
variable — inside a reusable workflow — resolves to the CALLER's workflow
ref, not the callee's, which produces an invalid git refspec when fed
to actions/checkout as 'ref:'. The pattern cannot work: there is no
reusable-workflow context that exposes the caller's pinned ref back to
the callee.
Composite actions have ${{ github.action_path }} which is the canonical
way to ship scripts alongside an action. Caller boilerplate grows slightly
(own checkout + uses: step) but the form is structurally sound.
Breaking API changes from v1.0.0:
- Caller syntax: jobs.foo.uses: -> jobs.foo.steps[].uses: (plus own checkout)
- Secrets become inputs: secrets.GH_PAT -> inputs.gh-pat, etc.
- Still passed via ${{ secrets.FOO }} at call site for masking.
README updated for new caller syntax. Scripts unchanged. v1.0.0 and v1
tags will be force-moved to this commit; beacon's caller (currently at
broken v1 syntax) will be updated in a follow-up PR.
Copy file name to clipboardExpand all lines: README.md
+28-33Lines changed: 28 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Check Action Versions
2
2
3
-
A reusable GitHub workflow that audits the SHA-pinned `uses:` references in your workflow files, resolves each action's latest strict-semver release, and opens a security issue + automated PR when anything is outdated.
3
+
A composite GitHub Action that audits the SHA-pinned `uses:` references in your workflow files, resolves each action's latest strict-semver release, and opens a security issue + automated PR when anything is outdated.
4
4
5
5
- Runs on your schedule (weekly is typical)
6
6
- Creates a single tracking issue, updates it on each run
That's the minimum. Everything else is optional — see below.
37
41
38
42
## Permissions
39
43
40
-
Your caller workflow must also declare the permissions the action needs. GitHub
41
-
applies the **intersection** of caller job-level permissions and the reusable
42
-
workflow's declared permissions — if your caller doesn't grant them, the issue
43
-
and PR steps will fail at runtime even though the action declares them
44
-
internally. The Quickstart above shows the required top-level block:
44
+
Your caller workflow needs `contents: write`, `issues: write`, `pull-requests: write`. Declare at workflow or job level.
45
45
46
46
```yaml
47
47
permissions:
@@ -50,11 +50,6 @@ permissions:
50
50
pull-requests: write
51
51
```
52
52
53
-
Declaring them at workflow-level (as in Quickstart) applies by default to all
54
-
jobs in the caller. If you use job-level `permissions:` overrides anywhere,
55
-
make sure the job that calls this action retains write access to contents,
56
-
issues, and pull-requests.
57
-
58
53
## Inputs
59
54
60
55
### Required
@@ -142,26 +137,28 @@ How automated commits are cryptographically signed:
142
137
- `ssh`— SSH signing. Recommended when you want verified commits. See [Signing](#signing) below.
143
138
- `gpg`— GPG signing. Supported for repos with existing GPG infrastructure, but SSH is simpler to set up and maintain.
144
139
145
-
## Secrets
140
+
## Secret-bearing inputs
141
+
142
+
Composite actions don't have a separate `secrets:` block — secret values are passed as regular inputs. Always reference them via `${{ secrets.NAME }}` at the call site so GitHub masks the value in logs.
146
143
147
-
### `GH_PAT` — required
144
+
### `gh-pat` — required
148
145
149
146
A Personal Access Token (classic) or fine-grained PAT with `repo` and `workflow` scopes on the target repo.
150
147
151
148
**Why not `GITHUB_TOKEN`?** PRs opened by `GITHUB_TOKEN` do not trigger workflows. Your CI (lint, test, build) will not run on the automated PR, so you won't know if the update broke anything. A PAT from a bot account works around this.
152
149
153
-
Store as a repo or org secret and pass via `secrets: GH_PAT:`.
150
+
Store as a repo or org secret and pass via `gh-pat: ${{ secrets.YOUR_PAT_SECRET_NAME }}`.
154
151
155
-
### `SIGNING_KEY` — optional
152
+
### `signing-key` — optional
156
153
157
154
Required iff `signing-method` is non-empty. Validated at runtime; the action fails fast with a clear error if set to `ssh` or `gpg` without a key.
158
155
159
156
- For `ssh`: the full private key including the `-----BEGIN OPENSSH PRIVATE KEY-----` header and footer
160
157
- For `gpg`: an armored private key block (`gpg --armor --export-secret-keys <key-id>`)
161
158
162
-
### `SIGNING_PASSPHRASE` — optional
159
+
### `signing-passphrase` — optional
163
160
164
-
The passphrase protecting `SIGNING_KEY`. Leave unset if the key is unencrypted.
161
+
The passphrase protecting `signing-key`. Leave unset if the key is unencrypted.
165
162
166
163
## Signing
167
164
@@ -201,10 +198,8 @@ One-time, per repo or per org:
5. **Verify** by triggering `workflow_dispatch` manually. The resulting commit in the automated PR should display "Verified" with a tooltip naming your bot account.
@@ -215,7 +210,7 @@ One-time, per repo or per org:
215
210
2. Export the private key: `gpg --armor --export-secret-keys <key-id>`
216
211
3. Register the **public** key on the bot's GitHub account under "SSH and GPG keys"
217
212
4. Store private key + passphrase as secrets
218
-
5. Pass `signing-method: gpg` and the secrets as shown in Quickstart
213
+
5. Pass `signing-method: gpg`, `signing-key: ${{ secrets.GPG_PRIVATE_KEY }}`, and `signing-passphrase: ${{ secrets.GPG_PASSPHRASE }}` in the `with:` block of the action step
219
214
220
215
The action sets up `gpg-agent` with a preset passphrase and configures `git commit.gpgsign true` for the duration of the job.
221
216
@@ -257,14 +252,14 @@ If you want full determinism despite the irony, pin to a specific release tag or
257
252
258
253
## Troubleshooting
259
254
260
-
**"Secret GH_PAT is required but not supplied"**
261
-
Your caller workflow is missing `secrets: GH_PAT: ...`. Add it.
255
+
**"Input required and not supplied: gh-pat"**
256
+
Your caller workflow is missing `gh-pat: ${{ secrets.YOUR_PAT_SECRET_NAME }}` in the `with:` block. Add it.
262
257
263
-
**"signing-method is 'ssh' but no SIGNING_KEY secret was supplied"**
264
-
Either pass `SIGNING_KEY` or set `signing-method` to empty.
258
+
**"signing-method is 'ssh' but signing-key input is empty"**
259
+
Either pass `signing-key` or set `signing-method` to empty.
265
260
266
261
**PR opens but CI doesn't run on it**
267
-
`GH_PAT`is actually `GITHUB_TOKEN`. Use a PAT from a bot account — see the `GH_PAT` section above.
262
+
`gh-pat`is actually `GITHUB_TOKEN`. Use a PAT from a bot account — see the `gh-pat` section above.
The public key registered on the bot account is marked as an Authentication Key, not a Signing Key. GitHub distinguishes the two. Re-add it with the correct type.
0 commit comments