Files
linkbeam/.gitea/README.md
Vladimir nett00n Budylnikov 20f949c250
Some checks failed
CI/CD Pipeline / Build Docker Image (push) Has been cancelled
CI/CD Pipeline / Test (push) Has been cancelled
CI/CD Pipeline / Build (arm64, windows, linkbeam-windows-arm64.exe) (push) Has been cancelled
CI/CD Pipeline / Build (386, linux, linkbeam-linux-386) (push) Has been cancelled
CI/CD Pipeline / Lint (push) Has been cancelled
CI/CD Pipeline / Build (amd64, linux, linkbeam-linux-amd64) (push) Has been cancelled
CI/CD Pipeline / Build (arm, 7, linux, linkbeam-linux-armv7) (push) Has been cancelled
CI/CD Pipeline / Build (386, windows, linkbeam-windows-386.exe) (push) Has been cancelled
CI/CD Pipeline / Build (amd64, windows, linkbeam-windows-amd64.exe) (push) Has been cancelled
CI/CD Pipeline / Build (arm64, darwin, linkbeam-darwin-arm64) (push) Has been cancelled
CI/CD Pipeline / Build (arm64, linux, linkbeam-linux-arm64) (push) Has been cancelled
CI/CD Pipeline / Build (amd64, darwin, linkbeam-darwin-amd64) (push) Has been cancelled
CI/CD Pipeline / Create Release (push) Has been cancelled
Init commit
2025-10-12 21:56:53 +04:00

110 lines
2.5 KiB
Markdown

# Gitea CI/CD Configuration
This directory contains Gitea Actions workflows for automated testing, building, and deployment.
## Workflows
### `ci.yml` - Main CI/CD Pipeline
Runs on every push and pull request:
1. **Lint Stage**
- golangci-lint with all enabled linters
- go fmt verification
- go vet static analysis
2. **Test Stage**
- Run all tests with `-race` flag
- Generate coverage reports
- Upload coverage artifacts
3. **Build Stage**
- Matrix build for multiple platforms:
- Linux: amd64, 386, arm64, armv7
- Windows: amd64, 386, arm64
- macOS: amd64, arm64
- Build with version and commit info in ldflags
- Upload build artifacts
4. **Docker Stage**
- Multi-architecture Docker build
- Cache optimization with GitHub Actions cache
- Build for: linux/amd64, linux/arm64, linux/arm/v7
### `docker-publish.yml` - Docker Registry Publishing
Triggered on version tags (`v*`):
- Builds multi-arch Docker images
- Pushes to container registry
- Tags with version numbers and `latest`
- Uses registry caching for faster builds
### `release.yml` - Release Creation
Triggered on semver tags (`v*.*.*`):
- Creates GitHub/Gitea release
- Uploads platform-specific binaries (tar.gz for Unix, zip for Windows)
- Generates SHA256 checksums
- Includes release notes
## Configuration Required
### Secrets
Set these in your Gitea repository settings:
- `GITEA_TOKEN` - Gitea API token with package write permissions
- `GITHUB_TOKEN` - Automatically provided by Gitea Actions
### Registry Configuration
Update the registry URL in `docker-publish.yml`:
```yaml
env:
REGISTRY: gitea.example.com # Change to your Gitea instance
IMAGE_NAME: ${{ github.repository }}
```
## Local Testing
### Test builds locally:
```bash
# Test Go build
make build
# Test multi-platform build
GOOS=linux GOARCH=arm64 go build -o linkbeam-linux-arm64 cmd/linkbeam/main.go
# Test Docker build (requires Docker)
docker build -t linkbeam:test .
# Test Docker with compose
docker-compose up
```
## Triggering Releases
To create a new release:
```bash
# Tag with semantic version
git tag v1.0.0
git push origin v1.0.0
# This will trigger:
# 1. Full CI pipeline
# 2. Docker image build and push
# 3. Release creation with binaries
```
## Build Artifacts
Artifacts are uploaded for each workflow run:
- Coverage reports (test stage)
- Platform binaries (build stage)
- Docker images (docker stage)
- Release assets (release stage)
Artifacts are available for 90 days after the workflow run.