Skip to content

Commit

Permalink
withdraw using 'wolfictl withdraw'
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Hall <[email protected]>
  • Loading branch information
imjasonh committed Nov 6, 2023
1 parent 0144a4d commit 5662596
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/withdraw-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,28 +46,28 @@ jobs:
sudo mkdir -p /etc/apk/keys
sudo cp ./wolfi-signing.rsa.pub /etc/apk/keys/wolfi-signing.rsa.pub
- name: 'Delete withdrawn packages'
- name: Withdraw from index
run: |
for arch in x86_64 aarch64; do
curl -o $arch/APKINDEX.tar.gz https://packages.wolfi.dev/os/$arch/APKINDEX.tar.gz
for pkg in $(grep -v '\#' withdrawn-packages.txt); do
echo "=> $pkg"
gsutil -m rm -f gs://wolfi-production-registry-destination/os/$arch/$pkg || true
pkg=${pkg%.apk}
cat APKINDEX.tar.gz | wolfictl withdraw ${pkg} --signing-key="${{ github.workspace }}/wolfi-signing.rsa" > APKINDEX.tar.gz.new
mv APKINDEX.tar.gz.new APKINDEX.tar.gz
done
done
- name: 'Sync public package repository'
- name: Delete withdrawn packages
run: |
mkdir "${{ github.workspace }}/packages"
gsutil -m rsync -r gs://wolfi-production-registry-destination/os/ "${{ github.workspace }}/packages/"
find "${{ github.workspace }}/packages" -print -exec touch \{} \;
for arch in x86_64 aarch64; do
for pkg in $(grep -v '\#' withdrawn-packages.txt); do
echo "=> $pkg"
gsutil -m rm -f gs://wolfi-production-registry-destination/os/$arch/$pkg || true
done
done
- name: 'Reconcile Wolfi index'
- name: Upload modified index
run: |
for arch in x86_64 aarch64; do
pushd "${{ github.workspace }}/packages/"$arch
melange index -o APKINDEX.tar.gz -a $arch *.apk
melange sign-index --signing-key="${{ github.workspace }}/wolfi-signing.rsa" APKINDEX.tar.gz
gsutil -h "Cache-Control:no-store" cp "${{ github.workspace }}/packages/${arch}/APKINDEX.tar.gz" gs://wolfi-production-registry-destination/os/${arch}/APKINDEX.tar.gz
gsutil -h "Cache-Control:no-store" cp "${{ github.workspace }}/packages/${arch}/APKINDEX.json" gs://wolfi-production-registry-destination/os/${arch}/APKINDEX.json
popd
gsutil cp $arch/APKINDEX.tar.gz gs://wolfi-production-registry-destination/os/$arch/APKINDEX.tar.gz || true
done

0 comments on commit 5662596

Please sign in to comment.