Skip to content

v0.1.4

v0.1.4 #20

Workflow file for this run

name: Build Image
on:
release:
types: [published]
jobs:
build-matrix:
strategy:
fail-fast: false
matrix:
software-versions: [
{"python-version": "3.11", "django-version": "4.2", "debian-version": "bookworm"},
{"python-version": "3.11", "django-version": "5.0", "debian-version": "bookworm"},
{"python-version": "3.11", "django-version": "5.1", "debian-version": "bookworm"}
]
platform: [amd64]
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Copy from django${{ matrix.software-versions.django-version }} directory to root
run: cp -r django${{ matrix.software-versions.django-version }}/* .
- name: Replace Python Version in Dockerfile
run: sed -i "s/PYTHON_VERSION/${{ matrix.software-versions.python-version }}/g" Dockerfile
- name: Replace Debian Version in Dockerfile
run: sed -i "s/DEBIAN_VERSION/${{ matrix.software-versions.debian-version }}/g" Dockerfile
- name: Replace the Django Version in Dockerfile
run: sed -i "s/DJANGO_VERSION/${{ matrix.software-versions.django-version }}/g" Dockerfile
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build the image
run: docker buildx build --platform linux/${{ matrix.platform }} --push -t ghcr.io/visdesignlab/django-image:${{matrix.software-versions.django-version}}-${{ github.ref_name }} .