Add Gitea Actions workflow to build and publish Docker image
Some checks failed
Docker Build and Publish / Build Docker image and publish to Gitea (push) Failing after 58s

Builds on push to main and publishes to git.sdgarren.com container registry.
Requires REGISTRY_USERNAME and REGISTRY_TOKEN repo secrets.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-07 12:36:26 -04:00
parent bf1ce4b70e
commit 7415590fba

View File

@@ -0,0 +1,45 @@
name: Docker Build and Publish
on:
push:
branches: [ "main" ]
paths-ignore:
- '**/README.md'
workflow_dispatch:
jobs:
build-and-push-docker-image:
name: Build Docker image and publish to Gitea
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Docker buildx
uses: docker/setup-buildx-action@v3
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: git.sdgarren.com
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v5
with:
provenance: false
context: .
platforms: linux/amd64
push: true
tags: |
git.sdgarren.com/scott/usb-crash-cart:latest
- name: Image digest
run: echo ${{ steps.build-and-push.outputs.digest }}