Use a different sha for the pull request flow

This commit is contained in:
Felipe Knorr Kuhn 2025-11-20 09:12:25 -03:00
parent d715816e16
commit 4cd6ef7e5c
No known key found for this signature in database
GPG key ID: 79619B52BB097C1A

View file

@ -68,7 +68,14 @@ jobs:
run: echo "TAG=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_ENV
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
SHA="${{ github.event.pull_request.head.sha }}"
else
SHA="${GITHUB_SHA}"
fi
echo "SHORT_SHA=${SHA:0:8}" >> $GITHUB_ENV
- name: Login to Docker for building
run: echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_USERNAME }}" --password-stdin