mirror of
https://github.com/jupyter/docker-stacks.git
synced 2025-10-17 15:02:57 +00:00
Add build-push action
This commit is contained in:
23
.github/actions/build-push-image/action.yml
vendored
Normal file
23
.github/actions/build-push-image/action.yml
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
name: "Build, push image"
|
||||
description: "Build and push image to GitHub artifacts"
|
||||
|
||||
inputs:
|
||||
imageName:
|
||||
description: "Image name to be built"
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Build image 🛠
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
context: ${{ inputs.imageName }}/
|
||||
file: ${{ inputs.imageName }}/Dockerfile
|
||||
tags: jupyter/${{ inputs.imageName }}:latest
|
||||
outputs: type=docker,dest=/tmp/${{ inputs.imageName }}.tar
|
||||
- name: Upload artifact 💾
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ inputs.imageName }}
|
||||
path: /tmp/${{ inputs.imageName }}.tar
|
16
.github/workflows/build-docker.yml
vendored
16
.github/workflows/build-docker.yml
vendored
@@ -7,7 +7,7 @@ on:
|
||||
pull_request:
|
||||
paths:
|
||||
- ".github/workflows/build-docker.yml"
|
||||
- ".github/actions/create-dev-env/**"
|
||||
- ".github/actions/**"
|
||||
|
||||
- "all-spark-notebook/**"
|
||||
- "base-notebook/**"
|
||||
@@ -27,7 +27,7 @@ on:
|
||||
- master
|
||||
paths:
|
||||
- ".github/workflows/build-docker.yml"
|
||||
- ".github/actions/create-dev-env/**"
|
||||
- ".github/actions/**"
|
||||
|
||||
- "all-spark-notebook/**"
|
||||
- "base-notebook/**"
|
||||
@@ -61,17 +61,9 @@ jobs:
|
||||
- name: Create dev environment 📦
|
||||
uses: ./.github/actions/create-dev-env
|
||||
- name: Build image 🛠
|
||||
uses: docker/build-push-action@v3
|
||||
uses: ./.github/actions/build-push-image
|
||||
with:
|
||||
context: base-notebook/
|
||||
file: base-notebook/Dockerfile
|
||||
tags: jupyter/base-notebook:latest
|
||||
outputs: type=docker,dest=/tmp/base-notebook.tar
|
||||
- name: Upload artifact 💾
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: base-notebook
|
||||
path: /tmp/base-notebook.tar
|
||||
imageName: base-notebook
|
||||
|
||||
test-base-notebook:
|
||||
name: Test base-notebook
|
||||
|
Reference in New Issue
Block a user