Skip to content
Merged
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
4 changes: 3 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ on:
description: Token for pulling private images; omit for public images
required: false
BLS_RELEASE_PRIVATE_KEY:
description: Never passed by a caller. Declared so the release environment's secret of this name resolves.
description: >-
Map it by name from the caller. The value comes from the release environment, which the
caller's job can't read; without the mapping the environment job sees it empty.
required: false

permissions:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/release-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ on:
default: ""
secrets:
BLS_RELEASE_PRIVATE_KEY:
description: Never passed by a caller. Declared so the release environment's secret of this name resolves.
description: >-
Map it by name from the caller. The value comes from the release environment, which the
caller's job can't read; without the mapping the environment job sees it empty.
required: false
outputs:
version:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
actions: read
pull-requests: read
uses: $/.github/workflows/release-check.yml
secrets:
BLS_RELEASE_PRIVATE_KEY: ${{ secrets.BLS_RELEASE_PRIVATE_KEY }}

tests:
needs: check
Expand All @@ -34,3 +36,5 @@ jobs:
with:
version: ${{ needs.check.outputs.version }}
tag: ${{ needs.check.outputs.tag }}
secrets:
BLS_RELEASE_PRIVATE_KEY: ${{ secrets.BLS_RELEASE_PRIVATE_KEY }}
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,18 @@ Pin a release by full commit SHA, with the version as a comment:
jobs:
check:
uses: blacklanternsecurity/release-workflows/.github/workflows/release-check.yml@<full sha of the tag> # v1.0.0
secrets:
BLS_RELEASE_PRIVATE_KEY: ${{ secrets.BLS_RELEASE_PRIVATE_KEY }}
```

Use the SHA of a `v*` tag of this repository, never a branch. Tags here are created only by the release
App and can't be moved or deleted, so a version comment always matches its SHA.

`release-check.yml` and `publish.yml` read the release App key in jobs that run in the caller's `release`
environment. A reusable workflow gets an environment secret only when the caller passes it, so map it by
name as above, alongside any other secrets such as `registry-token`. The caller's own job can't read the
value; GitHub supplies it inside the environment.

## How changes land

- `dev`: pull request, required tests and security checks (CodeQL, dependency review, `actionlint`,
Expand Down
Loading