Update .forgejo/workflows/package-check.yml
This commit is contained in:
parent
0d6af808a0
commit
cdf0201bd4
1 changed files with 17 additions and 14 deletions
|
@ -31,24 +31,27 @@ jobs:
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Get latest package version
|
- name: Get latest package version
|
||||||
id: check
|
id: check
|
||||||
run: |
|
run: |
|
||||||
main_version=$(curl -s https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz \
|
main_version=$(curl -s https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz \
|
||||||
| tar -xzO \
|
| 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 \
|
community_version=$(curl -s https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz \
|
||||||
| tar -xzO \
|
| 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 \
|
testing_version=$(curl -s https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz \
|
||||||
| tar -xzO \
|
| 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
|
echo "NEWEST_VERSION=$newest_version" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Determine if update is needed
|
- name: Determine if update is needed
|
||||||
run: |
|
run: |
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue