- Add .gitea/workflows/build.yml for tag-triggered builds - Add Dockerfile for containerized deployment (port 8086) - Add .dockerignore to keep image lean - Add CHANGELOG.md following Keep a Changelog format - Update AGENTS.md with deployment verification URL Build pipeline: 1. Create Gitea release on v* tag 2. Build and push Docker image to git.schweitz.internal 3. Trigger Watchtower for automatic deployment Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
name: Build and Push
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Create Gitea Release
|
|
run: |
|
|
curl -sf -X POST \
|
|
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"tag_name": "${{ github.ref_name }}", "name": "Release ${{ github.ref_name }}", "body": "Automated release for ${{ github.ref_name }}"}' \
|
|
"${{ github.server_url }}/api/v1/repos/${{ github.repository }}/releases"
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
needs: release
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Login to Gitea Registry
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: git.schweitz.internal
|
|
username: ${{ secrets.REGISTRY_USER }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: |
|
|
git.schweitz.internal/jpmschweitzer/webber:latest
|
|
git.schweitz.internal/jpmschweitzer/webber:${{ github.ref_name }}
|
|
|
|
- name: Trigger Watchtower update
|
|
if: success()
|
|
run: |
|
|
curl -sf -H "Authorization: Bearer ${{ secrets.WATCHTOWER_TOKEN }}" \
|
|
http://watchtower:8080/v1/update
|