Skip to content
Closed
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
12 changes: 8 additions & 4 deletions .github/workflows/release-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ on:
type: string
default: ''
secrets:
REGISTRY_USERNAME:
required: false
REGISTRY_TOKEN:
required: false
USERNAME:
required: false
TOKEN:
Expand Down Expand Up @@ -116,8 +120,8 @@ jobs:
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
username: ${{ secrets.REGISTRY_USERNAME || secrets.USERNAME || github.actor }}
password: ${{ secrets.REGISTRY_TOKEN || secrets.TOKEN || github.token }}
- name: Run public dependency build
if: ${{ !inputs.use_private_module_auth }}
run: |
Expand All @@ -144,8 +148,8 @@ jobs:
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
username: ${{ secrets.REGISTRY_USERNAME || secrets.USERNAME || github.actor }}
password: ${{ secrets.REGISTRY_TOKEN || secrets.TOKEN || github.token }}
- name: Wait for image propagation
run: sleep 10
- name: Create and push manifests
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ caller's `GITHUB_TOKEN`, but it cannot elevate a caller whose permission ceiling
is read-only. The repository's default workflow permission may remain `read`;
the explicit caller grant above applies only to this release workflow.

Registry login prefers `REGISTRY_USERNAME` / `REGISTRY_TOKEN`, then the existing
`USERNAME` / `TOKEN` pair, and finally the caller's `github.actor` /
`github.token`. Use a registry token when an existing GHCR package does not grant
the caller repository's `GITHUB_TOKEN` write access.

## Release bump example

`release-bump.yml` determines the next semantic version from the latest `v*` tag, creates a GitHub release with generated notes, and exposes the new tag as the `tag` output. Because a release created with the default `GITHUB_TOKEN` does not emit a `release: created` event, chain `release-create.yml` directly after it.
Expand Down Expand Up @@ -229,6 +234,8 @@ These reusable workflows expect the consuming repository to provide the same sec

- `TOKEN`
- `USERNAME`
- `REGISTRY_TOKEN` (optional dedicated package-publishing credential)
- `REGISTRY_USERNAME` (optional username paired with `REGISTRY_TOKEN`)
- `CODECOV_TOKEN`
- `AZURE_OPENAI_API_KEY`

Expand Down
Loading