Refactor GitHub Actions workflows to use Docker run action for buildi… #6
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: Build ISO | ||
| on: | ||
| workflow_dispatch: | ||
| schedule: | ||
| - cron: '0 0 * * *' # Run the workflow every day at midnight | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: Build ISO in Arch Linux container | ||
| uses: addnab/docker-run-action@v3 | ||
| with: | ||
| image: archlinux:latest | ||
| options: --privileged | ||
| run: | | ||
| pacman -Syu --noconfirm | ||
| pacman -S --noconfirm git archiso grub | ||
| mkarchiso -v -w workdir/ -o out/ . | ||
| mv out/*.iso out/Arch.iso | ||
| - name: Get current date | ||
| id: date | ||
| run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | ||
| - name: Create GitHub Release | ||
| uses: softprops/action-gh-release@v1 | ||
| with: | ||
| files: out/Arch.iso | ||
| tag_name: v${{ github.run_id }}-release | ||
| release_name: "Arch Linux Release" | ||
| body: | | ||
| This release contains the Arch Linux ISO built on ${{ steps.date.outputs.date }}. | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||