Files
n8n/.gitea/workflows/docker-build.yml
Nikolay Tatarinov 1dcf052278
Some checks failed
Build and Push to Gitea Registry / build-and-push (push) Failing after 3m15s
remove https
2025-09-08 14:58:31 +03:00

55 lines
1.5 KiB
YAML

name: Build and Push to Gitea Registry
on:
push:
branches: [main,master]
tags: ['v*']
pull_request:
branches: [main,master]
env:
REGISTRY: git.arnike.ru # Use only the domain, not the full URL
IMAGE_NAME: arnike/n8n # Use the namespace/repository format
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to Gitea Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ gitea.actor }}
password: ${{ secrets.TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=tag
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max