Просмотр исходного кода

Update PR build workflow to track latest head commit

copilot-swe-agent[bot] 3 месяцев назад
Родитель
Сommit
67f28b9023
1 измененных файлов с 8 добавлено и 8 удалено
  1. 8 8
      .github/workflows/build.yml

+ 8 - 8
.github/workflows/build.yml

@@ -6,18 +6,18 @@ on:
       - main
     tags:
       - '[0-9]*.[0-9]*.[0-9]*'
-  # PRs get the same gate -- without this the checks only ran after merge.
+  # Build every PR head commit and publish UF2 artifacts for reviewers.
   pull_request:
-  pull_request_review:
-    types:
-      - submitted
+
+concurrency:
+  group: build-${{ github.event.pull_request.number || github.ref }}
+  cancel-in-progress: true
 
 permissions:
   contents: read
 
 jobs:
   compile:
-    if: github.event_name != 'pull_request_review' || github.event.review.state == 'approved'
     runs-on: ubuntu-latest
 
     steps:
@@ -25,7 +25,7 @@ jobs:
         uses: actions/checkout@v4
         with:
           fetch-depth: 0
-          ref: ${{ github.event.pull_request.head.sha || github.event.review.pull_request.head.sha || github.sha }}
+          ref: ${{ github.event.pull_request.head.sha || github.sha }}
 
       - name: Set up Arduino CLI
         uses: arduino/setup-arduino-cli@v2
@@ -50,8 +50,8 @@ jobs:
       - name: Resolve build version
         id: build_version
         env:
-          PR_NUMBER: ${{ github.event.pull_request.number || github.event.review.pull_request.number || '' }}
-          HEAD_SHA: ${{ github.event.pull_request.head.sha || github.event.review.pull_request.head.sha || github.sha }}
+          PR_NUMBER: ${{ github.event.pull_request.number || '' }}
+          HEAD_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
         run: |
           set -eu
           SEMVER_RE='^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$'