ci: skip Docker Hub secret check for PR builds
This commit is contained in:
@@ -96,7 +96,7 @@ jobs:
|
|||||||
github_owner="${{ github.repository_owner }}"
|
github_owner="${{ github.repository_owner }}"
|
||||||
echo "github_owner=${github_owner,,}" >> "$GITHUB_OUTPUT"
|
echo "github_owner=${github_owner,,}" >> "$GITHUB_OUTPUT"
|
||||||
dockerhub_owner="${github_owner,,}"
|
dockerhub_owner="${github_owner,,}"
|
||||||
if [ "${{ inputs.publish_dockerhub }}" = "true" ]; then
|
if [ "${{ inputs.push }}" = "true" ] && [ "${{ inputs.publish_dockerhub }}" = "true" ]; then
|
||||||
if [ -z "$DOCKERHUB_USERNAME" ]; then
|
if [ -z "$DOCKERHUB_USERNAME" ]; then
|
||||||
echo "::error::DOCKERHUB_USERNAME secret is required for Docker Hub publishing"
|
echo "::error::DOCKERHUB_USERNAME secret is required for Docker Hub publishing"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -110,7 +110,7 @@ jobs:
|
|||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
name=${{ steps.image_namespaces.outputs.dockerhub_owner }}/${{ matrix.image }},enable=${{ inputs.publish_dockerhub }}
|
name=${{ steps.image_namespaces.outputs.dockerhub_owner }}/${{ matrix.image }},enable=${{ inputs.push && inputs.publish_dockerhub }}
|
||||||
name=ghcr.io/${{ steps.image_namespaces.outputs.github_owner }}/${{ matrix.image }},enable=true
|
name=ghcr.io/${{ steps.image_namespaces.outputs.github_owner }}/${{ matrix.image }},enable=true
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,value=dev,enable=${{ inputs.tag_mode == 'dev' }}
|
type=raw,value=dev,enable=${{ inputs.tag_mode == 'dev' }}
|
||||||
|
|||||||
Reference in New Issue
Block a user