-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (80 loc) · 2.57 KB
/
manual-build.yaml
File metadata and controls
89 lines (80 loc) · 2.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Manual Build Test
on:
workflow_dispatch:
inputs:
recipe:
description: 'Recipe path (e.g., binaries/hello/static.yaml) or leave empty to list all'
type: string
default: ''
host:
description: 'Target host'
type: choice
options:
- ALL
- x86_64-Linux
- aarch64-Linux
default: 'x86_64-Linux'
cache_type:
description: 'Cache type (auto-detected from path if not specified)'
type: choice
options:
- auto
- bincache
- pkgcache
default: 'auto'
jobs:
validate:
runs-on: ubuntu-latest
outputs:
recipe: ${{ steps.validate.outputs.recipe }}
valid: ${{ steps.validate.outputs.valid }}
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Validate recipe
id: validate
run: |
RECIPE="${{ inputs.recipe }}"
# Find all available recipes
RECIPES=$(find binaries packages -name '*.yaml' -type f 2>/dev/null | sort)
RECIPE_COUNT=$(echo "$RECIPES" | wc -l)
# Generate job summary with available recipes
{
echo "## Available Recipes ($RECIPE_COUNT)"
echo ""
echo "### Binaries"
echo '```'
echo "$RECIPES" | grep "^binaries/" || echo "(none)"
echo '```'
echo ""
echo "### Packages"
echo '```'
echo "$RECIPES" | grep "^packages/" || echo "(none)"
echo '```'
} >> $GITHUB_STEP_SUMMARY
if [ -z "$RECIPE" ]; then
echo "::notice::No recipe specified. Check job summary for available recipes."
echo "valid=false" >> $GITHUB_OUTPUT
exit 0
fi
if [ ! -f "$RECIPE" ]; then
echo "::error::Recipe not found: $RECIPE"
echo "valid=false" >> $GITHUB_OUTPUT
exit 1
fi
echo "recipe=$RECIPE" >> $GITHUB_OUTPUT
echo "valid=true" >> $GITHUB_OUTPUT
build:
needs: validate
if: needs.validate.outputs.valid == 'true'
uses: ./.github/workflows/matrix_builds.yaml
with:
host: ${{ inputs.host }}
sbuild-url: "https://raw.githubusercontent.com/${{ github.repository }}/refs/heads/main/${{ needs.validate.outputs.recipe }}"
ghcr-url: ${{ format('ghcr.io/{0}', github.repository_owner) }}
pkg-family: ${{ github.event.repository.name }}
rebuild: true
logs: true
debug: true
metadata-release: false
secrets: inherit