ci: require build pass before PR merge
All checks were successful
Build Nanobot OAuth / build (push) Successful in 50s

- Add pull_request trigger to build workflow
- Skip push and cache-to on PRs (build-only validation)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
wylab
2026-02-14 02:59:01 +01:00
parent 9f3e4089c2
commit ea5bf4cf5d

View File

@@ -3,6 +3,8 @@ name: Build Nanobot OAuth
on:
push:
branches: ['main']
pull_request:
branches: ['main']
workflow_dispatch:
env:
@@ -39,8 +41,8 @@ jobs:
provenance: false
platforms: linux/amd64
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
push: true
cache-to: ${{ github.event_name != 'pull_request' && format('type=registry,ref={0}/{1}:buildcache,mode=max', env.REGISTRY, env.IMAGE_NAME) || '' }}
push: ${{ github.event_name != 'pull_request' }}
tags: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}