mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-16 22:42:57 +00:00
Enable building contributed recipes in PRs (#2213)
* Enable building contributed recipes in PRs * Add some steps * Simplify contributed-recipes requirements * Do not use github.event_name * Make a variable required * Better text
This commit is contained in:
9
.github/workflows/contributed-recipes.yml
vendored
9
.github/workflows/contributed-recipes.yml
vendored
@@ -18,6 +18,13 @@ on:
|
||||
- "docs/using/recipe_code/**"
|
||||
workflow_dispatch:
|
||||
workflow_call:
|
||||
inputs:
|
||||
# There is no good way to detect if the workflow was called using workflow_call
|
||||
# https://github.com/actions/runner/discussions/1884
|
||||
called-using-workflow-call:
|
||||
description: "Was the workflow called using workflow_call"
|
||||
required: true
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
generate-matrix:
|
||||
@@ -44,7 +51,7 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Load image to Docker 📥
|
||||
if: ${{ github.event_name == 'workflow_call' && matrix.parent-image != '' }}
|
||||
if: ${{ inputs.called-using-workflow-call && matrix.parent-image != '' }}
|
||||
uses: ./.github/actions/load-image
|
||||
with:
|
||||
image: ${{ matrix.parent-image }}
|
||||
|
9
.github/workflows/docker.yml
vendored
9
.github/workflows/docker.yml
vendored
@@ -494,5 +494,10 @@ jobs:
|
||||
|
||||
contributed-recipes:
|
||||
uses: ./.github/workflows/contributed-recipes.yml
|
||||
needs: [merge-tags]
|
||||
if: github.ref == 'refs/heads/main' || github.event_name == 'schedule'
|
||||
with:
|
||||
called-using-workflow-call: true
|
||||
# Contributed recipes only use these images
|
||||
# If recipes using other images will be added, they should be added here as well
|
||||
#
|
||||
# contributed-recipes will give an error if the image is not yet built and uploaded
|
||||
needs: [aarch64-base, x86_64-base, aarch64-minimal, x86_64-minimal]
|
||||
|
Reference in New Issue
Block a user