From 4cdb49bc383b5269c8d32326dea4d7dc41cb48d9 Mon Sep 17 00:00:00 2001 From: Rene Nochebuena Date: Tue, 22 Apr 2025 23:46:35 -0600 Subject: [PATCH] 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. --- action.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index b53b73e..2b6fea9 100644 --- a/action.yml +++ b/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')