Files
xray_sub_server/.gitea/workflows/docker-publish.yml
crutoboy 76a6cc952c
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 32s
fix ci/cd
2026-05-22 09:43:09 +00:00

44 lines
1.1 KiB
YAML

name: Build and Push Docker Image
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Gitea Container Registry
uses: docker/login-action@v3
with:
registry: ${{ gitea.hostname }} # автоматически подставляется Gitea
username: ${{ gitea.actor }}
password: ${{ secrets.GITEATOKEN }}
- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ gitea.hostname }}/${{ gitea.repository }}
tags: |
type=sha
type=raw,value=latest
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max