Merge branch 'main' into Enhance-WF #22
Workflow file for this run
This file contains hidden or 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 if ISO can be built | ||
| on: | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '0 0 * * *' | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v4 | ||
| - name: Build ISO in Arch Linux Container | ||
| uses: addnab/docker-run-action@v3 | ||
| with: | ||
| image: archlinux:latest | ||
| options: > | ||
| --privileged | ||
| --workdir /workdir | ||
| -v ${{ github.workspace }}:/workdir | ||
| run: | | ||
| pacman -Syu --noconfirm | ||
| pacman -S --noconfirm git archiso grub | ||
| mkarchiso -v -w workdir/ -o out/ . | ||
| " | ||
| - name: Rename ISO to Arch.iso | ||
| run: | | ||
| docker exec arch-container bash -c " | ||
| 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: Copy ISO to Host | ||
| run: | | ||
| docker cp arch-container:/workdir/out/Arch.iso ${{ github.workspace }}/ || echo 'Failed to copy ISO to host.' | ||
| - name: Get current date | ||
| id: date | ||
| run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | ||
| - name: Create GitHub Release | ||
| id: create_release | ||
| uses: actions/[email protected] | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| name: Arch.iso | ||
| path: out/Arch.iso | ||
| - name: Delete ISO Artifact | ||
| if: always() | ||
| run: | | ||
| rm -f out/Arch.iso | ||