-
Notifications
You must be signed in to change notification settings - Fork 35
50 lines (42 loc) · 1.15 KB
/
examples.yml
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
name: Examples
on:
workflow_dispatch:
inputs:
examples:
description: |
Comma-separated list of example directories. Specify "all" to use build all.
required: false
default: 'all'
type: string
schedule:
- cron: '55 6 * * 6'
jobs:
setup-matrix:
runs-on: ubuntu-latest
outputs:
examples: ${{ steps.setup-matrix.outputs.examples }}
steps:
- uses: actions/checkout@v4
- name: Set up matrix of examples
id: setup-matrix
run: |
examples=$(python .github/examples.py ${{ github.event.inputs.examples }})
echo "examples=$examples" >> $GITHUB_OUTPUT
examples:
needs: setup-matrix
strategy:
fail-fast: false
matrix:
example: ${{ fromJson(needs.setup-matrix.outputs.examples) }}
runs-on: ubuntu-latest
name: "examples/${{ matrix.example }}"
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build
uses: docker/build-push-action@v6
with:
push: false
platforms: linux/amd64
context: examples/${{ matrix.example }}