Skip to content

Build aarch64/octopi #1300

Build aarch64/octopi

Build aarch64/octopi #1300

name: Builder (Self-hosted aarch64)
run-name: Build ${{ inputs.pkgbase }}
on:
workflow_dispatch:
inputs:
pkgbase:
description: 'Path to pkgbase'
required: true
jobs:
build:
runs-on: ARM64
timeout-minutes: 4320
container:
image: arch4edu/archlinuxarm
options: --privileged
volumes:
- /build:/mnt
- /build:/var/cache/pacman
env:
CACTUS_CONFIG: ${{ secrets.CACTUS_CONFIG }}
steps:
- name: Install runtime dependencies
run: |
mkdir -p /mnt/sync /var/lib/pacman
rm -rf /var/lib/pacman/sync
ln -sf /mnt/sync /var/lib/pacman/sync
sed '/\[community\]/,+2d' -i /etc/pacman.conf || :
pacman-key --init
pacman-key --populate archlinuxarm
pacman -Syu --noconfirm
pacman -S --noconfirm --needed --assume-installed python-dulwich base-devel devtools-alarm dbus git github-cli jq pacman-contrib pyalpm python-mysqlclient wget yq zsh
sed '/\[community\]/,+2d' -i /usr/share/devtools/pacman*.conf || :
- uses: arch4edu/cactus/actions/setup-cactus@main
- name: Export configurations
id: config
run: python -m cactus.common.config
- uses: arch4edu/cactus/actions/update-status@main
with:
pkgbase: ${{ github.event.inputs.pkgbase }}
status: building
workflow: ${{ github.run_id }}
- uses: actions/checkout@master
with:
repository: ${{ steps.config.outputs.github_repository }}
path: repository
token: ${{ steps.config.outputs.github_token }}
- uses: arch4edu/cactus/actions/config-pacman-repository@main
with:
pacman-repository: ${{ steps.config.outputs.pacman_repository }}
keyring-repository: ${{ steps.config.outputs.pacman_keyring_repository }}
mirrorlist-repository: ${{ steps.config.outputs.pacman_mirrorlist_repository }}
- uses: arch4edu/cactus/actions/config-makepkg@main
- uses: petronny/git-config-user@master
with:
path: repository
- name: Configure GitHub CLI
run: echo ${{ steps.config.outputs.github_token }} | gh auth login --with-token
- name: Add path
run: echo "$(realpath cactus/builder/bin)" >> $GITHUB_PATH
- name: Download dependencies
run: python -m cactus.builder.download-depends repository ${{ github.event.inputs.pkgbase }}
- uses: arch4edu/cactus/actions/build-package@main
id: build
with:
pkgbase: ${{ github.event.inputs.pkgbase }}
- uses: arch4edu/cactus/actions/upload-log@main
with:
pkgbase: ${{ github.event.inputs.pkgbase }}
- uses: arch4edu/cactus/actions/upload-package@main
if: ${{ steps.build.outputs.result == 'built' }}
with:
pkgbase: ${{ github.event.inputs.pkgbase }}
- name: Push changes
if: ${{ steps.build.outputs.result == 'built' }}
run: |
cd repository/${{ github.event.inputs.pkgbase }}
git-push
- uses: arch4edu/cactus/actions/update-status@main
if: ${{ always() }}
with:
pkgbase: ${{ github.event.inputs.pkgbase }}
status: ${{ steps.build.outputs.result }}
workflow: ${{ github.run_id }}
- uses: arch4edu/cactus/actions/clean@main