From 12e04bc2ac0e604ac8a8510d0bee5ab03a68d475 Mon Sep 17 00:00:00 2001 From: Antoine Martin Date: Tue, 10 Dec 2024 14:05:38 -0500 Subject: [PATCH] Use zstd --- .forgejo/workflows/generale-tarball.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/generale-tarball.yml b/.forgejo/workflows/generale-tarball.yml index 9a73d9c79..ce36dbda0 100644 --- a/.forgejo/workflows/generale-tarball.yml +++ b/.forgejo/workflows/generale-tarball.yml @@ -14,9 +14,10 @@ jobs: image: alpine:3.19 env: CI_PROJECT_NAME: papermc + ZSTD_LIMIT: 0 steps: - name: Environment setup - run: apk add nodejs git openjdk21-jre-headless gzip xz tar + run: apk add nodejs git openjdk21-jre-headless zstd tar - name: Repo pull uses: actions/checkout@v4 with: @@ -40,9 +41,9 @@ jobs: echo "Generating tarball.." tar -cf $CI_PROJECT_NAME-$CI_REF_NAME.tar --exclude-backups --exclude-caches-all --exclude-vcs $CI_PROJECT_NAME-$CI_REF_NAME echo "Compressing $CI_PROJECT_NAME-$CI_REF_NAME.tar.xz" - xz -T0 -9 -vv -e -c > ./$CI_PROJECT_NAME-$CI_REF_NAME.tar.xz < ./$CI_PROJECT_NAME-$CI_REF_NAME.tar + zstd --auto-threads=logical --ultra --long -22 -T"$ZSTD_LIMIT" -vv $CI_PROJECT_NAME-$CI_REF_NAME.tar -o $CI_PROJECT_NAME-$CI_REF_NAME.tar.zst echo "Generating sha512sum" - sha512sum $CI_PROJECT_NAME-$CI_REF_NAME.tar.gz > $CI_PROJECT_NAME-$CI_REF_NAME.tar.gz.sha512sum + sha512sum $CI_PROJECT_NAME-$CI_REF_NAME.tar.zst > $CI_PROJECT_NAME-$CI_REF_NAME.tar.zst.sha512sum - name: Package upload uses: forgejo/upload-artifact@v3 with: @@ -66,5 +67,5 @@ jobs: else CI_REF_NAME=$GITHUB_REF_NAME fi - curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./tarball/papermc-*.tar.gz ${{ github.server_url }}/api/packages/mirrors/generic/papermc/$CI_REF_NAME/papermc-$CI_REF_NAME.tar.gz - curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./tarball/papermc-*.tar.gz.sha512sum ${{ github.server_url }}/api/packages/mirrors/generic/papermc/$CI_REF_NAME/papermc-$CI_REF_NAME.tar.gz.sha512sum + curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./tarball/papermc-*.tar.zst ${{ github.server_url }}/api/packages/mirrors/generic/papermc/$CI_REF_NAME/papermc-$CI_REF_NAME.tar.zst + curl --user ${{ vars.CODE_FORGEJO_USER }}:${{ secrets.CODE_FORGEJO_TOKEN }} --upload-file ./tarball/papermc-*.tar.zst.sha512sum ${{ github.server_url }}/api/packages/mirrors/generic/papermc/$CI_REF_NAME/papermc-$CI_REF_NAME.tar.zst.sha512sum