From 54f6392f560ccf83912d5946447f1d3138a55d24 Mon Sep 17 00:00:00 2001 From: giteaadmin Date: Tue, 2 Sep 2025 00:36:15 -0400 Subject: [PATCH] feat: docker runner --- .gitea/workflows/build-docker.yml | 41 +++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .gitea/workflows/build-docker.yml diff --git a/.gitea/workflows/build-docker.yml b/.gitea/workflows/build-docker.yml new file mode 100644 index 0000000..9bbcda3 --- /dev/null +++ b/.gitea/workflows/build-docker.yml @@ -0,0 +1,41 @@ + +# Save this file in your repository at: .gitea/workflows/build-docker.yml +name: Build and Push Docker Image + +# This workflow runs on any push to the main branch +on: + push: + branches: + - main + +jobs: + build-and-push: + # This job will run on any runner with the 'docker' label + runs-on: docker + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + # This action sets up a builder instance required for build-push-action + uses: docker/setup-buildx-action@v3 + + - name: Log in to Docker Hub + # This action logs into your container registry + uses: docker/login-action@v3 + with: + # Use secrets for your credentials + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push Docker image + # This action builds the Dockerfile and pushes it to the registry + uses: docker/build-push-action@v5 + with: + context: . + file: ./Dockerfile # Assumes your Dockerfile is in the root of the repo + push: true + # Update with your desired image name and tag + tags: twk95/11ty-site:latest, twk95/11ty-site:${{ github.sha }} +