Migrate CI from Jenkins to Gitea Actions
Replaces the Jenkinsfile with a .gitea/workflows/build-push.yml that builds on pushes to main and pushes `latest` + `sha-<short>` tags to the Gitea package registry using the REGISTRY_URL variable and REGISTRY_TOKEN secret. Adds a docker-compose.yml that pulls the published image for deployment. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
name: Build and Push Image
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
IMAGE: josh/workweekprogress
|
||||
|
||||
jobs:
|
||||
build-push:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Compute short SHA
|
||||
id: vars
|
||||
run: echo "sha_short=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Login to Gitea registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ vars.REGISTRY_URL }}
|
||||
username: ${{ gitea.actor }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: |
|
||||
${{ vars.REGISTRY_URL }}/${{ env.IMAGE }}:latest
|
||||
${{ vars.REGISTRY_URL }}/${{ env.IMAGE }}:sha-${{ steps.vars.outputs.sha_short }}
|
||||
Reference in New Issue
Block a user