Files
lovelope/.gitea/workflows/docker-publish.yml
T
jeanGaston 3a859a8060
Publish Docker image / build-and-push (push) Successful in 3m16s
fix(ci): lowercase image name for registry tag
github.repository preserves the owner's case (jeanGaston), but OCI
registries reject uppercase repository names. Compute a lowercased
IMAGE_NAME env var and use it for both tags instead.
2026-07-30 11:20:06 +02:00

38 lines
961 B
YAML

name: Publish Docker image
on:
push:
branches: [main, master]
tags: ['v*']
permissions:
contents: read
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Compute lowercase image name
run: echo "IMAGE_NAME=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
- name: Log in to Gitea container registry
uses: docker/login-action@v3
with:
registry: ${{ vars.REGISTRY_HOST }}
username: ${{ github.actor }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
${{ vars.REGISTRY_HOST }}/${{ env.IMAGE_NAME }}:latest
${{ vars.REGISTRY_HOST }}/${{ env.IMAGE_NAME }}:${{ github.sha }}