diff --git a/.gitea/actions/build/action.yml b/.gitea/actions/build/action.yml index 2bf4e6c..5c4d6af 100644 --- a/.gitea/actions/build/action.yml +++ b/.gitea/actions/build/action.yml @@ -5,6 +5,12 @@ inputs: tag: description: 'Docker image tag' required: true + REGISTRY_ACCESS_TOKEN: + description: 'Registry token to authenticate' + required: true + REGISTRY_USER: + description: 'Registry user to authenticate' + required: true outputs: image_url: @@ -21,8 +27,8 @@ runs: uses: docker/login-action@v3 with: registry: ${{ vars.INSTANCE_URL }} - username: ${{ gitea.actor }} - password: ${REGISTRY_ACCESS_TOKEN} + username: ${{ inputs.REGISTRY_USER }} + password: ${{ inputs.REGISTRY_ACCESS_TOKEN }} - name: Build and push image uses: docker/build-push-action@v6 diff --git a/.gitea/workflows/commentDeploy.yml b/.gitea/workflows/commentDeploy.yml index 2e3db4e..d839c73 100644 --- a/.gitea/workflows/commentDeploy.yml +++ b/.gitea/workflows/commentDeploy.yml @@ -18,10 +18,10 @@ jobs: - name: Build and push image id: docker_build uses: ./.gitea/actions/build - env: - REGISTRY_ACCESS_TOKEN: ${{ secrets.REGISTRY_ACCESS_TOKEN }} with: tag: ${{ steps.branch_name.outputs.branch_name }} + REGISTRY_ACCESS_TOKEN: ${{ secrets.REGISTRY_ACCESS_TOKEN }} + REGISTRY_USER: ${{ gitea.actor }} - name: Deploy application uses: ./.gitea/actions/deploy