Public Access
1
0

feat: docker runner

This commit is contained in:
2025-09-02 00:36:15 -04:00
parent 7480df651a
commit 54f6392f56

View File

@@ -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 }}