feat: debug image name

This commit is contained in:
Leandro Costa 2025-06-21 18:40:45 -03:00
parent 82493003e8
commit fe03b9a881
2 changed files with 3 additions and 2 deletions

View file

@ -1,4 +1,4 @@
name: Builds and Publish Docker Image name: Build and Publish Docker Image
description: Define IMAGE_NAME to Git Hub env, based on repository name description: Define IMAGE_NAME to Git Hub env, based on repository name
inputs: inputs:
username: username:

View file

@ -13,9 +13,10 @@ runs:
export REPO_FULL=${{ github.repository }} export REPO_FULL=${{ github.repository }}
export REPO_NAME=${REPO_FULL#*/} export REPO_NAME=${REPO_FULL#*/}
if [ "${{ github.ref_name }}" != "master" && "${{ github.ref_name }}" != "main" ]; then if [ "${{ github.ref_name }}" != "master" ] && [ "${{ github.ref_name }}" != "main" ]; then
export IMAGE_NAME=${{ inputs.username }}/$REPO_NAME-dev export IMAGE_NAME=${{ inputs.username }}/$REPO_NAME-dev
else else
export IMAGE_NAME=${{ inputs.username }}/$REPO_NAME export IMAGE_NAME=${{ inputs.username }}/$REPO_NAME
fi fi
echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_ENV echo "IMAGE_NAME=$IMAGE_NAME" >> $GITHUB_ENV
echo "Image Name: $IMAGE_NAME, for Branch: ${{ github.ref_name }}"