Skip to content
Merged
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
9 changes: 8 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ on:
description: Existing tag to publish, e.g. api-v5.7.0 or migration-v5.5.0
required: true

# GITHUB_TOKEN is only used to check out the code; image pushes use the Docker Hub secrets
permissions:
contents: read

jobs:
docker:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -60,7 +64,10 @@ jobs:
- uses: actions/checkout@v4
if: steps.version.outputs.build == 'true'
with:
ref: ${{ inputs.tag || github.ref }}
# a manual run checks out the tag itself, never a branch with the same name
ref: ${{ inputs.tag && format('refs/tags/{0}', inputs.tag) || github.ref }}
# keep the token out of .git/config, which is part of the build context
persist-credentials: false

- name: Set up QEMU
if: steps.version.outputs.build == 'true'
Expand Down
Loading