Skip to content

iso_build

iso_build #142

Workflow file for this run

name: iso_build
on:
workflow_dispatch:
# schedule:
# - cron: '30 2 * * *'
jobs:
prepare-release:
runs-on: self-hosted
steps:
- name: Allow workflow to be cancelled
uses: styfle/cancel-workflow-action@0.9.0
with:
access_token: ${{ github.token }}
- name: Get release tag
id: release-tag
run: echo "::set-output name=release-tag::ELARCH_$(date +'%d/%m/%Y-%H-%M-%S')"
outputs:
release_tag: ${{ steps.release-tag.outputs.release-tag }}
build-release:
runs-on: self-hosted
needs: [prepare-release]
permissions:
contents: write
container:
image: ghcr.io/evangelospro/archbase:latest
options: --privileged
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Check dependencies
run: |
# Speedup package building with some custom options
cp dot_config/pacman/makepkg.conf /etc/makepkg.conf
cd iso
# MUST RUN ./setup.sh on new systems to add chaotic-aur and multilib already done in the used docker container no need to redo
# Set timezone and locale
ln -sf /usr/share/zoneinfo/Europe/Athens /etc/localtime
echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
# Install necessary packages
pacman -Syu go archiso gcc pkg-config zip rust cargo scdoc wlroots meson ninja cmake --needed --noconfirm
# replace "exit $E_ROOT" with "#exit $E_ROOT" in /usr/bin/makepkg, only do this in a container not when building locally, building with root is DANGEROUS!!!
sed -i 's/exit $E_ROOT/#exit $E_ROOT/g' /usr/bin/makepkg
- name: Build ISO
run: |
cd iso
./build.sh
- name: Upload Releases only if build was successful
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ needs.prepare-release.outputs.release_tag }}
files: |
iso/isoOUT/*.iso.sha256
iso/isoOUT/*.part*
iso/archiso/all_packages.x86_64
fail_on_unmatched_files: true