🔧 chore: align Gitea workflow with local CI/CD script

- Add go mod tidy step to match local script
- Execute build.sh script in Docker Compose container
- Maintain consistent build process between local and CI
- Ensure Docker cache compatibility

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-04-07 23:18:22 +02:00
parent 02674dfb50
commit 2ca361ccd9

View File

@@ -177,6 +177,16 @@ jobs:
echo "CACHE_AVAILABLE=false" >> $GITHUB_ENV
fi
- name: Install dependencies
run: |
if [ "${{ env.CACHE_AVAILABLE }}" = "true" ]; then
echo "Running in Docker Compose container..."
docker compose -f docker-compose.build.yml exec -w /workspace build-cache sh -c "go mod tidy"
else
echo "Running natively..."
go mod tidy
fi
- name: Start build cache container with Docker Compose
run: |
if [ "${{ env.CACHE_AVAILABLE }}" = "true" ]; then
@@ -263,7 +273,14 @@ jobs:
run: swag fmt
- name: Build binaries
run: ./scripts/build.sh
run: |
if [ "${{ env.CACHE_AVAILABLE }}" = "true" ]; then
echo "Running in Docker Compose container..."
docker compose -f docker-compose.build.yml exec -w /workspace build-cache sh -c "./scripts/build.sh"
else
echo "Running natively..."
./scripts/build.sh
fi
# NOTE: Artifact upload disabled - actions/upload-artifact@v4 not available on Gitea
# TODO: Replace with Gitea-specific upload action when available