diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c81c08c..b5deb1d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -106,11 +106,6 @@ jobs: path: 'gtk+*.tar.xz' key: gtk-${{ env.GTK_VERSION }} - - name: Generate Checksum - run: | - cp PKGBUILD PKGBUILD.before - md5sum PKGBUILD >> PKGBUILD.md5 - - name: Start Arch Linux run: | # Start and update Arch Linux within a Docker container @@ -122,13 +117,21 @@ jobs: docker exec archlinux /bin/bash -c "echo 'builder ALL=(ALL:ALL) NOPASSWD:ALL' >> /etc/sudoers" docker exec archlinux chown -R builder /workspace - - name: Validate Package + - name: Validate PKGBUILD run: | - # Validate the PKGBUILD is the same and free from errors + echo "This step will check whether the PKGBUILD needs updating" + # Keep a copy of the original + cp PKGBUILD PKGBUILD.before + md5sum PKGBUILD >> PKGBUILD.md5 + + # Validate the PKGBUILD - these commands modify the file docker exec --workdir=/workspace --user builder archlinux makepkg --geninteg docker exec --workdir=/workspace --user builder archlinux namcap -i PKGBUILD - - name: Build Arch Package + # Inform the user if changes need to be made + md5sum -c PKGBUILD.md5 || (echo -e "\nTo fix, please push a commit with the following changes to the PKGBUILD file.\nHere's the patch:\n" && diff -u PKGBUILD.before PKGBUILD) + + - name: Make Package run: | docker exec --workdir=/workspace --user builder archlinux makepkg -s --noconfirm @@ -137,13 +140,7 @@ jobs: docker stop archlinux -t 1 docker rm archlinux - - name: Verify Checksum - run: | - echo "If this fails, the PKGBUILD needs updating" - diff PKGBUILD.before PKGBUILD - md5sum -c PKGBUILD.md5 - - - name: 'Upload Artifact: gtk3-classic' + - name: Upload Package uses: actions/upload-artifact@v3 with: name: gtk3-classic-run${{github.run_number}}-pkg diff --git a/README.md b/README.md index 6d8046d..a5ac929 100644 --- a/README.md +++ b/README.md @@ -242,7 +242,8 @@ regenerated automatically: (Provided in `pacman-contrib`) -For other distributions, it's just a SHA256 checksum of the files used in the package. +If you're not using Arch Linux, don't worry! When you create the pull request +and automated checks run, it'll fail ❌ and present a patch of required changes. ## Community