Skip to content

Commit

Permalink
ci: fix git diff
Browse files Browse the repository at this point in the history
Signed-off-by: zhangzujian <[email protected]>
  • Loading branch information
zhangzujian committed Aug 12, 2024
1 parent 33d7a28 commit 88871bb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-x86-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
if [ ${{ github.event_name }} != 'pull_request' ]; then
exit
fi
if git diff --name-only HEAD^ HEAD | grep -q ^dist/images/Dockerfile.base$; then
if ! git diff --name-only --exit-code HEAD^...HEAD -- dist/images/Dockerfile.base; then
echo build-base=1 >> "$GITHUB_OUTPUT"
fi
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
if [ ${{ github.event_name }} != 'pull_request' ]; then
exit
fi
if git diff --name-only HEAD^ HEAD | grep -q ^dist/images/Dockerfile.base-dpdk$; then
if ! git diff --name-only --exit-code HEAD^...HEAD -- dist/images/Dockerfile.base-dpdk; then
echo build-dpdk-base=1 >> "$GITHUB_OUTPUT"
fi
Expand Down Expand Up @@ -265,7 +265,7 @@ jobs:
- name: Build
run: |
go mod tidy
git diff --exit-code go.mod go.sum
git diff --exit-code -- go.mod go.sum
make lint
if [ ${{ needs.build-kube-ovn-base.outputs.build-base || 0 }} = 1 ]; then
make build-kube-ovn
Expand Down

0 comments on commit 88871bb

Please sign in to comment.