Skip to content

Commit 0967d99

Browse files
committed
Keyring fetch: fix broken curl parameter and enable workflow_dispatch
1 parent c35f34f commit 0967d99

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/generate-keyring-data.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
name: "Generate list of latest keyrings for Debian & Ubuntu"
22
on:
3+
workflow_dispatch:
34
repository_dispatch:
45
types: ["Keyrings update"]
56

@@ -21,17 +22,17 @@ jobs:
2122

2223
- name: "Generate keyring files"
2324
run: |
24-
NEWEST_SUITE=$(curl --max-time=30 --compressed -fLs https://changelogs.ubuntu.com/meta-release | grep '^Dist:'| tail -n 1 | awk '{print $NF}')
25+
NEWEST_SUITE=$(curl --max-time 30 --compressed -fLs https://changelogs.ubuntu.com/meta-release | grep '^Dist:'| tail -n 1 | awk '{print $NF}')
2526
# NOTE: this service on PUC returns a long list of ISO-3166-2 country code prefixed archive.ubuntu.com mirrors [among others]
2627
# We remove that prefix as it's better to use the rotation. the number in the regex is b/c nz has nz and nz2
2728
# example URL returned: http://nz2.archive.ubuntu.com/ubuntu/pool/main/u/ubuntu-keyring/ubuntu-keyring_2023.11.28.1_all.deb
28-
PKG_URL=$(curl --max-time=30 --compressed -fLs "https://packages.ubuntu.com/${NEWEST_SUITE}/all/ubuntu-keyring/download" | \
29+
PKG_URL=$(curl --max-time 30 --compressed -fLs "https://packages.ubuntu.com/${NEWEST_SUITE}/all/ubuntu-keyring/download" | \
2930
grep -oP 'https?://\S+archive.ubuntu.com/ubuntu/pool/main/u/\S+\.deb' | tail -n 1 | sed -E 's#://[a-z][a-z][0-9]?\.#://#')
3031
[[ -z "${PKG_URL}" ]] && (echo "fetch_newest_keyring failed - unable to find newest ubuntu-keyring package"; exit 1)
3132
echo $PKG_URL > latest-ubuntu-keyring.txt
3233
3334
for p in debian-archive-keyring debian-ports-archive-keyring; do
34-
PKG_URL=$(curl --max-time=30 --compressed -fLs "https://packages.debian.org/sid/all/${p}/download" | \
35+
PKG_URL=$(curl --max-time 30 --compressed -fLs "https://packages.debian.org/sid/all/${p}/download" | \
3536
grep -oP "https?://(deb|ftp)\.debian\.org/debian/pool/main/d/${p}/${p}_\S+\.deb")
3637
[[ -z "${PKG_URL}" ]] && (echo "fetch_newest_keyring failed - unable to find newest $p package"; exit 1)
3738
echo $PKG_URL > latest-$p.txt

0 commit comments

Comments
 (0)