do_simple/.gitea/workflows/build_to_registry.yaml
vitaliy e29e3eb065
Some checks failed
Build and Push to GHCR / build (push) Has been cancelled
k8s: helm manifest
2025-11-13 16:58:59 +03:00

45 lines
1014 B
YAML

name: Build and Push to GHCR
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
- name: Run tests
run: go test -v ./...
- name: Build
run: go build -o app ./cmd/app
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: git.gocommunity.ru
username: ${{ secrets.USER }}
password: ${{ secrets.TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: |
git.gocommunity.ru/${{ github.repository }}:latest
git.gocommunity.ru/${{ github.repository }}:${{ github.sha }}
labels: |
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}