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:
Rene Nochebuena 2025-04-22 23:46:35 -06:00
parent 9cf4faab85
commit 4cdb49bc38
Signed by: Rene Nochebuena
GPG Key ID: A9FD83117EA538D8

View File

@ -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')