Update .forgejo/workflows/package-check.yml

This commit is contained in:
melody 2025-07-06 23:00:53 +02:00
commit cdf0201bd4

View file

@ -31,22 +31,25 @@ jobs:
- uses: actions/checkout@v3
- name: Get latest package version
- name: Get latest package version
id: check
run: |
main_version=$(curl -s https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz \
| tar -xzO \
| grep -a 'cmd:rsync=' | sed 's/.*cmd:rsync=//' | sort -V | tail -n 1)
| awk '$0=="P:rsync" { getline; if ($0 ~ /^V:/) print substr($0,3) }' \
| sort -V | tail -n1)
community_version=$(curl -s https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz \
| tar -xzO \
| grep -a 'cmd:rsync=' | sed 's/.*cmd:rsync=//' | sort -V | tail -n 1)
| awk '$0=="P:rsync" { getline; if ($0 ~ /^V:/) print substr($0,3) }' \
| sort -V | tail -n1)
testing_version=$(curl -s https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz \
| tar -xzO \
| grep -a 'cmd:rsync=' | sed 's/.*cmd:rsync=//' | sort -V | tail -n 1)
| awk '$0=="P:rsync" { getline; if ($0 ~ /^V:/) print substr($0,3) }' \
| sort -V | tail -n1)
newest_version=$(echo -e "$main_version\n$community_version\n$testing_version" | sort -V | tail -n 1)
newest_version=$(echo -e "$main_version\n$community_version\n$testing_version" | sort -V | tail -n1)
echo "NEWEST_VERSION=$newest_version" >> $GITHUB_ENV