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:
|
||||
description: 'Container registry url'
|
||||
required: true
|
||||
registry-username:
|
||||
description: 'The registry username'
|
||||
required: true
|
||||
registry-token:
|
||||
description: 'The registry authentication token'
|
||||
required: true
|
||||
publish-docker:
|
||||
description: 'Publish Docker image (true/false)'
|
||||
required: false
|
||||
@ -87,8 +93,8 @@ runs:
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ inputs.container-registry }}
|
||||
username: ${{ env.DEPLOYER_USERNAME }}
|
||||
password: ${{ secrets.DEPLOYER_TOKEN }}
|
||||
username: ${{ inputs.registry-username }}
|
||||
password: ${{ inputs.registry-token }}
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
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