mirror of
https://github.com/dockur/proxmox.git
synced 2026-07-27 16:54:51 +07:00
build: Fetch latest version from package archive (#52)
This commit is contained in:
@@ -25,14 +25,18 @@ jobs:
|
||||
name: Get remote package data
|
||||
run: |
|
||||
set -e -o pipefail
|
||||
latest_tag=$(curl -fsSL https://metadata.cdn.proxmox.com/download/changelogs/pve/dists/trixie/pve-no-subscription/p/pve-manager/ | grep -oP 'pve-manager_\K[0-9]+\.[0-9]+\.[0-9]+(?=\.changelog)' | sort -V | tail -1)
|
||||
latest_tag="";
|
||||
while read -r v; do {
|
||||
[ -z "$latest_tag" ] || dpkg --compare-versions "$v" gt "$latest_tag"; } && latest_tag="$v"
|
||||
done < <(curl -fsSL http://download.proxmox.com/debian/pve/dists/trixie/pve-no-subscription/binary-amd64/Packages.gz | \
|
||||
gzip -dc | awk '/^Package: proxmox-backup-server$/ {f=1; next} f && /^Version:/ {print $2; f=0}')
|
||||
|
||||
latest_tag="${latest_tag%-*}"
|
||||
echo "Found tag: \"${latest_tag}\""
|
||||
latest_version="${latest_tag%-*}"
|
||||
major="${latest_version%%.*}"
|
||||
minor="${latest_version#*.}"
|
||||
major="${latest_tag%%.*}"
|
||||
minor="${latest_tag#*.}"
|
||||
minor="${minor%%.*}"
|
||||
echo "latest_tag=$latest_tag" >> $GITHUB_ENV
|
||||
echo "latest_version=$latest_version" >> $GITHUB_ENV
|
||||
echo "latest_minor=$major.$minor" >> $GITHUB_ENV
|
||||
echo "latest_major=$major" >> $GITHUB_ENV
|
||||
-
|
||||
@@ -67,7 +71,7 @@ jobs:
|
||||
type=raw,value=latest,priority=100
|
||||
type=raw,value=${{ env.latest_major }},priority=250
|
||||
type=raw,value=${{ env.latest_minor }},priority=350
|
||||
type=raw,value=${{ env.latest_version }},priority=450
|
||||
type=raw,value=${{ env.latest_tag }},priority=450
|
||||
labels: |
|
||||
org.opencontainers.image.title=${{ vars.NAME }}
|
||||
env:
|
||||
|
||||
@@ -22,7 +22,6 @@ jobs:
|
||||
with:
|
||||
locale: "US"
|
||||
level: warning
|
||||
fail_level: error
|
||||
pattern: |
|
||||
*.md
|
||||
*.sh
|
||||
@@ -42,7 +41,6 @@ jobs:
|
||||
uses: reviewdog/action-yamllint@v1
|
||||
with:
|
||||
level: warning
|
||||
fail_level: error
|
||||
reporter: github-pr-review
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
-
|
||||
|
||||
Reference in New Issue
Block a user