Skip to content

Commit

Permalink
Default to Docker Hub
Browse files Browse the repository at this point in the history
  • Loading branch information
desmondgc committed May 20, 2024
1 parent 6a02326 commit 7f43e97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [published]

env:
REGISTRY: ghcr.io
REGISTRY: ${{ vars.REGISTRY || 'docker.io' }}
IMAGE_NAME: ${{ github.repository }}
TARGET_PLATFORMS: linux/amd64,linux/arm64

Expand All @@ -21,8 +21,8 @@ jobs:
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
username: ${{ secrets.DOCKER_USERNAME || (env.REGISTRY == 'ghcr.io' && github.actor) }}
password: ${{ secrets.DOCKER_PASSWORD || (env.REGISTRY == 'ghcr.io' && secrets.GITHUB_TOKEN) }}

- name: Extract metadata (tags, labels) for Docker
id: meta
Expand Down

0 comments on commit 7f43e97

Please sign in to comment.