Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
20 changes: 12 additions & 8 deletions .github/workflows/build-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
17 changes: 8 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand All @@ -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
Expand Down Expand Up @@ -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.'
10 changes: 4 additions & 6 deletions .github/workflows/dockerfile-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/ ."
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; }