mirror of
https://github.com/rommapp/romm.git
synced 2026-10-12 02:21:58 +00:00
Key Docker Hub namespace off push credential
Derive the Docker Hub namespace from DOCKER_NAMESPACE, falling back to DOCKER_USERNAME and then github.repository_owner, so forks whose GitHub owner name differs from their writable Docker Hub namespace can push. GHCR is unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
da7658a4aa
commit
93922faf91
@@ -40,6 +40,8 @@ jobs:
|
||||
env:
|
||||
USE_GHCR: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.registry == 'ghcr' || github.event.inputs.registry == 'both' }}
|
||||
USE_DOCKERHUB: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.registry == 'dockerhub' || github.event.inputs.registry == 'both') }}
|
||||
# Key the Docker Hub namespace off the push credential rather than the GitHub owner.
|
||||
DOCKERHUB_NAMESPACE: ${{ secrets.DOCKER_NAMESPACE || secrets.DOCKER_USERNAME || github.repository_owner }}
|
||||
steps:
|
||||
- name: Run only once per workflow
|
||||
run: echo "Triggered by ${{ github.event_name }}"
|
||||
@@ -91,7 +93,7 @@ jobs:
|
||||
with:
|
||||
images: |
|
||||
${{ env.USE_GHCR == 'true' && format('name=ghcr.io/{0}/romm-testing', github.repository_owner) || '' }}
|
||||
${{ env.USE_DOCKERHUB == 'true' && format('name={0}/romm-testing', github.repository_owner) || '' }}
|
||||
${{ env.USE_DOCKERHUB == 'true' && format('name={0}/romm-testing', env.DOCKERHUB_NAMESPACE) || '' }}
|
||||
tags: |
|
||||
type=raw,value=${{ github.event_name == 'workflow_dispatch' && github.event.inputs.branch || github.head_ref }}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user