Files
packages/.github/workflows/json-build.yml
T
madomado 0f2b02d006 feat(ci): Add lint and try dnf in in autobuild (#593)
* feat(ci): Add lint and try `dnf in` in autobuild

This also renames some workflows.

* feat: test out the workflow by messing up uxplay

* chore(ci): simplify mg notify part

* try?

* guess it's time to revert mg

* fix fail hdl

* Revert "feat: test out the workflow by messing up uxplay"

This reverts commit c6d56ac9f2.

* yeah let's try using seto instead (faster!)

* fix newline stuff again

* ok let's try this too

* escape the strings

* fix dnf and some formatting

* fix?

* confusion

* more quote fixing

* a

* idk?

* aaaa

* revert seto-fonts

* more opts?
2023-06-19 13:20:11 -07:00

56 lines
1.9 KiB
YAML

name: JSON Build
on:
workflow_dispatch:
inputs:
packages:
description: "Packages to Build"
required: true
jobs:
build:
strategy:
matrix:
pkg: ${{ fromJson(inputs.packages) }}
version: ["38"]
fail-fast: false
runs-on: ${{ matrix.pkg.arch == 'aarch64' && 'ARM64' || 'ubuntu-latest' }}
container:
image: ghcr.io/terrapkg/builder:f38
options: --cap-add=SYS_ADMIN --privileged
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up git repository
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Build with Anda
run: anda build ${{ matrix.pkg.pkg }} --package rpm -c terra-${{ matrix.version }}-${{ matrix.pkg.arch }}
- name: Generating artifact name
id: art
run: |
NAME=${{ matrix.pkg.pkg }}-${{ matrix.pkg.arch }}-${{ matrix.version }}
x=${NAME//\//@}
echo "name=$x" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v3
with:
name: ${{ steps.art.outputs.name }}
path: anda-build/rpm/rpms/*
- 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: Notify Madoguchi (Success)
if: success() && github.event_name == 'push'
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() ) && github.event_name == 'push'
run: ./.github/workflows/mg.sh true ${{matrix.pkg}} ${{matrix.version}} ${{matrix.arch}} ${{github.run_id}} ${{secrets.MADOGUCHI_JWT}}