Update .forgejo/workflows/package-check.yml

This commit is contained in:
melody 2025-06-18 15:01:14 +02:00
commit aa2a2c3f60

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 sed apk add --no-cache git nodejs npm bash sed curl
- name: Checkout repo - name: Checkout repo
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -23,8 +23,7 @@ jobs:
shell: sh shell: sh
run: | run: |
PACKAGE="curl" PACKAGE="curl"
LATEST=$(apk policy "$PACKAGE" | sed -n '2p' | sed 's/^[[:space:]]*//; s/[[:space:]:]*$//') LATEST=$(apk policy "$PACKAGE" | awk '/^[[:space:]]*[0-9]/ { gsub(":", "", $1); print $1; exit }') echo "LATEST_VERSION=$LATEST" >> $GITHUB_ENV
echo "LATEST_VERSION=$LATEST" >> $GITHUB_ENV
echo "latest_version=$LATEST" >> $GITHUB_OUTPUT echo "latest_version=$LATEST" >> $GITHUB_OUTPUT
- name: Compare with last known version - name: Compare with last known version