forgejo-ci: add ALL_PACKAGES var to skip maintainer filter

This commit is contained in:
Antoine Martin 2024-12-01 12:41:32 -05:00
parent a068733225
commit c7b83a4ee1
Signed by: forge
GPG key ID: D62A472A4AA7D541
2 changed files with 8 additions and 3 deletions

View file

@ -7,9 +7,13 @@ repo=${downstream/*\/}
curl --silent $downstream/x86_64/APKINDEX.tar.gz | tar -O -zx APKINDEX > APKINDEX
owned_by_you=$(awk -v RS= -v ORS="\n\n" '/m:Antoine Martin \(ayakael\) <dev@ayakael.net>/' APKINDEX | awk -F ':' '{if($1=="o"){print $2}}' | sort | uniq)
echo "Found $(printf '%s\n' $owned_by_you | wc -l ) packages owned by you"
if [ "$ALL_PACKAGES" == "true" ]; then
owned_by_you=$(awk -F ':' '{if($1=="o"){print $2}}' APKINDEX | sort | uniq)
echo "Found $(printf '%s\n' $owned_by_you | wc -l ) packages"
else
owned_by_you=$(awk -v RS= -v ORS="\n\n" '/m:Antoine Martin \(ayakael\) <dev@ayakael.net>/' APKINDEX | awk -F ':' '{if($1=="o"){print $2}}' | sort | uniq)
echo "Found $(printf '%s\n' $owned_by_you | wc -l ) packages owned by you"
fi
rm -f out_of_date not_in_anitya

View file

@ -14,6 +14,7 @@ jobs:
downstream: https://dl-cdn.alpinelinux.org/alpine/edge/community
FORGEJO_TOKEN: ${{ secrets.forgejo_token }}
LABEL_NUMBER: 4
ALL_PACKAGES: true
steps:
- name: Environment setup
run: apk add grep coreutils gawk curl wget bash nodejs git jq sed