Publish Images #142
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Publish the Images | |
on: | |
workflow_dispatch: | |
inputs: | |
runs-on: | |
description: "The platform to build on" | |
type: string | |
required: false | |
default: "ubuntu-latest" | |
push: | |
branches: [main] | |
paths: | |
- .github/actions/** | |
- .github/workflows/publish.yml | |
- .github/workflows/build-and-push.yml | |
- base-r-notebook/** | |
- essentials-builder/** | |
- 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: | |
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
env: | |
runs-on: ubuntu-latest | |
outputs: | |
runs-on: ${{ steps.set-env.outputs.runs-on }} | |
python-version: ${{ steps.set-env.outputs.python-version }} | |
r-version: ${{ steps.set-env.outputs.r-version }} | |
steps: | |
- name: Set output variables based on the inputs | |
id: set-env | |
run: | | |
echo "runs-on=${{ github.event.inputs.runs-on || 'ubuntu-latest' }}" >> $GITHUB_OUTPUT | |
echo "python-version=3.11" >> $GITHUB_OUTPUT | |
echo "r-version=4.3" >> $GITHUB_OUTPUT | |
base-r-notebook: | |
needs: env | |
uses: ./.github/workflows/build-and-push.yml | |
secrets: inherit | |
with: | |
runs-on: ${{ needs.env.outputs.runs-on }} | |
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. | |
python-version: ${{ needs.env.outputs.python-version }} | |
r-version: ${{ needs.env.outputs.r-version }} | |
build-args: | | |
PYTHON_VERSION=${{ needs.env.outputs.python-version }} | |
R_VERSION=${{ needs.env.outputs.r-version }} | |
essentials-builder: | |
needs: [env, base-r-notebook] | |
uses: ./.github/workflows/build-and-push.yml | |
secrets: inherit | |
with: | |
runs-on: ${{ needs.env.outputs.runs-on }} | |
image: essentials-builder | |
labels: | | |
org.opencontainers.image.title=Essentials Builder | |
org.opencontainers.image.description=Base for the essentials- and r-notebook images. | |
python-version: ${{ needs.env.outputs.python-version }} | |
r-version: ${{ needs.env.outputs.r-version }} | |
essentials-notebook: | |
needs: [env, essentials-builder] | |
uses: ./.github/workflows/build-and-push.yml | |
secrets: inherit | |
with: | |
runs-on: ${{ needs.env.outputs.runs-on }} | |
image: essentials-notebook | |
labels: | | |
org.opencontainers.image.title=Essentials Notebook | |
org.opencontainers.image.description=CourseKata essentials: everything used in the books. | |
python-version: ${{ needs.env.outputs.python-version }} | |
r-version: ${{ needs.env.outputs.r-version }} | |
r-notebook: | |
needs: [env, essentials-builder] | |
uses: ./.github/workflows/build-and-push.yml | |
secrets: inherit | |
with: | |
runs-on: ${{ needs.env.outputs.runs-on }} | |
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. | |
python-version: ${{ needs.env.outputs.python-version }} | |
r-version: ${{ needs.env.outputs.r-version }} | |
datascience-notebook: | |
needs: [env, r-notebook] | |
uses: ./.github/workflows/build-and-push.yml | |
secrets: inherit | |
with: | |
runs-on: ${{ needs.env.outputs.runs-on }} | |
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. | |
python-version: ${{ needs.env.outputs.python-version }} | |
r-version: ${{ needs.env.outputs.r-version }} |