Merge pull request #218 from dmunozv04/improve-docker-image-creation

Improve docker image creation (now supports forks)
This commit is contained in:
David
2025-01-06 19:23:34 +01:00
committed by GitHub

View File

@@ -21,6 +21,8 @@ permissions:
jobs: jobs:
build: build:
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
# Get the repository's code # Get the repository's code
@@ -32,7 +34,9 @@ jobs:
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v5
with: with:
images: ghcr.io/dmunozv04/isponsorblocktv, dmunozv04/isponsorblocktv images: |
ghcr.io/${{ github.repository }}
${{ env.DOCKERHUB_USERNAME && 'dmunozv04/isponsorblocktv' || '' }}
tags: | tags: |
type=raw,value=develop,priority=900,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }} type=raw,value=develop,priority=900,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
type=ref,enable=true,priority=600,prefix=pr-,suffix=,event=pr type=ref,enable=true,priority=600,prefix=pr-,suffix=,event=pr