File tree Expand file tree Collapse file tree 4 files changed +28
-28
lines changed Expand file tree Collapse file tree 4 files changed +28
-28
lines changed Original file line number Diff line number Diff line change @@ -2,12 +2,11 @@ version: 2
22updates :
33 # Update for GitHub Actions dependencies
44 - package-ecosystem : " github-actions"
5- directory : " /" # Root directory where your GitHub Actions workflows are located (usually .github/workflows)
5+ directory : " /" # Root directory for GitHub Actions workflows
66 schedule :
7- interval : " daily" # Check for updates weekly
8- day : " monday" # Run every Monday
9- time : " 08:00" # At 8:00 UTC
7+ interval : " daily" # Check for updates daily (previously mentioned as weekly)
8+ time : " 08:00" # Run every day at 08:00 UTC, day specification removed as it's redundant
109 labels :
1110 - " github-actions"
1211 assignees :
13- - " Githubguy132010" # Replace with your GitHub username
12+ - " Githubguy132010" # Replace with your GitHub username
Original file line number Diff line number Diff line change @@ -20,13 +20,17 @@ jobs:
2020
2121 - name : Set up Arch Linux Container
2222 run : |
23- docker run --privileged --name arch-container -d -v ${{ github.workspace }}:/workdir archlinux:latest sleep infinity
23+ if ! docker run --privileged --name arch-container -d -v ${{ github.workspace }}:/workdir archlinux:latest sleep infinity; then
24+ echo "Failed to start Arch Linux container." && exit 1
25+ fi
2426
25- - name : Build ISO in Arch Container
27+ - name : Update and Build ISO in Arch Container
2628 run : |
27- docker exec arch-container bash -c "
28- pacman -Syu --noconfirm &&
29- pacman -S --noconfirm git archiso grub &&
30- cd /workdir &&
31- mkarchiso -v -w workdir/ -o out/ .
32- "
29+ if ! docker exec arch-container bash -c "
30+ pacman -Syu --noconfirm &&
31+ pacman -S --noconfirm git archiso grub &&
32+ cd /workdir &&
33+ mkarchiso -v -w workdir/ -o out/ .
34+ "; then
35+ echo "Failed to build ISO." && exit 1
36+ fi
Original file line number Diff line number Diff line change 2020
2121 - name : Build ISO in Arch Container
2222 run : |
23+ set -e
2324 docker exec arch-container bash -c "
2425 pacman -Syu --noconfirm &&
2526 pacman -S --noconfirm git archiso grub &&
@@ -29,21 +30,19 @@ jobs:
2930
3031 - name : Rename ISO to Arch.iso
3132 run : |
33+ set -e
3234 docker exec arch-container bash -c "
33- # Find the created ISO (assuming only one .iso file in the output directory)
34- iso_file=\$(ls /workdir/out/*.iso | head -n 1) &&
35- mv \$iso_file /workdir/out/Arch.iso
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.'
3637 "
3738
3839 - name : List ISO files
3940 run : |
40- # List files in the output directory to verify renaming
41- docker exec arch-container bash -c "ls -l /workdir/out/"
41+ docker exec arch-container bash -c "ls -l /workdir/out/ || echo 'Failed to list files.'"
4242
4343 - name : Copy ISO to Host
4444 run : |
45- # Copy the renamed ISO to the host
46- docker cp arch-container:/workdir/out/Arch.iso ${{ github.workspace }}/
45+ docker cp arch-container:/workdir/out/Arch.iso ${{ github.workspace }}/ || echo 'Failed to copy ISO to host.'
4746
4847 - name : Get current date
4948 id : date
7675
7776 - name : Clean Up
7877 run : |
79- docker stop arch-container
80- docker rm arch-container
78+ docker stop arch-container || echo 'Failed to stop the container.'
79+ docker rm arch-container || echo 'Failed to remove the container.'
Original file line number Diff line number Diff line change 1818 - name : Checkout Repository
1919 uses : actions/checkout@v4
2020
21- - name : Build Docker container
21+ - name : Build and Run Docker container
2222 run : |
23- docker build -t arch-iso-builder .
24-
25- - name : Make ISO in Docker container
26- run : |
27- docker run --rm --privileged -v $(pwd):/workdir arch-iso-builder bash -c "mkarchiso -v -w workdir/ -o out/ ."
23+ set -e # Exit immediately if a command exits with a non-zero status
24+ docker build -t arch-iso-builder . || { echo "Docker build failed"; exit 1; }
25+ docker run --rm --privileged -v "$(pwd)":/workdir arch-iso-builder bash -c "mkarchiso -v -w workdir/ -o out/ ." || { echo "ISO creation failed"; exit 1; }
You can’t perform that action at this time.
0 commit comments