Improve debug output in CI config

This commit is contained in:
eikendev 2021-07-19 00:26:07 +02:00
parent 930305e912
commit 28dd32f248
No known key found for this signature in database
GPG key ID: A1BDB1B28C8EF694

View file

@ -20,10 +20,11 @@ jobs:
- name: Get Branch # Needed to evaluate env.BRANCH.
if: ${{ startsWith(github.ref, 'refs/tags/v') && github.event_name == 'push' }} # Otherwise will fail on pull requests.
run: |
echo "Getting branch name..."
raw=$(git branch -r --contains ${{ github.ref }})
echo "$raw"
echo "raw: $raw"
branch=${raw##*/}
echo "$branch"
echo "branch: $branch"
echo "BRANCH=$branch" >> $GITHUB_ENV
- name: Login to Docker Hub
if: ${{ startsWith(github.ref, 'refs/tags/v') && github.event_name == 'push' && env.BRANCH == 'master' }} # Only login for tagged commits pushed to master.