Publish images with the organization registry token
This commit is contained in:
1 parent
5dcc5f3fa0
commit
72bac2d644
2 files changed
+18
-4
No files matched your search
@@ -21,6 +21,12 @@ permissions:
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
# The Actions token is not accepted by the container registry, so the push
|
||||
# uses a PAT. REGISTRY_USER / REGISTRY_TOKEN (a repository variable and
|
||||
# secret) override the organization release-bot defaults.
|
||||
env:
|
||||
REGISTRY_USER: ${{ vars.REGISTRY_USER || 'echoion-release-bot' }}
|
||||
REGISTRY_TOKEN: ${{ secrets.REGISTRY_TOKEN || secrets.RELEASE_BOT_TOKEN }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -44,13 +50,13 @@ jobs:
|
||||
printf 'ref=%s/%s:%s\n' "$server" "$repo" "${{ matrix.image }}" >>"$GITHUB_OUTPUT"
|
||||
|
||||
- name: Log in to the Gitea container registry
|
||||
if: github.event_name != 'pull_request'
|
||||
if: github.event_name != 'pull_request' && env.REGISTRY_TOKEN != ''
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
printf '%s' "${{ github.token }}" |
|
||||
printf '%s' "$REGISTRY_TOKEN" |
|
||||
docker login "${{ steps.image.outputs.registry }}" \
|
||||
-u "${{ github.actor }}" --password-stdin
|
||||
-u "$REGISTRY_USER" --password-stdin
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
@@ -70,7 +76,7 @@ jobs:
|
||||
xvfb-run -a env VK_DRIVER_FILES="$icd" vulkaninfo --summary'
|
||||
|
||||
- name: Push
|
||||
if: github.event_name != 'pull_request'
|
||||
if: github.event_name != 'pull_request' && env.REGISTRY_TOKEN != ''
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
|
||||
Reference in new issue
Block a user