Skip to content

Commit

Permalink
fix quote
Browse files Browse the repository at this point in the history
  • Loading branch information
kennyd3d committed Aug 24, 2024
1 parent 934002c commit b13660f
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,33 +38,34 @@ jobs:
- name: Preparing job
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
# Validate and sanitize the tag name
if [[ ! "$TAG_NAME" =~ ^[a-z0-9]+([._-][a-z0-9]+)*$ ]]; then
echo "# ❌ Invalid tag name: $TAG_NAME. Tag names must be lowercase and can include dashes, dots, or underscores." >> $GITHUB_STEP_SUMMARY
echo "# ❌ Invalid tag name: $TAG_NAME. Tag names must be lowercase and can include dashes, dots, or underscores." >> $GITHUB_STEP_SUMMARY
exit 1
fi
# Ensure tag name is a valid Docker tag
if [ ${#TAG_NAME} -gt 128 ]; then
echo "# ❌ Tag name is too long. Must be less than 128 characters.">> $GITHUB_STEP_SUMMARY
echo "# ❌ Tag name is too long. Must be less than 128 characters." >> $GITHUB_STEP_SUMMARY
exit 1
fi
TAG_COMMIT_SHA=$(git rev-list -n 1 $TAG_NAME)
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
echo "TAG_COMMIT_SHA=$TAG_COMMIT_SHA" >> $GITHUB_ENV
echo "SHA_SHORT=$(echo $TAG_COMMIT_SHA | cut -c1-7)" >> $GITHUB_ENV
echo "Tag Name: ${{ env.TAG_NAME }}"
echo "Full SHA: ${{ env.TAG_COMMIT_SHA }}"
echo "Short SHA: ${{ env.SHA_SHORT }}
echo "Tag Name: $TAG_NAME"
echo "Full SHA: $TAG_COMMIT_SHA"
echo "Short SHA: $(echo $TAG_COMMIT_SHA | cut -c1-7)"
echo "IMAGE_DEV=docker.artifactory.d3d.io/${{ env.ARTIFACT_NAME }}:${{ env.SHA_SHORT }}" >> $GITHUB_ENV
echo "IMAGE_QA=docker.artifactory.d3d.io/${{ env.ARTIFACT_NAME }}:${{ env.TAG_NAME }}" >> $GITHUB_ENV
echo "DEV: ${{ env.IMAGE_DEV }}"
echo "QA: ${{ env.IMAGE_QA }}"


build_test_and_deploy_dev:
runs-on: ubuntu-latest
Expand Down

0 comments on commit b13660f

Please sign in to comment.