Skip to content

Merge pull request #106 from naik-aakash/add_devcontainer #2

Merge pull request #106 from naik-aakash/add_devcontainer

Merge pull request #106 from naik-aakash/add_devcontainer #2

name: Build and Push Docker Image
on:
workflow_dispatch:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.10", "3.11", "3.12" ]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# Build Docker image with a custom Python version
- name: Build Docker image (Python ${{ matrix.python-version }})
run: |
docker build \
--build-arg PYTHON_VERSION=${{ matrix.python-version }} \
-t ghcr.io/jageo/autoplex:python-${{ matrix.python-version }} .
-
# Push Docker image to GHCR
- name: Push Docker image to GHCR (Python ${{ matrix.python-version }})
run: |
docker push ghcr.io/jageo/autoplex:python-${{ matrix.python-version }}