Skip to content

Commit

Permalink
fix(ci): Fetch all refspecs from remote
Browse files Browse the repository at this point in the history
This is a follow-up fix to ca298a2 and

Previously, 'git fetch' would not fetch all refspecs from the remote,
which would cause the 'Check if Dockerfile has been modified' step to
fail with the following error:

$ git diff --compact-summary --exit-code <good ref> -- Dockerfiles/<image>
fatal: bad object <good ref>
  • Loading branch information
guihkx committed Sep 12, 2024
1 parent ca298a2 commit fcd4e18
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
run: |
set -ex
git remote add upstream https://github.com/nuttyartist/notes.git
git fetch upstream master
git fetch upstream +refs/heads/master:refs/remotes/upstream/master
# NOTE: The following should give us the previous commit hash of the base branch, but that will
# only work reliably for 'push' and pull_request events. For workflow_dispatch events, we
# have to fallback to the default branch ('master'), until a better solution is found...
Expand Down

0 comments on commit fcd4e18

Please sign in to comment.