Skip to content

Merge pull request #28 from bquan0/release-test #13

Merge pull request #28 from bquan0/release-test

Merge pull request #28 from bquan0/release-test #13

Workflow file for this run

name: build-docker-image
on:
workflow_dispatch:
push:
paths:
- 'Dockerfile'
- '.github/workflows/buildImage.yml'
env:
REGISTRY: ghcr.io
jobs:
build-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log in to the Container Registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# use the multistage docker build action instead of docker's action
- uses: firehed/multistage-docker-build-action@v1
id: build
with:
context: .
repository: ${{ env.REGISTRY }}/${{ github.repository }}/learn-maintenance-image-${{ matrix.python-version }}
tag-latest-on-default: true
stages: stage1, stage2
server-stage: stage3
build-args: |
PY_VERSION=${{ matrix.python-version }}