Actions login
This commit is contained in:
27
action.yml
Normal file
27
action.yml
Normal file
@@ -0,0 +1,27 @@
|
||||
name: Docker login
|
||||
description: A custom docker login
|
||||
author: Skydust
|
||||
|
||||
# Define your inputs here.
|
||||
inputs:
|
||||
user:
|
||||
description: The username
|
||||
required: true
|
||||
pass:
|
||||
description: The password or API key
|
||||
required: true
|
||||
default: ${{ gitea.server_url }}/${{ gitea.repository_owner }}/
|
||||
registry:
|
||||
description: The registry to log onto, defaults to the server
|
||||
required: false
|
||||
default: ${{ gitea.server_url }}
|
||||
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- name: Docker login
|
||||
shell: sh
|
||||
run: |
|
||||
export PREFIXLESS_REGISTRY=$(echo "${{ inputs.registry }}" | sed 's/^https\?:\/\///')
|
||||
echo "${{ inputs.pass }}" | docker login "$PREFIXLESS_REGISTRY" -u ${{ inputs.user }} --password-stdin
|
||||
echo "DOCKER_CONFIG_BASE64=$(base64 -w 0 < "$HOME/.docker/config.json")" >> $GITEA_ENV
|
||||
Reference in New Issue
Block a user