FILE / ScuroNeko/gitea-runner-test

.gitea/workflows/docker.yaml

Исходный файл и его история в репозитории.
FILE e12fe78138b5f8b960da72f06e98f8af0846a5a9
Files
gitea-runner-test/.gitea/workflows/docker.yaml
T
ScuroNeko e12fe78138
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 7s
Build and push image / docker (push) Failing after 24s
Python CI / python (push) Has been cancelled
Golang lint / GoLint (push) Has been cancelled
test
2026-04-23 15:22:08 +03:00

49 lines
1.4 KiB
YAML

name: Build and push image
run-name: Building and pushing Docker image for ${{ gitea.repository }} by ${{ gitea.actor }} 🚀
on:
push:
branches: [main]
tags: ["v*"]
jobs:
docker:
runs-on: docker-latest
steps:
- name: Check out repository code
uses: actions/checkout@v5
- name: Set up Buildx
uses: docker/setup-buildx-action@v4
- name: Login to custom registry
uses: docker/login-action@v4
with:
registry: git.scuroneko.dev
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build and push branch image
if: startsWith(gitea.ref, 'refs/heads/')
uses: docker/build-push-action@v7
with:
context: .
push: true
tags: git.scuroneko.dev/scuroneko/runner-test:latest
cache-from: type=gha,scope=runner-test
cache-to: type=gha,mode=max,scope=runner-test
- name: Build and push tag image
if: startsWith(gitea.ref, 'refs/tags/')
uses: docker/build-push-action@v7
with:
context: .
file: go.Dockerfile
push: true
tags: |
git.scuroneko.dev/scuroneko/runner-test:${{ gitea.ref_name }}
git.scuroneko.dev/scuroneko/runner-test:latest
cache-from: type=gha,scope=runner-test
cache-to: type=gha,mode=max,scope=runner-test