Skip to content

test out ARG in FROM #84

test out ARG in FROM

test out ARG in FROM #84

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"]
python-version: ["3.8"]
base_stage: ["stage3", "stage4"]
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 }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
# 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, stage3
server-stage: stage5
parallel: true
build-args: |
PY_VERSION=${{ matrix.python-version }}
base_stage=${{ matrix.base_stage }}