mirror of
https://github.com/qdm12/gluetun.git
synced 2026-05-06 20:10:11 +02:00
fix(ci): set hash of PR commit instead of synthetic commit in docker build argument
This commit is contained in:
@@ -169,7 +169,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Short commit
|
- name: Short commit
|
||||||
id: shortcommit
|
id: shortcommit
|
||||||
run: echo "::set-output name=value::$(git rev-parse --short HEAD)"
|
run: |
|
||||||
|
# Use the PR head SHA if it exists, otherwise fallback to GITHUB_SHA
|
||||||
|
FULL_SHA="${{ github.event.pull_request.head.sha || github.sha }}"
|
||||||
|
SHORT_SHA=
|
||||||
|
echo "value=$(echo $FULL_SHA | cut -c1-7)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Build and push final image
|
- name: Build and push final image
|
||||||
uses: docker/build-push-action@v7
|
uses: docker/build-push-action@v7
|
||||||
|
|||||||
Reference in New Issue
Block a user