Skip to content

Commit e6eb634

Browse files
HastDsecureblue-bot
authored andcommitted
ci: use commit hash instead of tag for upstream sync (#5)
Extract the commit hash from the selinux-policy RPM spec for the current Fedora version and use that as the base for the rebase. This ensures that the upstream sync works even if the commit isn't tagged. Signed-off-by: Daniel Hast <hast.daniel@protonmail.com>
1 parent e59d290 commit e6eb634

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/upstream-sync.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@ jobs:
4545
git fetch --tags 'upstream'
4646
4747
spec_url="https://src.fedoraproject.org/rpms/selinux-policy/raw/f${FEDORA_VERSION}/f/selinux-policy.spec"
48-
stable_version=$(curl -Ls "${spec_url}" | grep '^Version: .*')
49-
git rebase "v${stable_version#Version: }"
48+
stable_commit=$(curl -Ls "${spec_url}" | grep -E '^%global commit [0-9a-eA-E]+$')
49+
git rebase "${stable_commit#%global commit }"
5050
git push --follow-tags --force-with-lease

0 commit comments

Comments
 (0)