# This workflow will build an Arch Linux ISO file with the commit on it

name: Build Arch ISO with ArchInstall Commit

on:
  push:
    branches:
      - master
      - main # In case we adopt this convention in the future
  pull_request:
    paths-ignore:
      - 'docs/**'
      - '**.editorconfig'
      - '**.gitignore'
      - '**.md'
      - 'LICENSE'
      - 'PKGBUILD'
  release:
    types:
      - created

jobs:
  build:
    runs-on: ubuntu-latest
    container:
      image: archlinux/archlinux:latest
      options: --privileged
    steps:
      - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
      - run: pwd
      - run: find .
      - run: cat /etc/os-release
      - run: pacman-key --init
      - run: pacman --noconfirm -Sy archlinux-keyring
      - run: ./build_iso.sh
      - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5
        with:
          name: Arch Live ISO
          path: /tmp/archlive/out/*.iso
