Transistor PKGBUILD builder #3
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
| # Validates the build of Transisition | |
| # Upstream: https://invent.kde.org/saurov/transistor | |
| name: Transistor PKGBUILD builder | |
| on: workflow_dispatch | |
| env: | |
| AUR_TRANSISTOR_REPO: https://aur.archlinux.org/packages/transistor-git.git | |
| TEMP_DIR: /tmp/transistor | |
| jobs: | |
| transistor-build: | |
| runs-on: ubuntu-latest | |
| container: archlinux:latest | |
| steps: | |
| - name: Checkout local | |
| uses: actions/checkout@v4.2.0 | |
| with: | |
| repository: ${{ github.repository }} | |
| sparse-checkout-cone-mode: false | |
| - name: System update | |
| run: pacman -Syu --noconfirm | |
| - name: Install sudo, git and compile dependencies | |
| run: | | |
| pacman -Syq base-devel --noconfirm | |
| - name: Setup build user | |
| run: | | |
| useradd --create-home --shell /bin/bash builduser -m # Create the builduser | |
| passwd -d builduser # Delete the buildusers password | |
| printf 'builduser ALL=(ALL) ALL\n' | tee -a /etc/sudoers # Allow the builduser passwordless sudo | |
| - name: Copy PKGBUILD to /tmp for builduser to access | |
| run: | | |
| mkdir "${{ env.TEMP_DIR }}" | |
| cp -f PKGBUILD "${{ env.TEMP_DIR }}" | |
| chown -R builduser:builduser "${{ env.TEMP_DIR }}" | |
| - name: Test transistor build | |
| run: | | |
| sudo -u builduser bash -c 'cd "${{ env.TEMP_DIR }}"; makepkg -s --noconfirm' |