-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (62 loc) · 2.03 KB
/
Copy path100-build-rcl.yml
File metadata and controls
68 lines (62 loc) · 2.03 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
name: bluebuild
on:
push:
paths:
- "100-rcl/**"
- ".github/workflows/100-build-rcl.yml"
branches:
- main
pull_request:
workflow_dispatch: # allow manually triggering builds
jobs:
rcl:
name: Build recipe files with rcl
runs-on: ubuntu-latest
outputs:
recipe-matrix: ${{ steps.rcl.outputs.recipe-matrix }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install rcl
run: |
git clone https://github.com/ruuda/rcl.git /tmp/rcl
cd /tmp/rcl && cargo build --release
sudo cp target/release/rcl /usr/local/bin/
- name: Build recipe files
id: rcl
run: |
RCL_OUTPUT=$(rcl build ./100-rcl/recipes.rcl)
RECIPE_FILENAMES=$(echo "$RCL_OUTPUT" | awk '{ print $2 }' | sed -e 's/^recipes\///')
RECIPE_FILENAMES_JSON=$(echo "$RECIPE_FILENAMES" | jq --compact-output --raw-input '[inputs]')
MATRIX_JSON=$(jq -cn --argjson recipes "${RECIPE_FILENAMES_JSON[@]}" '{ recipes: $recipes }')
echo "recipe-matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT
- uses: actions/upload-artifact@v4
with:
name: recipes
path: ./100-rcl/recipes/
bluebuild:
name: Build Custom Image
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
needs: rcl
strategy:
fail-fast: false # stop GH from cancelling all matrix builds if one fails
matrix: ${{ fromJson(needs.rcl.outputs.recipe-matrix) }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: recipes
path: ./100-rcl/recipes/
- name: Build Custom Image
uses: blue-build/github-action@v1.8
with:
recipe: ${{ matrix.recipes }}
working_directory: ./100-rcl
cosign_private_key: ${{ secrets.SIGNING_SECRET }}
registry_token: ${{ github.token }}
pr_event_number: ${{ github.event.number }}
skip_checkout: true