Commit cf7fd25
committed
fix(ci): use PR head SHA instead of merge commit SHA for Docker builds
github.sha in pull_request events is a temporary merge commit that only
exists in GitHub's internal refs (refs/pull/N/merge) and is never pushed
to the repo. Dockerfiles that do `git clone && git checkout ${DSTACK_REV}`
fail with exit 128 because this SHA is unreachable.
Use github.event.pull_request.head.sha for PR events, falling back to
github.sha for push-to-branch events where it is always a real commit.1 parent ab17d6e commit cf7fd25
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
0 commit comments