Update action to use input-based registry credentials
Replaced hardcoded environment and secret-based credentials with input parameters for registry authentication. This change improves flexibility and allows credentials to be supplied dynamically when the action is executed.
This commit is contained in:
parent
9cf4faab85
commit
4cdb49bc38
10
action.yml
10
action.yml
@ -17,6 +17,12 @@ inputs:
|
|||||||
container-registry:
|
container-registry:
|
||||||
description: 'Container registry url'
|
description: 'Container registry url'
|
||||||
required: true
|
required: true
|
||||||
|
registry-username:
|
||||||
|
description: 'The registry username'
|
||||||
|
required: true
|
||||||
|
registry-token:
|
||||||
|
description: 'The registry authentication token'
|
||||||
|
required: true
|
||||||
publish-docker:
|
publish-docker:
|
||||||
description: 'Publish Docker image (true/false)'
|
description: 'Publish Docker image (true/false)'
|
||||||
required: false
|
required: false
|
||||||
@ -87,8 +93,8 @@ runs:
|
|||||||
uses: docker/login-action@v3
|
uses: docker/login-action@v3
|
||||||
with:
|
with:
|
||||||
registry: ${{ inputs.container-registry }}
|
registry: ${{ inputs.container-registry }}
|
||||||
username: ${{ env.DEPLOYER_USERNAME }}
|
username: ${{ inputs.registry-username }}
|
||||||
password: ${{ secrets.DEPLOYER_TOKEN }}
|
password: ${{ inputs.registry-token }}
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
if: inputs.publish-docker == 'true' && inputs.build-type == 'application' && (inputs.workflow-type == 'protected' || inputs.workflow-type == 'tag')
|
if: inputs.publish-docker == 'true' && inputs.build-type == 'application' && (inputs.workflow-type == 'protected' || inputs.workflow-type == 'tag')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user