From 1f5baaeafd3336b84de64044ab0b71e23323125c Mon Sep 17 00:00:00 2001 From: blacktop Date: Tue, 2 Apr 2024 19:21:28 -0600 Subject: [PATCH] fix: docker image CI --- .github/workflows/docker-image.yml | 4 ++-- .github/workflows/go.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 3922c1f2df..92042fd882 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -53,7 +53,7 @@ jobs: labels: ${{ steps.meta.outputs.labels }} build-args: | VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} - COMMIT=$GITHUB_SHA + COMMIT=${{ github.event.pull_request.head.sha || github.sha }} - name: Build and push DAEMON Docker image id: docker_daemon_build uses: docker/build-push-action@v5 @@ -68,4 +68,4 @@ jobs: labels: ${{ steps.meta.outputs.labels }} build-args: | VERSION=${{ fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }} - COMMIT=$GITHUB_SHA + COMMIT=${{ github.event.pull_request.head.sha || github.sha }} diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index a846f6298e..c7a381b40f 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -148,12 +148,12 @@ jobs: - name: Build (Linux) if: matrix.platform == 'ubuntu-latest' run: | - CGO_ENABLED=1 go build -o /usr/local/bin/ipsw -ldflags "-s -w -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppVersion="v1.0.0" -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppBuildCommit==$GITHUB_SHA" ./cmd/ipsw + CGO_ENABLED=1 go build -o /usr/local/bin/ipsw -ldflags "-s -w -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppVersion="v1.0.0" -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppBuildCommit=${{ github.event.pull_request.head.sha || github.sha }}" ./cmd/ipsw - name: Build (macOS) if: matrix.platform == 'macos-13' run: | env | grep PATH - sudo CGO_ENABLED=1 go build -o /usr/local/sbin/ipsw -ldflags "-s -w -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppVersion="v1.0.0" -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppBuildCommit==$GITHUB_SHA" ./cmd/ipsw + sudo CGO_ENABLED=1 go build -o /usr/local/sbin/ipsw -ldflags "-s -w -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppVersion="v1.0.0" -X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppBuildCommit=${{ github.event.pull_request.head.sha || github.sha }}" ./cmd/ipsw - name: Build (Windows) if: matrix.platform == 'windows-latest' env: