Skip to content

Commit 4beba21

Browse files
Merge pull request #8 from Githubguy132010/Githubguy132010-patch-2
Update build.yml to run on PR.
2 parents ec53261 + 33bf713 commit 4beba21

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

.github/workflows/build.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
name: Build ISO
22

33
on:
4+
pull_request:
5+
branches:
6+
- main
47
workflow_dispatch:
58
schedule:
6-
# Run the workflow every day at midnight
7-
- cron: 0 0 * * *
9+
- cron: '0 0 * * *' # Run the workflow every day at midnight
810

911
jobs:
1012
build:
@@ -22,23 +24,23 @@ jobs:
2224
run: |
2325
set -e
2426
docker exec arch-container bash -c "
25-
pacman -Syu --noconfirm &&
26-
pacman -S --noconfirm git archiso grub &&
27-
cd /workdir &&
28-
mkarchiso -v -w workdir/ -o out/ .
27+
pacman -Syu --noconfirm &&
28+
pacman -S --noconfirm git archiso grub &&
29+
cd /workdir &&
30+
mkarchiso -v -w workdir/ -o out/ .
2931
"
3032
3133
- name: Rename ISO to Arch.iso
3234
run: |
3335
set -e
3436
docker exec arch-container bash -c "
35-
iso_file=\$(ls /workdir/out/*.iso 2>/dev/null | head -n 1) &&
36-
[ -n \"\$iso_file\" ] && mv \$iso_file /workdir/out/Arch.iso || echo 'No ISO file found.'
37+
iso_file=\$(ls /workdir/out/*.iso 2>/dev/null | head -n 1) &&
38+
[ -n \"\$iso_file\" ] && mv \$iso_file /workdir/out/Arch.iso || echo 'No ISO file found.'
3739
"
3840
3941
- name: List ISO files
4042
run: |
41-
docker exec arch-container bash -c "ls -l /workdir/out/ || echo 'Failed to list files.'"
43+
docker exec arch-container bash -c "ls -l /workdir/out/" || echo 'Failed to list files.'
4244
4345
- name: Copy ISO to Host
4446
run: |
@@ -48,7 +50,7 @@ jobs:
4850
id: date
4951
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
5052

51-
# Create a release on GitHub using Personal Access Token (PAT)
53+
# Create a release on GitHub using GITHUB_TOKEN
5254
- name: Create GitHub Release
5355
id: create_release # Adding an ID to reference the release step
5456
uses: actions/[email protected]

0 commit comments

Comments
 (0)