Skip to content

Publish RStudio Docker image for JupyterHub #32

Publish RStudio Docker image for JupyterHub

Publish RStudio Docker image for JupyterHub #32

name: Publish RStudio Docker image for JupyterHub
# To MaastrichtU-IDS GitHub Container Registry
# https://github.com/orgs/MaastrichtU-IDS/packages
on:
workflow_dispatch:
push:
branches:
- main
# - dev
paths:
- 'jupyterhub.Dockerfile'
- '.github/workflows/publish-docker-jupyterhub.yml'
schedule:
- cron: '0 3 * * 1'
# Monday at 3:00 GMT+1
env:
IMAGE_PUSHED: ghcr.io/maastrichtu-ids/rstudio:jupyterhub
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
# password: ${{secrets.CONTAINER_REGISTRY_GITHUB_TOKEN}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build and publish RStudio Docker image
uses: docker/build-push-action@v4
with:
context: ./
file: ./jupyterhub.Dockerfile
# build-args: BASE_IMAGE=${{ env.BASE_IMAGE }}
builder: ${{ steps.buildx.outputs.name }}
push: true
tags: ${{ env.IMAGE_PUSHED }}
cache-from: type=gha
cache-to: type=gha,mode=max