Skip to content

Commit

Permalink
ci: have to publish to get previous image
Browse files Browse the repository at this point in the history
  • Loading branch information
adamblake committed Jan 3, 2024
1 parent 4512bed commit 309c54f
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 124 deletions.
88 changes: 0 additions & 88 deletions .github/workflows/build-test-publish-all.yml

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/build-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ on:
description: Labels to add to the image
type: string
required: false

outputs:
image:
description: The image name
Expand Down
71 changes: 64 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,15 @@ name: Publish images
on:
workflow_dispatch:
push:
branches: [main]
branches: [test/*]
paths:
- .github/workflows/publish.yml
- .github/workflows/build-test-publish.yml
- .github/workflows/build-test-publish-all.yml
- tests/**
- base-r-notebook/**
- essentials-notebook/**
- r-notebook/**
- datascience-notebook/**
schedule:
# Weekly, at 03:00 on Monday UTC time (see https://crontab.guru)
- cron: "0 3 * * 1"

# https://docs.github.com/en/actions/using-jobs/using-concurrency
concurrency:
Expand All @@ -25,8 +21,69 @@ concurrency:
cancel-in-progress: true

jobs:
publish:
uses: ./.github/workflows/build-test-publish-all.yml
base-r:
uses: ./.github/workflows/build-test-publish.yml
secrets: inherit
with:
image: base-r-notebook
labels: |
org.opencontainers.image.title=Base R Notebook
org.opencontainers.image.description=Jupyter Lab, Python, and R, and that's it.
tags: |
type=raw,value=python-3.11
type=raw,value=r-4.3
build-args: |
PYTHON_VERSION=3.11
R_VERSION=4.3
publish: true

essentials:
needs: [base-r]
uses: ./.github/workflows/build-test-publish.yml
secrets: inherit
with:
image: essentials-notebook
labels: |
org.opencontainers.image.title=Essentials Notebook
org.opencontainers.image.description=CourseKata essentials: everything used in the books.
tags: |
type=raw,value=python-3.11
type=raw,value=r-4.3
build-args: |
BASE_IMAGE=${{ needs.base-r.outputs.image }}@${{ needs.base-r.outputs.digest}}
PARENT_IMAGE=${{ needs.base-r.outputs.image }}
publish: true

r:
needs: [base-r, essentials]
uses: ./.github/workflows/build-test-publish.yml
secrets: inherit
with:
image: r-notebook
labels: |
org.opencontainers.image.title=R Notebook
org.opencontainers.image.description=CourseKata essentials and other R packages for teaching and learning data science.
tags: |
type=raw,value=python-3.11
type=raw,value=r-4.3
build-args: |
BASE_IMAGE=${{ needs.base-r.outputs.image }}@${{ needs.base-r.outputs.digest}}
PARENT_IMAGE=${{ needs.essentials.outputs.image }}@${{ needs.essentials.outputs.digest}}
publish: true

datascience:
needs: [base-r, r]
uses: ./.github/workflows/build-test-publish.yml
secrets: inherit
with:
image: datascience-notebook
labels: |
org.opencontainers.image.title=Data Science Notebook
org.opencontainers.image.description=R and Python packages for teaching and learning data science.
tags: |
type=raw,value=python-3.11
type=raw,value=r-4.3
build-args: |
BASE_IMAGE=${{ needs.base-r.outputs.image }}@${{ needs.base-r.outputs.digest}}
PARENT_IMAGE=${{ needs.r.outputs.image }}@${{ needs.r.outputs.digest}}
publish: true
29 changes: 0 additions & 29 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit 309c54f

Please sign in to comment.