From 9b59153bfdc31fc62c5e57c8c5bfb2ed84cf832d Mon Sep 17 00:00:00 2001 From: trendschau Date: Thu, 24 Apr 2025 15:01:56 +0200 Subject: [PATCH] Create docker-image.yml Automatically create and push an image to docker --- .github/workflows/docker-image.yml | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/docker-image.yml diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml new file mode 100644 index 0000000..49e498b --- /dev/null +++ b/.github/workflows/docker-image.yml @@ -0,0 +1,32 @@ +name: Build and Push Docker Image on Release + +on: + push: + tags: + - 'v*.*.*' # Triggers only on semantic version tags like v2.2.2 + +jobs: + build-and-push: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push Docker image + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: | + kixote/typemill:${{ github.ref_name }} + kixote/typemill:latest