-
Notifications
You must be signed in to change notification settings - Fork 3k
57 lines (50 loc) · 1.66 KB
/
contributed-recipes.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
51
52
53
54
55
56
57
name: Test the contributed recipes
on:
schedule:
# Images are rebuilt at 03:00 on Monday UTC
# So we're testing recipes one hour in advance
# They will also be tested after building images
- cron: "0 2 * * 1"
pull_request:
paths:
- ".github/workflows/contributed-recipes.yml"
- "docs/using/recipe_code/**"
push:
branches:
- main
paths:
- ".github/workflows/contributed-recipes.yml"
- "docs/using/recipe_code/**"
workflow_dispatch:
workflow_call:
jobs:
generate-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Checkout Repo ⚡️
uses: actions/checkout@v4
- name: Calculate recipes matrix 🛠
id: set-matrix
run: docs/using/recipe_code/generate_matrix.py >> "${GITHUB_OUTPUT}"
env:
REPOSITORY_OWNER: ${{ github.repository_owner }}
test-recipes:
runs-on: ${{ matrix.runs-on }}
needs: generate-matrix
if: github.repository_owner == 'jupyter' || github.repository_owner == 'mathbunnyru'
steps:
- name: Checkout Repo ⚡️
uses: actions/checkout@v4
- name: Build recipe 🛠
# We're pulling here to avoid accidentally using an image that might be present on aarch64 self-hosted runner
run: docker build --pull --rm --force-rm --tag my-custom-image -f ./${{ matrix.dockerfile }} ./
env:
DOCKER_BUILDKIT: 1
# Full logs for CI build
BUILDKIT_PROGRESS: plain
working-directory: docs/using/recipe_code
shell: bash
strategy:
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}