Update .forgejo/workflows/package-check.yml

This commit is contained in:
melody 2025-06-18 14:26:23 +02:00
commit 86e0c71782

View file

@ -13,7 +13,7 @@ jobs:
- name: Install dependencies for other steps - name: Install dependencies for other steps
shell: sh shell: sh
run: | run: |
apk add --no-cache git nodejs npm bash apk add --no-cache git nodejs npm bash sed
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -22,7 +22,7 @@ jobs:
id: check id: check
run: | run: |
PACKAGE="curl" PACKAGE="curl"
LATEST=$(apk policy $PACKAGE | grep -Eo '[0-9]+\.[0-9]+\.[0-9]+[_a-zA-Z0-9.-]*' | head -n1 || echo "unknown") LATEST=$(apk policy $PACKAGE | sed -n '2p' | sed 's/^[[:space:]]*//; s/[[:space:]:]*$//')
echo "latest_version=$LATEST" >> "$GITHUB_OUTPUT" echo "latest_version=$LATEST" >> "$GITHUB_OUTPUT"
- name: Compare with last known version - name: Compare with last known version