From 33bf713f6a1e049b593f1e7dcde03aeddfa416a0 Mon Sep 17 00:00:00 2001 From: Thomas Brugman <145768128+Githubguy132010@users.noreply.github.com> Date: Fri, 8 Nov 2024 17:20:20 +0100 Subject: [PATCH] Update build.yml to run on PR. --- .github/workflows/build.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 251ebaec5..8d0b77d8f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,10 +1,12 @@ name: Build ISO on: + pull_request: + branches: + - main workflow_dispatch: schedule: - # Run the workflow every day at midnight - - cron: 0 0 * * * + - cron: '0 0 * * *' # Run the workflow every day at midnight jobs: build: @@ -22,23 +24,23 @@ jobs: run: | set -e docker exec arch-container bash -c " - pacman -Syu --noconfirm && - pacman -S --noconfirm git archiso grub && - cd /workdir && - mkarchiso -v -w workdir/ -o out/ . + pacman -Syu --noconfirm && + pacman -S --noconfirm git archiso grub && + cd /workdir && + mkarchiso -v -w workdir/ -o out/ . " - name: Rename ISO to Arch.iso run: | set -e docker exec arch-container bash -c " - iso_file=\$(ls /workdir/out/*.iso 2>/dev/null | head -n 1) && - [ -n \"\$iso_file\" ] && mv \$iso_file /workdir/out/Arch.iso || echo 'No ISO file found.' + iso_file=\$(ls /workdir/out/*.iso 2>/dev/null | head -n 1) && + [ -n \"\$iso_file\" ] && mv \$iso_file /workdir/out/Arch.iso || echo 'No ISO file found.' " - name: List ISO files run: | - docker exec arch-container bash -c "ls -l /workdir/out/ || echo 'Failed to list files.'" + docker exec arch-container bash -c "ls -l /workdir/out/" || echo 'Failed to list files.' - name: Copy ISO to Host run: | @@ -48,7 +50,7 @@ jobs: id: date run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT - # Create a release on GitHub using Personal Access Token (PAT) + # Create a release on GitHub using GITHUB_TOKEN - name: Create GitHub Release id: create_release # Adding an ID to reference the release step uses: actions/create-release@v1.1.4