diff --git a/.github/workflows/build-check.yaml b/.github/workflows/build-check.yaml index c1c9f256e..96385867f 100644 --- a/.github/workflows/build-check.yaml +++ b/.github/workflows/build-check.yaml @@ -29,16 +29,9 @@ jobs: mkarchiso -v -w workdir/ -o out/ . " - - name: Rename ISO to Arch.iso - run: | - 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.' - " - - name: Copy ISO to Host run: | - docker cp arch-container:/workdir/out/Arch.iso ${{ github.workspace }}/ || echo 'Failed to copy ISO to host.' + docker cp arch-container:/workdir/out/Arch.iso ${{ github.workspace }}/ - name: Get current date id: date @@ -90,5 +83,5 @@ jobs: - name: Clean Up run: | - docker stop arch-container || echo 'Failed to stop the container.' - docker rm arch-container || echo 'Failed to remove the container.' + docker stop arch-container + docker rm arch-container diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index da0d8191a..1094c1606 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,7 +19,6 @@ 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 && @@ -27,21 +26,10 @@ jobs: 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.' - " - - - name: List ISO files - run: | - docker exec arch-container bash -c "ls -l /workdir/out/" || echo 'Failed to list files.' - + - name: Copy ISO to Host run: | - docker cp arch-container:/workdir/out/Arch.iso ${{ github.workspace }}/ || echo 'Failed to copy ISO to host.' + docker cp arch-container:/workdir/out/Arch.iso ${{ github.workspace }}/ - name: Get current date id: date @@ -74,5 +62,5 @@ jobs: - name: Clean Up run: | - docker stop arch-container || echo 'Failed to stop the container.' - docker rm arch-container || echo 'Failed to remove the container.' + docker stop arch-container + docker rm arch-container diff --git a/.github/workflows/dockerfile-check.yaml b/.github/workflows/dockerfile-check.yaml index ed690462d..913d0369d 100644 --- a/.github/workflows/dockerfile-check.yaml +++ b/.github/workflows/dockerfile-check.yaml @@ -1,23 +1,35 @@ -name: Check to make sure Dockerfile works +name: Check Dockerfile and Build Arch ISO on: pull_request: branches: [ "main" ] workflow_dispatch: schedule: - # Run the workflow on the 1st of every month at midnight - cron: 0 0 * * * jobs: build: - runs-on: ubuntu-latest # Use a standard runner + runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v4 - - name: Build and Run Docker container + - name: Ensure Docker is installed run: | - 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; } + if ! command -v docker &> /dev/null; then + echo "Docker is not installed. Installing..." + sudo apt-get update + sudo apt-get install -y docker.io + sudo systemctl start docker + sudo systemctl enable docker + fi + docker --version # Check Docker versie + + - name: Build and Run Docker Container + run: | + docker build -t arch-iso-builder . + docker run --rm --privileged \ + -v "${{ github.workspace }}:/workdir" \ + arch-iso-builder \ + bash -c "mkarchiso -v -w workdir/ -o out/ ." diff --git a/README.md b/README.md index fa1230892..ee86e493b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ - --- # Arch Linux Without the Beeps diff --git a/profiledef.sh b/profiledef.sh index ce26e793d..6aee89e26 100644 --- a/profiledef.sh +++ b/profiledef.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # shellcheck disable=SC2034 -iso_name="archlinux" +iso_name="Arch" iso_label="ARCH_$(date --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y%m)" iso_publisher="Arch Linux " iso_application="Arch Linux Live/Rescue DVD"