Build ArchISO #38
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: Build ArchISO | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * 0" | |
jobs: | |
build: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
container: | |
image: archlinux:latest | |
options: --privileged | |
steps: | |
- name: Checkout files | |
uses: actions/checkout@v4 | |
- name: Edit pacman and makepkg config | |
run: | | |
sed -i 's|#ParallelDownloads.*|ParallelDownloads = 20|' /etc/pacman.conf | |
sed -i 's|#MAKEFLAGS.*|MAKEFLAGS="j4"|' /etc/makepkg.conf | |
- name: Update mirrorlist | |
run: echo -e 'Server = https://mirror.osbeck.com/archlinux/$repo/os/$arch\nServer = https://cloudflaremirrors.com/archlinux/$repo/os/$arch\nServer = https://archlinux.mailtunnel.eu/$repo/os/$arch' > /etc/pacman.d/mirrorlist | |
- name: Initialize pacman secret key | |
run: pacman-key --init | |
- name: Add archlinuxcn repo & install keyring | |
run: | | |
echo -e '\n[archlinuxcn]\nServer = https://repo.archlinuxcn.org/$arch' >> /etc/pacman.conf | |
pacman -Syyu --noconfirm archlinuxcn-keyring | |
- name: Build ArchISO | |
run: | | |
pacman -Syy --noconfirm archiso base-devel git | |
./scripts/build.sh | |
- name: Create release tags | |
run: | | |
outDir=archiso-apfs/out | |
isoPath=$(find $outDir -type f) | |
isoName=$(basename $isoPath) | |
echo "filePath=$isoPath" >> $GITHUB_ENV | |
echo "fileName=$isoName" >> $GITHUB_ENV | |
echo "fileTag=$(date +'%Y.%m.%d')" >> $GITHUB_ENV | |
cd $outDir | |
sha256sum $isoName > sha256sum.txt | |
b2sum $isoName > b2sum.txt | |
- name: Release ArchISO | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
${{ env.filePath }} | |
archiso-apfs/out/sha256sum.txt | |
archiso-apfs/out/b2sum.txt | |
name: ${{ env.fileName }} | |
tag_name: ${{ env.fileTag }} |