Skip to content

Refactor GitHub Actions workflows to use Docker run action for building Arch Linux ISO and streamline ISO handling process #15

Refactor GitHub Actions workflows to use Docker run action for building Arch Linux ISO and streamline ISO handling process

Refactor GitHub Actions workflows to use Docker run action for building Arch Linux ISO and streamline ISO handling process #15

name: Check to make sure Dockerfile works
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
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Build and Run Docker container
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; }