46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
name: Build and Push Docker Images
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '*.*.*'
|
|
|
|
env:
|
|
REGISTRY: registry.bouvais.lu
|
|
BASE_IMAGE_NAME: tenant/base
|
|
JUPYTER_IMAGE_NAME: tenant/jupyter
|
|
|
|
jobs:
|
|
build-and-push:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: registry.bouvais.lu
|
|
username: adrien
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Build and push Base image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./images/base
|
|
file: ./images/base/dockerfile
|
|
push: true
|
|
tags: ${{ steps.meta-base.outputs.tags }}
|
|
labels: ${{ steps.meta-base.outputs.labels }}
|
|
|
|
- name: Build and push Jupyter image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: ./images/jupyter
|
|
file: ./images/jupyter/dockerfile
|
|
push: true
|
|
build-args: |
|
|
BASE_IMAGE=${{ env.REGISTRY }}/${{ env.BASE_IMAGE_NAME }}:${{ steps.meta-base.outputs.version }}
|
|
tags: ${{ steps.meta-jupyter.outputs.tags }}
|
|
labels: ${{ steps.meta-jupyter.outputs.labels }}
|