Files
packages/.github/workflows/autobuild.yml
T
madomado 4cc7cb792a feat(ci): better build workflows [attempt 2] (#6006)
* feat(ci): better build workflows

* fix(ci/json-build): forgot about the type

* chore: test if autobuild works

* Revert "chore: test if autobuild works"

This reverts commit 73fe8e636f.

* fix(ci/build): delay setup git

* fix(ci/build): need to git add all

* fix(ci/build): compact output from jq

* chore(ci/build): add run-name

* fix(ci/autobuild): inherit secrets

Signed-off-by: madomado <madonuko@outlook.com>

* fix(ci/build): inherit secrets

Signed-off-by: madomado <madonuko@outlook.com>

---------

Signed-off-by: madomado <madonuko@outlook.com>
2025-08-18 18:05:23 +08:00

46 lines
1.1 KiB
YAML

# for each folder in anda/
# generate a new workflow for each folder in anda/
name: Automatically build packages
permissions:
contents: read
on:
push:
paths:
- anda/**
branches:
- frawhide
pull_request:
branches:
- frawhide
merge_group:
branches:
- frawhide
workflow_dispatch:
workflow_call:
jobs:
manifest:
runs-on: ubuntu-22.04
outputs:
build_matrix: ${{ steps.generate_build_matrix.outputs.build_matrix }}
container:
image: ghcr.io/terrapkg/builder:frawhide
options: --cap-add=SYS_ADMIN --privileged
steps:
- name: Set workspace as safe
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate build matrix
id: generate_build_matrix
run: anda ci >> $GITHUB_OUTPUT
build:
needs: manifest
uses: ./.github/workflows/json-build.yml
secrets: inherit
with:
packages: ${{ needs.manifest.outputs.build_matrix }}
publish: ${{ github.event_name == 'push' }}