Skip to content

Manual Builds

Manual Builds #344

Workflow file for this run

name: Manual Builds
on:
workflow_dispatch:
inputs:
packages:
description: "Packages to Build"
required: true
custom_builder:
description: "Custom Builder"
required: false
default: ""
jobs:
parse:
outputs:
pkgs: ${{ steps.parsing.outputs.pkgs }}
builder: ${{ inputs.custom_builder }}
runs-on: "ubuntu-latest"
steps:
- name: Parse Input
id: parsing
run: echo "${{ inputs.packages }}" | sed 's/ /\n/g' | sed 's/$/\//g' | jq -R . | jq -s . | jq -c . | sed 's/^/pkgs=/' >> $GITHUB_OUTPUT
build:
needs: parse
strategy:
matrix:
pkg: ${{ fromJson(needs.parse.outputs.pkgs) }}
version: ["rawhide"]
arch: ${{ output.builder == "x86-64-lg" && ["x86_64"] || ["x86_64", "aarch64"] }}

Check failure on line 30 in .github/workflows/build.yml

View workflow run for this annotation

GitHub Actions / Manual Builds

Invalid workflow file

The workflow is not valid. .github/workflows/build.yml (Line: 30, Col: 15): Unrecognized named-value: 'output'. Located at position 1 within expression: output.builder == "x86-64-lg" && ["x86_64"] || ["x86_64", "aarch64"] .github/workflows/build.yml (Line: 30, Col: 15): Unexpected value '${{ output.builder == "x86-64-lg" && ["x86_64"] || ["x86_64", "aarch64"] }}'
fail-fast: false
runs-on: ${{ matrix.arch == 'aarch64' && 'ARM64' || output.builder && output.builder || 'ubuntu-latest' }}
container:
image: ghcr.io/terrapkg/builder:f${{ matrix.version }}
options: --cap-add=SYS_ADMIN --privileged
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up git repository
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Cache buildroot
id: br-cache
uses: actions/cache@v4
with:
path: /var/cache
key: ${{ runner.os }}-br-${{ matrix.version }}-${{ matrix.arch }}-${{ matrix.pkg }}
- name: Build with Andaman
run: anda build anda/${{ matrix.pkg }}pkg --package rpm -c anda/terra/mock-configs/terra-${{ matrix.version }}-${{ matrix.arch }}.cfg
- name: Generating artifact name
id: art
run: |
NAME=${{ matrix.pkg }}-${{ matrix.arch }}-${{ matrix.version }}
x=${NAME//\//@}
echo "name=$x" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v4
with:
name: ${{ steps.art.outputs.name }}
compression-level: 0 # The RPMs are already compressed :p
path: |
anda-build/rpm/rpms/*
anda-build/rpm/srpm/*
- name: Upload packages to subatomic
run: |
subatomic-cli upload --prune \
--server https://subatomic.fyralabs.com \
--token ${{ secrets.SUBATOMIC_TOKEN }} \
terra${{ matrix.version }} anda-build/rpm/rpms/*
- name: Upload source packages to subatomic
run: |
subatomic-cli upload --prune \
--server https://subatomic.fyralabs.com \
--token ${{ secrets.SUBATOMIC_TOKEN }} \
terra${{ matrix.version }}-source anda-build/rpm/srpm/*
- name: Notify Madoguchi (Success)
if: success()
run: ./.github/workflows/mg.sh true ${{matrix.pkg}} ${{matrix.version}} ${{matrix.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}}
- name: Notify Madoguchi (Failure)
if: cancelled() || failure()
run: ./.github/workflows/mg.sh false ${{matrix.pkg}} ${{matrix.version}} ${{matrix.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}}