Repository navigation
Split from CLA: release workflows only #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,3 +8,5 @@ updates: | |
| - "*" | ||
| schedule: | ||
| interval: weekly | ||
| cooldown: | ||
| default-days: 7 | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| # The automated security review that stands in for a second developer on dev (policy rule 3). | ||
| name: dev-security | ||
| on: | ||
| pull_request: | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| dependency-review: | ||
| runs-on: ubuntu-24.04 | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0 | ||
| with: | ||
| fail-on-severity: moderate | ||
|
|
||
| workflow-lint: | ||
| runs-on: ubuntu-24.04 | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| persist-credentials: false | ||
| - name: actionlint | ||
| env: | ||
| VERSION: 1.7.12 | ||
| SHA256: 8aca8db96f1b94770f1b0d72b6dddcb1ebb8123cb3712530b08cc387b349a3d8 | ||
| run: | | ||
| curl -fsSLo actionlint.tgz "https://github.com/rhysd/actionlint/releases/download/v${VERSION}/actionlint_${VERSION}_linux_amd64.tar.gz" | ||
| echo "${SHA256} actionlint.tgz" | sha256sum -c - | ||
| tar xzf actionlint.tgz actionlint | ||
| ./actionlint -color | ||
| - uses: zizmorcore/zizmor-action@cc914d7f3750a2d13d75c7f184a1060aa0e9d482 # v0.6.4 | ||
| with: | ||
| advanced-security: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Releases this repository on a merge to stable, with its own workflows (publishing policy rules 1-2). | ||
| name: Release | ||
| on: | ||
| push: | ||
| branches: [stable] | ||
|
|
||
| permissions: {} | ||
|
|
||
| concurrency: | ||
| group: release-${{ github.ref }} | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| check: | ||
| permissions: | ||
| contents: read | ||
| actions: read | ||
| pull-requests: read | ||
| uses: $/.github/workflows/release-check.yml | ||
|
|
||
| tests: | ||
| needs: check | ||
| if: needs.check.outputs.release == 'true' | ||
| permissions: | ||
| contents: read | ||
| uses: $/.github/workflows/tests.yml | ||
|
|
||
| release: | ||
| needs: [check, tests] | ||
| if: needs.check.outputs.release == 'true' | ||
| permissions: | ||
| contents: read | ||
| uses: $/.github/workflows/publish.yml | ||
| with: | ||
| version: ${{ needs.check.outputs.version }} | ||
| tag: ${{ needs.check.outputs.tag }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # release-workflows | ||
|
|
||
| Reusable GitHub Actions workflows that Black Lantern Security repositories call to test, build, check and | ||
| publish releases. Callers execute this code with their own permissions and secrets, so it is held to the | ||
| same release controls as the projects it publishes. | ||
|
|
||
| | Workflow | Purpose | | ||
| |---|---| | ||
| | `python-tests.yml`, `python-versions.yml`, `rust-tests.yml` | Test matrices | | ||
| | `stable-guard.yml` | Checks a pull request into `stable` is release-ready: a MAJOR.MINOR.PATCH version, matching chart versions, no git dependencies | | ||
| | `release-check.yml` | Runs on `stable` only: reads the version, refuses a partly published release, checks merged-PR provenance and that the `release` environment is protected | | ||
| | `maturin-wheels.yml`, `crates.yml`, `docker.yml` | Build and publish artifacts | | ||
| | `docker-dev.yml` | `dev` channel images on GHCR (not releases) | | ||
| | `publish.yml` | Creates the tag and GitHub release with the release App, after everything is published | | ||
| | `cla-reusable.yml` | CLA check. The agreement and signatures live in [`CLA`](https://github.com/blacklanternsecurity/CLA) | | ||
|
|
||
| ## Using a workflow | ||
|
|
||
| Pin a release by full commit SHA, with the version as a comment: | ||
|
|
||
| ```yaml | ||
| jobs: | ||
| check: | ||
| uses: blacklanternsecurity/release-workflows/.github/workflows/release-check.yml@<full sha of the tag> # v1.0.0 | ||
| ``` | ||
|
|
||
| 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. | ||
|
|
||
| ## How changes land | ||
|
|
||
| - `dev`: pull request, required tests and security checks (CodeQL, dependency review, `actionlint`, | ||
| `zizmor`). No approval needed. | ||
| - `stable`: pull request from `dev`, approved by a code owner other than the last pusher, required checks. | ||
| Nobody bypasses it. | ||
| - A merge to `stable` runs `release.yml`, which tags the merge commit `v<version>` from `pyproject.toml`. | ||
| It stops twice at the `release` environment, once before checking the release credentials and once | ||
| before publishing, and each stop needs a `bbot-leads` approval. | ||
|
|
||
| Versions follow semantic versioning: a change to a workflow's inputs, outputs, secrets or required | ||
| permissions that a caller must act on is a major version. | ||
|
|
||
| ## Tests | ||
|
|
||
| ```bash | ||
| uv run --group dev pytest | ||
| uv run --group dev actionlint | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.