diff --git a/.forgejo/workflows/void-packages.yml b/.forgejo/workflows/void-packages.yml index 9287474..3192043 100644 --- a/.forgejo/workflows/void-packages.yml +++ b/.forgejo/workflows/void-packages.yml @@ -8,23 +8,24 @@ jobs: update-template: name: Update xbps-src template runs-on: ubuntu-latest - needs: release steps: - uses: actions/checkout@v4 with: fetch-depth: 0 token: ${{ secrets.FORGEJO_PUSH_TOKEN }} - repository: "https://git.snaile.de/snailed/void-packages" + repository: "snailed/void-packages" + sparse-checkout: "srcpkgs/dwm-custom/" + ref: "master" - name: Get checksum id: checksum run: | - echo "sha256sum=$(curl -s https://git.snaile.de/snailed/dwm-custom/archive/${{ github.ref }}.tar.gz | sha256sum | cut -d ' ' -f 1)" >>$GITHUB_OUTPUT + echo "sha256sum=$(curl -s https://git.snaile.de/snailed/dwm-custom/archive/${{ github.ref_name }}.tar.gz | sha256sum | cut -d ' ' -f 1)" >>$GITHUB_OUTPUT - name: Replace checksum and version run: | - sed -i 's/version=[0-9]\+\.[0-9]\+\.[0-9]\+/version=${{ github.ref }}/' srcpkgs/dwm-custom/template - sed -i 's/checksum=.\+/checksum=${{ steps.checksum.outputs.sha256 }}/' srcpkgs/dwm-custom/template + sed -i '/version=/ c version=${{ github.ref_name }}' srcpkgs/dwm-custom/template + sed -i '/checksum=/ c checksum=${{ steps.checksum.outputs.sha256 }}' srcpkgs/dwm-custom/template - name: Commit uses: https://github.com/stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a # v4.16.0 @@ -32,4 +33,4 @@ jobs: commit_user_name: "Johnny5" commit_user_email: "bot@snaile.de" commit_author: "Johnny5 " - commit_message: "dwm-custom: update to ${{ github.ref }}." + commit_message: "dwm-custom: update to ${{ github.ref_name }}."