Skip to content

Commit 5015fa0

Browse files
committed
workflows: adjust stamp checking for dnf 5
Upgrading the container from Fedora 40 -> 41 seems to have changed `dnf info` output. If multiple copr builds are available the `dnf info` query now returns: ``` [jelle@toolbx main]$ dnf info --refresh --repo='copr:*cockpit*' cockpit-bridge | awk '/^Release/ { split($3, v, "."); print substr(v[2], 0, 14)}' 2>/dev/null Updating and loading repositories: Copr repo for cockpit-project-cockpit- 100% | 12.5 KiB/s | 1.5 KiB | 00m00s Repositories loaded. 20250307123226 20250310153201 ``` This breaks as previously it expected on stamp and one stamp only. Switching to `repoquery` gives us the benefit that we don't need awk to match on `Release` but still doesn't help us with the limiting issues so a `tail` is still required.
1 parent 8e97951 commit 5015fa0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/trigger-anaconda.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ jobs:
4444
for _ in $(seq 60); do
4545
sleep 60;
4646
if dnf copr enable -y packit/$COPR_NAME &&
47-
out=$(dnf info --refresh --repo='copr:*cockpit*' cockpit-bridge) &&
48-
stamp=$(echo "$out" | awk '/^Release/ { split($3, v, "."); print substr(v[2], 0, 14)}') &&
47+
out=$(dnf repoquery --refresh --repo='copr:*cockpit*' --queryformat '%{release}\n' --recent cockpit-bridge) &&
48+
stamp=$(echo $out | tail -n 1 | awk '{ split($0, v, "."); print substr(v[2], 0, 14)}') &&
4949
[ "$stamp" -gt "$PUSH_TIME" ]; then
5050
exit 0
5151
fi

0 commit comments

Comments
 (0)