|
|
|
@ -102,25 +102,14 @@ jobs:
|
|
|
|
|
packages: write
|
|
|
|
|
|
|
|
|
|
env:
|
|
|
|
|
# Set the repo variable [DOCKER_HUB_USERNAME] to override the default at https://github.com/<user>/<project>/settings/variables/actions
|
|
|
|
|
#
|
|
|
|
|
# NOTE: no login attempt will happen with Docker Hub until this secret is set
|
|
|
|
|
# Set the repo variable [DOCKER_HUB_USERNAME] to override the default
|
|
|
|
|
# at https://github.com/<user>/<project>/settings/variables/actions
|
|
|
|
|
DOCKER_HUB_USERNAME: ${{ vars.DOCKER_HUB_USERNAME || 'pixelfed' }}
|
|
|
|
|
|
|
|
|
|
# Set the repo variable [DOCKER_HUB_ORGANISATION] to override the default at https://github.com/<user>/<project>/settings/variables/actions
|
|
|
|
|
#
|
|
|
|
|
# NOTE: no login attempt will happen with Docker Hub until this secret is set
|
|
|
|
|
DOCKER_HUB_ORGANISATION: ${{ vars.DOCKER_HUB_ORGANISATION || 'pixelfed' }}
|
|
|
|
|
|
|
|
|
|
# Set the repo variable [DOCKER_HUB_REPO] to override the default at https://github.com/<user>/<project>/settings/variables/actions
|
|
|
|
|
#
|
|
|
|
|
# NOTE: no login attempt will happen with Docker Hub until this secret is set
|
|
|
|
|
DOCKER_HUB_REPO: ${{ vars.DOCKER_HUB_REPO || 'pixelfed' }}
|
|
|
|
|
|
|
|
|
|
# For Docker Hub pushing to work, you need the secret [DOCKER_HUB_TOKEN]
|
|
|
|
|
# set to your Personal Access Token at https://github.com/<user>/<project>/settings/secrets/actions
|
|
|
|
|
#
|
|
|
|
|
# NOTE: no login attempt will happen with Docker Hub until this secret is set
|
|
|
|
|
# ! NOTE: no [login] or [push] will happen to Docker Hub until this secret is set!
|
|
|
|
|
HAS_DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN != '' }}
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
@ -136,6 +125,7 @@ jobs:
|
|
|
|
|
with:
|
|
|
|
|
version: v0.12.0 # *or* newer, needed for annotations to work
|
|
|
|
|
|
|
|
|
|
# See: https://github.com/docker/login-action?tab=readme-ov-file#github-container-registry
|
|
|
|
|
- name: Log in to the GitHub Container registry
|
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
|
with:
|
|
|
|
@ -143,12 +133,13 @@ jobs:
|
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
|
|
# See: https://github.com/docker/login-action?tab=readme-ov-file#docker-hub
|
|
|
|
|
- name: Login to Docker Hub registry (conditionally)
|
|
|
|
|
if: ${{ env.HAS_DOCKER_HUB_TOKEN == true }}
|
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
|
with:
|
|
|
|
|
username: ${{ env.DOCKER_HUB_USERNAME }}
|
|
|
|
|
password: ${{ secrets.DOCKER_HUB_TOKEN }}
|
|
|
|
|
if: ${{ env.HAS_DOCKER_HUB_TOKEN == true }}
|
|
|
|
|
|
|
|
|
|
- name: Docker meta
|
|
|
|
|
uses: docker/metadata-action@v5
|
|
|
|
@ -156,7 +147,7 @@ jobs:
|
|
|
|
|
with:
|
|
|
|
|
images: |
|
|
|
|
|
name=ghcr.io/${{ github.repository }},enable=true
|
|
|
|
|
name=${{ env.DOCKER_HUB_ORGANISATION }}/${{ env.DOCKER_HUB_REPO }},enable=${{ env.HAS_DOCKER_HUB_TOKEN }}
|
|
|
|
|
name=${{ vars.GITHUB_REPOSITORY }},enable=${{ env.HAS_DOCKER_HUB_TOKEN }}
|
|
|
|
|
flavor: |
|
|
|
|
|
latest=auto
|
|
|
|
|
suffix=-${{ matrix.target_runtime }}-${{ matrix.php_version }}
|
|
|
|
|