Skip to content

Commit

Permalink
chore: allow setting docker registry in login action
Browse files Browse the repository at this point in the history
Default to the GitHub package registry
  • Loading branch information
achingbrain authored Sep 28, 2024
1 parent ca0760e commit d842ee0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion actions/docker-login/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ inputs:
docker-username:
description: 'Docker username'
required: false
docker-registry:
description: 'Docker registry'
default: 'ghcr.io'
required: false
runs:
using: composite
steps:
- run: |
if [[ -n "${{ inputs.docker-token }}" ]] && [[ -n "${{ inputs.docker-username }}" ]]; then
echo "${{ inputs.docker-token }}" | docker login -u "${{ inputs.docker-username }}" --password-stdin
echo "${{ inputs.docker-token }}" | docker login -u "${{ inputs.docker-username }}" --password-stdin ${{ inputs.docker-registry }}
fi
shell: bash

0 comments on commit d842ee0

Please sign in to comment.