From 80f6fd0153d02e7791048b058f3ad75aae7a7119 Mon Sep 17 00:00:00 2001 From: Raphael Nestler Date: Mon, 6 Jan 2025 14:31:10 +0100 Subject: [PATCH] Add docker publish workflow --- .github/workflows/docker-publish.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/docker-publish.yml diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..8183796 --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,24 @@ +name: Docker Publish + +on: + push: + branches: ["main"] + +jobs: + docker-build: + runs-on: ubuntu-24.04 + env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + steps: + - uses: actions/checkout@v4 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build Docker image + run: docker build -t "${REGISTRY}/${IMAGE_NAME}:main" . + - name: Push Docker image + run: docker push "${REGISTRY}/${IMAGE_NAME}:main"