Skip to content

Commit

Permalink
github-actions: fetch upstream release tags if running on fork
Browse files Browse the repository at this point in the history
This ensures the cyrus build can correctly identify its version
from the release tags, without requiring the fork owner to keep
their fork up to date with release tags, which in turn prevents
test failures from cyrus reporting its own version incorrectly,
and Cassandane miscompensating.
  • Loading branch information
elliefm committed Jun 24, 2024
1 parent 5774246 commit a27f93c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ jobs:
- name: setup git safe directory
shell: bash
run: git config --global --add safe.directory /__w/cyrus-imapd/cyrus-imapd
- name: fetch upstream release tags
if: ${{ github.repository != 'cyrusimap/cyrus-imapd' }}
shell: bash
run: |
git remote add upstream https://github.com/cyrusimap/cyrus-imapd.git
# n.b. --no-tags does not mean "no tags", it means "no automatic tag
# following". we're explicitly fetching the tags we want, we do not
# need every other tag that's reachable from them
git fetch --no-tags upstream 'refs/tags/cyrus-imapd-*:refs/tags/cyrus-imapd-*'
- name: configure and build
shell: bash
run: |
Expand Down

0 comments on commit a27f93c

Please sign in to comment.