bforce/.gitea/workflows/arch.yaml
Alexey Khromov 04f62c7725
Some checks failed
Debian build / build-ubuntu (push) Has been cancelled
Archlinux build / build-arch (push) Successful in 2m52s
Fix PKGBUILD.ci for CI workflow, added manual action start
2025-04-13 22:26:47 +03:00

43 lines
1.6 KiB
YAML

name: Archlinux build
run-name: Deploy to ${{ inputs.deploy_target }} by @${{ github.actor }} 🚀
on:
- push
- workflow_dispatch
if: ${{ github.ref }} == 'refs/head/master'
jobs:
build-arch:
runs-on: arch-latest
branches:
- 'master'
steps:
- name: Checking environment
continue-on-error: true
run: printenv
- name: Installing prerequisites - update pacman
run: pacman -Sy
- name: Installing prerequisites - install nodejs for actions & git
run: pacman --disable-sandbox --noconfirm -v -S git nodejs
- name: Adding user builder
continue-on-error: true
run: useradd -d /builder -g users -m builder
- name: Downloading PKGBUILD
run: |
su - builder -c "curl -O http://zxprj:3001/zx/bforce/raw/branch/${GITHUB_REF_NAME}/archlinux/bforce.install"
su - builder -c "curl -o PKGBUILD http://zxprj:3001/zx/bforce/raw/branch/${GITHUB_REF_NAME}/archlinux/PKGBUILD.ci"
- name: Building archlinux package
run: |
su -w GITHUB_SHA,GITHUB_REF_NAME,GITHUB_REF_TYPE - builder -c makepkg
su - builder -c "ls -la"
- name: Constructing artifact name and version
run: |
echo "BFORCE_VER=$(cat /builder/src/bforce/source/.version)-$(date +%Y%M%d)" >> $GITHUB_ENV
- name: Retrieving artifact files
run: mkdir bforce && cp /builder/bforce-r*.pkg.tar.zst bforce
- name: Try to upload artifacts
uses: actions/upload-artifact@v3
with:
name: bforce-${{ env.BFORCE_VER }}-Arch
path: bforce