|
51 | 51 | fi |
52 | 52 | done |
53 | 53 |
|
| 54 | + # The "pendingNightly" tag specifies the commit used to build the current nightly. |
| 55 | + # The "nightly" tag will be updated to match "pendingNightly" once the builds |
| 56 | + # have completed. |
| 57 | + git config user.name "${GITHUB_ACTOR}" |
| 58 | + git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" |
| 59 | + git tag -fa pendingNightly -m "pending nightly build" |
| 60 | + git push --force origin refs/tags/pendingNightly |
| 61 | +
|
54 | 62 | echo GAFFER_NIGHTLY=1 >> $GITHUB_OUTPUT |
55 | 63 | shell: bash |
56 | 64 | env: |
@@ -79,13 +87,14 @@ jobs: |
79 | 87 | fetch-depth: 0 |
80 | 88 |
|
81 | 89 | - name: Update Nightly Tag |
82 | | - # After a successful build, move the "nightly" tag to HEAD so the tag |
83 | | - # represents the commit from which the latest nightly was built. This |
84 | | - # keeps the GitHub release up to date and allows us to avoid building |
85 | | - # a new nightly from the same commit. |
| 90 | + # After a successful build, move the "nightly" tag to the commit tagged |
| 91 | + # "pendingNightly" so the "nightly" tag represents the commit from which |
| 92 | + # the latest nightly was built. This keeps the GitHub release up to date |
| 93 | + # and allows us to avoid building a new nightly from the same commit. |
86 | 94 | run: | |
87 | 95 | git config user.name "${GITHUB_ACTOR}" |
88 | 96 | git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" |
89 | | - git tag -fa nightly -m "nightly build" |
90 | | - git push --force origin nightly |
| 97 | + git tag -fa nightly refs/tags/pendingNightly^{} -m "nightly build" |
| 98 | + git push --force origin refs/tags/nightly |
| 99 | + git push --delete origin refs/tags/pendingNightly |
91 | 100 | shell: bash |
0 commit comments