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 d2502e6 commit 9fdd7bb
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/build_and_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,9 @@ jobs:
echo "2"
# Replace slashes with hyphens using tr command
docker_image_tag="${{ docker_image_tag//\//- }}"
docker_image_tag=$(echo "$docker_image_tag" | tr '/' '-')
# Replace other special characters with hyphens
docker_image_tag="${{ docker_image_tag//[^a-zA-Z0-9.-]/- }}"
# Convert to lowercase
docker_image_tag="${{ docker_image_tag,, }}"
docker_image_tag=$(echo "$docker_image_tag" | tr -cd '[:alnum:].-' | tr '[:upper:]' '[:lower:]')
echo "Docker image tag: $docker_image_tag"
echo "docker_image_tag=$docker_image_tag" >> $GITHUB_ENV
Expand Down

0 comments on commit 9fdd7bb

Please sign in to comment.