2023-11-23 23:47:39 -05:00
|
|
|
name: Docker Login
|
|
|
|
description: Login to Docker Registry
|
2023-11-23 22:14:25 -05:00
|
|
|
|
|
|
|
inputs:
|
|
|
|
registry:
|
|
|
|
type: string
|
|
|
|
required: false
|
2023-11-23 23:47:39 -05:00
|
|
|
description: Docker registry FQDN
|
2023-11-23 22:14:25 -05:00
|
|
|
default: ${{github.server_url}}
|
2023-11-23 22:54:18 -05:00
|
|
|
user:
|
|
|
|
type: string
|
|
|
|
required: false
|
|
|
|
description: Docker user
|
|
|
|
default: ${{github.repository_owner}}
|
|
|
|
pass:
|
|
|
|
type: string
|
|
|
|
required: false
|
|
|
|
description: User password
|
|
|
|
default: ${{secrets.DEPLOY_TOKEN}}
|
2023-11-23 22:14:25 -05:00
|
|
|
name:
|
|
|
|
type: string
|
|
|
|
required: false
|
|
|
|
default: ${{github.repository}}
|
|
|
|
tag:
|
|
|
|
type: string
|
|
|
|
required: false
|
|
|
|
default: ${{github.ref_name}}
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: composite
|
|
|
|
steps:
|
2023-11-23 23:47:39 -05:00
|
|
|
- name: Format Registry URL
|
2023-11-23 22:36:57 -05:00
|
|
|
run: echo "URL=$(echo ${{github.server_url}} | sed s%http://%% | sed s%https://%% )" >> $GITHUB_ENV
|
|
|
|
shell: sh
|
2023-11-23 23:47:39 -05:00
|
|
|
- name: Docker Login
|
2023-11-23 22:14:25 -05:00
|
|
|
uses: docker://docker
|
|
|
|
with:
|
2023-11-23 23:47:39 -05:00
|
|
|
args: /bin/sh -c "docker login -u ${{inputs.user}} -p ${{inputs.pass}} ${{env.URL}} && docker push ${{env.URL}}/${{inputs.name}}:${{inputs.tag}}"
|