Skip to content

Update blank.yml

Update blank.yml #5

Workflow file for this run

name: Build ISO
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest # Use a standard runner
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Arch Linux Container
run: |
docker run --privileged --name arch-container -d -v ${{ github.workspace }}:/workdir archlinux:latest sleep infinity
- name: Build ISO in Arch Container
run: |
docker exec arch-container bash -c "
pacman -Syu --noconfirm &&
pacman -S --noconfirm git archiso grub &&
cd /workdir &&
sudo mkarchiso -v -w workdir/ -o out/ .
"
- name: Rename ISO to Arch
run: |
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
"
- name: List ISO files
run: |
# List files in the output directory to verify renaming
docker exec arch-container bash -c "ls -l /workdir/out/"
- name: Copy ISO to Host
run: |
# Copy the renamed ISO to the host
docker cp arch-container:/workdir/out/Arch.iso ${{ github.workspace }}/
- name: Upload Build Artifact
uses: actions/[email protected]
with:
name: Arch Linux
path: "Arch.iso"
retention-days: 90
include-hidden-files: false
- name: Clean Up
run: |
docker stop arch-container
docker rm arch-container