Check to make sure Dockerfile works #159
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; } |