Skip to content

Merge branch 'add-py37-nw-image' #48

Merge branch 'add-py37-nw-image'

Merge branch 'add-py37-nw-image' #48

Workflow file for this run

name: Build docker image
on:
push:
branches:
- master
pull_request:
branches: ["master"]
jobs:
build-no-wheelhouse:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
dist: [bullseye]
version: ["3.11.6", "3.10.13", "3.9.18", "3.8.18", "3.7.17"]
python: [python]
include:
- version: "2.7"
version_suffix: "-7.3.5"
dist: buster
python: pypy
- version: "3.6"
version_suffix: "-7.3.3"
dist: buster
python: pypy
steps:
- uses: actions/checkout@v3
- uses: docker/setup-buildx-action@v2
- name: construct image metadata
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/praekeltfoundation/${{matrix.python}}-base-nw
tags: |
type=pep440,pattern={{version}},value=${{matrix.version}}
type=pep440,pattern={{major}}.{{minor}},value=${{matrix.version}}
type=pep440,pattern={{major}},value=${{matrix.version}}
type=raw,value=${{matrix.dist}}
type=pep440,pattern={{version}}-${{matrix.dist}},value=${{matrix.version}}
type=pep440,pattern={{major}}.{{minor}}-${{matrix.dist}},value=${{matrix.version}}
type=pep440,pattern={{major}}-${{matrix.dist}},value=${{matrix.version}}
- name: login to ghcr
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: build and push
uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile.no-wheelhouse
push: ${{github.event_name != 'pull_request'}}
tags: ${{steps.meta.outputs.tags}}
build-args: |
FROM_IMAGE=${{matrix.python}}:${{matrix.version}}${{matrix.version_suffix}}-slim-${{matrix.dist}}