23
23
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
24
24
echo "> External trigger running off of master branch. To disable this trigger, add \`pidgin_master\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
25
25
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
26
- EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.20 /community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
26
+ EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.21 /community/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
27
27
&& awk '/^P:'"pidgin"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://')
28
28
echo "Type is \`alpine_repo\`" >> $GITHUB_STEP_SUMMARY
29
29
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
@@ -44,16 +44,18 @@ jobs:
44
44
token=$(curl -sX GET \
45
45
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fpidgin%3Apull" \
46
46
| jq -r '.token')
47
- multidigest=$(curl -s \
48
- --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
49
- --header "Authorization: Bearer ${token}" \
50
- "https://ghcr.io/v2/${image}/manifests/${tag}" \
51
- | jq -r 'first(.manifests[].digest)')
52
- digest=$(curl -s \
53
- --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
54
- --header "Authorization: Bearer ${token}" \
55
- "https://ghcr.io/v2/${image}/manifests/${multidigest}" \
56
- | jq -r '.config.digest')
47
+ multidigest=$(curl -s \
48
+ --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
49
+ --header "Accept: application/vnd.oci.image.index.v1+json" \
50
+ --header "Authorization: Bearer ${token}" \
51
+ "https://ghcr.io/v2/${image}/manifests/${tag}")
52
+ multidigest=$(jq -r ".manifests[] | select(.platform.architecture == \"amd64\").digest?" <<< "${multidigest}")
53
+ digest=$(curl -s \
54
+ --header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
55
+ --header "Accept: application/vnd.oci.image.manifest.v1+json" \
56
+ --header "Authorization: Bearer ${token}" \
57
+ "https://ghcr.io/v2/${image}/manifests/${multidigest}" \
58
+ | jq -r '.config.digest')
57
59
image_info=$(curl -sL \
58
60
--header "Authorization: Bearer ${token}" \
59
61
"https://ghcr.io/v2/${image}/blobs/${digest}")
77
79
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
78
80
echo "Version \`${EXT_RELEASE}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
79
81
exit 0
80
- elif [[ $(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.20 /community/aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp && awk '/^P:'"pidgin"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://') != "${EXT_RELEASE}" ]]; then
82
+ elif [[ $(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.21 /community/aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp && awk '/^P:'"pidgin"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://') != "${EXT_RELEASE}" ]]; then
81
83
echo "New version \`${EXT_RELEASE}\` found; but not all arch repos updated yet; exiting" >> $GITHUB_STEP_SUMMARY
82
84
FAILURE_REASON="New version ${EXT_RELEASE} for pidgin tag latest is detected, however not all arch repos are updated yet. Will try again later."
83
85
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
0 commit comments