Skip to content

Commit

Permalink
ci: adds auto-build via docker
Browse files Browse the repository at this point in the history
  • Loading branch information
pgierz committed Jul 19, 2024
1 parent c3e01bd commit f8a8425
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
32 changes: 32 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and Push Docker Image
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to ghcr.io
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ env.REGISTRY }}/${{ steps.meta.outputs.tags }}
labels: ${{ env.REGISTRY }}/${{ steps.meta.outputs.labels }}
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:3.12-slim

RUN apt update && apt upgrade -y && apt install -y git

WORKDIR /usr/src/app

COPY . .

RUN pip install .

ENTRYPOINT ["metis-wizard"]
CMD [ "--help" ]
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "metis-wizard"
version = "1.0.0"
version = "2.0.0"
description = ""
authors = ["Paul Gierz <pgierz@awi.de>"]
readme = "README.md"
Expand Down

0 comments on commit f8a8425

Please sign in to comment.