diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 467096b13..f6c4a759c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,12 +2,11 @@ version: 2 updates: # Update for GitHub Actions dependencies - package-ecosystem: "github-actions" - directory: "/" # Root directory where your GitHub Actions workflows are located (usually .github/workflows) + directory: "/" # Root directory for GitHub Actions workflows schedule: - interval: "daily" # Check for updates weekly - day: "monday" # Run every Monday - time: "08:00" # At 8:00 UTC + interval: "daily" # Check for updates daily (previously mentioned as weekly) + time: "08:00" # Run every day at 08:00 UTC, day specification removed as it's redundant labels: - "github-actions" assignees: - - "Githubguy132010" # Replace with your GitHub username + - "Githubguy132010" # Replace with your GitHub username diff --git a/.github/workflows/build-check.yml b/.github/workflows/build-check.yml index 2344e3913..285b24aab 100644 --- a/.github/workflows/build-check.yml +++ b/.github/workflows/build-check.yml @@ -20,13 +20,17 @@ jobs: - name: Set up Arch Linux Container run: | - docker run --privileged --name arch-container -d -v ${{ github.workspace }}:/workdir archlinux:latest sleep infinity + if ! docker run --privileged --name arch-container -d -v ${{ github.workspace }}:/workdir archlinux:latest sleep infinity; then + echo "Failed to start Arch Linux container." && exit 1 + fi - - name: Build ISO in Arch Container + - name: Update and Build ISO in Arch Container run: | - docker exec arch-container bash -c " - pacman -Syu --noconfirm && - pacman -S --noconfirm git archiso grub && - cd /workdir && - mkarchiso -v -w workdir/ -o out/ . - " + if ! docker exec arch-container bash -c " + pacman -Syu --noconfirm && + pacman -S --noconfirm git archiso grub && + cd /workdir && + mkarchiso -v -w workdir/ -o out/ . + "; then + echo "Failed to build ISO." && exit 1 + fi diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a1153fdbf..251ebaec5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,6 +20,7 @@ jobs: - name: Build ISO in Arch Container run: | + set -e docker exec arch-container bash -c " pacman -Syu --noconfirm && pacman -S --noconfirm git archiso grub && @@ -29,21 +30,19 @@ jobs: - name: Rename ISO to Arch.iso run: | + set -e docker exec arch-container bash -c " - # Find the created ISO (assuming only one .iso file in the output directory) - iso_file=\$(ls /workdir/out/*.iso | head -n 1) && - mv \$iso_file /workdir/out/Arch.iso + 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: | - # List files in the output directory to verify renaming - docker exec arch-container bash -c "ls -l /workdir/out/" + docker exec arch-container bash -c "ls -l /workdir/out/ || echo 'Failed to list files.'" - name: Copy ISO to Host run: | - # Copy the renamed ISO to the host - docker cp arch-container:/workdir/out/Arch.iso ${{ github.workspace }}/ + docker cp arch-container:/workdir/out/Arch.iso ${{ github.workspace }}/ || echo 'Failed to copy ISO to host.' - name: Get current date id: date @@ -76,5 +75,5 @@ jobs: - name: Clean Up run: | - docker stop arch-container - docker rm arch-container + docker stop arch-container || echo 'Failed to stop the container.' + docker rm arch-container || echo 'Failed to remove the container.' diff --git a/.github/workflows/dockerfile-check.yml b/.github/workflows/dockerfile-check.yml index 733f440d0..8ddccebe0 100644 --- a/.github/workflows/dockerfile-check.yml +++ b/.github/workflows/dockerfile-check.yml @@ -18,10 +18,8 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 - - name: Build Docker container + - name: Build and Run Docker container run: | - docker build -t arch-iso-builder . - - - name: Make ISO in Docker container - run: | - docker run --rm --privileged -v $(pwd):/workdir arch-iso-builder bash -c "mkarchiso -v -w workdir/ -o out/ ." \ No newline at end of file + set -e # Exit immediately if a command exits with a non-zero status + docker build -t arch-iso-builder . || { echo "Docker build failed"; exit 1; } + docker run --rm --privileged -v "$(pwd)":/workdir arch-iso-builder bash -c "mkarchiso -v -w workdir/ -o out/ ." || { echo "ISO creation failed"; exit 1; }