Skip to content

Commit

Permalink
Update build_and_push.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
danamzulescu-codefresh committed Apr 9, 2023
1 parent 9fdd7bb commit 2adbf23
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/workflows/build_and_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,12 @@ jobs:
run: |
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
# If git ref is a tag, set docker_image_tag to the tag name
docker_image_tag="${{ github.ref/refs\/tags\//}}"
docker_image_tag="${{ github.ref/refs\/tags\// }}"
else
# If git ref is not a tag, set docker_image_tag to the commit hash
docker_image_tag="${{ github.sha }}"
fi
echo "1"
echo "$docker_image_tag"
echo "2"
# Replace slashes with hyphens using tr command
docker_image_tag=$(echo "$docker_image_tag" | tr '/' '-')
# Replace other special characters with hyphens
Expand Down

0 comments on commit 2adbf23

Please sign in to comment.