Skip to content

Commit

Permalink
add workflow logging
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixTJDietrich committed Dec 6, 2024
1 parent 8620567 commit ce18b42
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/deploy-docker-compose-shared.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,15 @@ jobs:
id: retrieve-image-tag
run: |
if [ -n "${{ inputs.image-tag }}" ]; then
echo "Use image-tag input ${{ inputs.image-tag }} for deployment."
echo "image-tag-to-deploy=${{ inputs.image-tag }}" >> $GITHUB_OUTPUT
exit 0
fi
REF=$(echo "${{ github.event.ref }}" | sed -n 's#^refs/heads/##p')
echo "Check if $REF is the default branch (${{ github.event.repository.default_branch }})."
if [ "$REF" = "${{ github.event.repository.default_branch }}" ]; then
echo "Use latest for deployment."
echo "image-tag-to-deploy=latest" >> $GITHUB_OUTPUT
fi
Expand All @@ -53,6 +56,7 @@ jobs:
exit 1
else
echo "PR #$PR_NUMBER found for branch $REF."
echo "Use image-tag pr-$PR_NUMBER for deployment."
echo "image-tag-to-deploy=pr-$PR_NUMBER" >> $GITHUB_OUTPUT
fi
Expand Down

0 comments on commit ce18b42

Please sign in to comment.