Skip to content

Publish Images

Publish Images #222

Workflow file for this run

---
name: Publish images
on:
workflow_dispatch:
push:
branches: [main]
paths:
- .github/workflows/publish.yml
- .github/workflows/build-test-publish.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:
# only cancel in-progress jobs or runs for the current workflow - matches against branch & tags
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PYTHON_VERSION: 3.11
R_VERSION: 4.3
jobs:
setup:
runs-on: ubuntu-latest
outputs:
python_version: ${{ steps.set-env.outputs.python_version }}
r_version: ${{ steps.set-env.outputs.r_version }}
steps:
- id: set-env
run: |
echo "python_version=${{ env.PYTHON_VERSION }}" >> $GITHUB_OUTPUT
echo "r_version=${{ env.R_VERSION }}" >> $GITHUB_OUTPUT
base-r:
needs: [setup]
uses: ./.github/workflows/build-test-publish.yml
secrets: inherit
with:
image: base-r-notebook
no-cache: ${{ github.event_name == 'schedule' }}
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-${{ needs.setup.outputs.python_version }}
type=raw,value=r-${{ needs.setup.outputs.r_version }}
build-args: |
PYTHON_VERSION=${{ needs.setup.outputs.python_version }}
R_VERSION=${{ needs.setup.outputs.r_version }}
publish: true
essentials:
needs: [setup, base-r]
uses: ./.github/workflows/build-test-publish.yml
secrets: inherit
with:
image: essentials-notebook
no-cache: ${{ github.event_name == 'schedule' }}
labels: |
org.opencontainers.image.title=Essentials Notebook
org.opencontainers.image.description=CourseKata essentials: everything used in the books.
tags: |
type=raw,value=python-${{ needs.setup.outputs.python_version }}
type=raw,value=r-${{ needs.setup.outputs.r_version }}
build-args: |
PARENT_NAME=${{ needs.base-r.outputs.image }}@${{ needs.base-r.outputs.digest}}
publish: true
free-disk-space: true
r:
needs: [setup, base-r, essentials]
uses: ./.github/workflows/build-test-publish.yml
secrets: inherit
with:
image: r-notebook
no-cache: ${{ github.event_name == 'schedule' }}
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-${{ needs.setup.outputs.python_version }}
type=raw,value=r-${{ needs.setup.outputs.r_version }}
build-args: |
PARENT_NAME=${{ needs.essentials.outputs.image }}@${{ needs.essentials.outputs.digest}}
publish: true
free-disk-space: true
datascience:
needs: [setup, base-r, r]
uses: ./.github/workflows/build-test-publish.yml
secrets: inherit
with:
image: datascience-notebook
no-cache: ${{ github.event_name == 'schedule' }}
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-${{ needs.setup.outputs.python_version }}
type=raw,value=r-${{ needs.setup.outputs.r_version }}
build-args: |
PARENT_NAME=${{ needs.r.outputs.image }}@${{ needs.r.outputs.digest}}
publish: true
free-disk-space: true
free-more-disk-space: true