Files
lovelope/.gitea/workflows/docker-publish.yml
T
jeanGaston 395dcad6be
Publish Docker image / build-and-push (push) Has been cancelled
ci: add Gitea Actions workflow to publish Docker image
Builds the existing Dockerfile and pushes it to the Gitea container
registry on pushes to main/master and version tags.
2026-07-30 10:41:36 +02:00

35 lines
805 B
YAML

name: Publish Docker image
on:
push:
branches: [main, master]
tags: ['v*']
permissions:
contents: read
packages: write
jobs:
build-and-push:
runs-on: docker
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Log in to Gitea container registry
uses: docker/login-action@v3
with:
registry: ${{ vars.GITEA_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
${{ vars.GITEA_REGISTRY }}/${{ github.repository }}:latest
${{ vars.GITEA_REGISTRY }}/${{ github.repository }}:${{ github.sha }}