chore: update action jobs for fork support
This commit is contained in:
@@ -2,7 +2,7 @@ name: Docker build & push (reusable)
|
|||||||
|
|
||||||
# Reusable workflow that builds the three image targets defined in
|
# Reusable workflow that builds the three image targets defined in
|
||||||
# deploy/docker/Dockerfile (backend, worker, frontend) and optionally pushes
|
# deploy/docker/Dockerfile (backend, worker, frontend) and optionally pushes
|
||||||
# them to both ghcr.io and Docker Hub under the 3252a8/ namespace.
|
# them to both ghcr.io and Docker Hub under the repository owner's namespace.
|
||||||
#
|
#
|
||||||
# Called by:
|
# Called by:
|
||||||
# - docker-dev.yml (tag_mode: dev, push: true) on pushes to dev
|
# - docker-dev.yml (tag_mode: dev, push: true) on pushes to dev
|
||||||
@@ -84,13 +84,19 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Resolve image namespace
|
||||||
|
id: image_namespace
|
||||||
|
run: |
|
||||||
|
owner="${{ github.repository_owner }}"
|
||||||
|
echo "owner=${owner,,}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
- name: Docker metadata
|
- name: Docker metadata
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
3252a8/${{ matrix.image }}
|
${{ steps.image_namespace.outputs.owner }}/${{ matrix.image }}
|
||||||
ghcr.io/3252a8/${{ matrix.image }}
|
ghcr.io/${{ steps.image_namespace.outputs.owner }}/${{ matrix.image }}
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,value=dev,enable=${{ inputs.tag_mode == 'dev' }}
|
type=raw,value=dev,enable=${{ inputs.tag_mode == 'dev' }}
|
||||||
type=raw,value=latest,enable=${{ inputs.tag_mode == 'release' }}
|
type=raw,value=latest,enable=${{ inputs.tag_mode == 'release' }}
|
||||||
|
|||||||
Reference in New Issue
Block a user