File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -164,7 +164,9 @@ jobs:
164164
165165 # --- 4. Dated branch + auto PR against TechAPI (only with a PAT) ---
166166 - name : Create refresh PR
167+ id : create_pr
167168 if : env.TECHAPI_WRITE_TOKEN != ''
169+ continue-on-error : true
168170 uses : peter-evans/create-pull-request@v6
169171 with :
170172 path : ./techapi
@@ -181,3 +183,16 @@ jobs:
181183 committer : TechEngineBot <289859915+TechEngineBot@users.noreply.github.com>
182184 author : TechEngineBot <289859915+TechEngineBot@users.noreply.github.com>
183185 delete-branch : true
186+
187+ - name : Confirm refresh PR exists
188+ if : env.TECHAPI_WRITE_TOKEN != ''
189+ env :
190+ GH_TOKEN : ${{ env.TECHAPI_WRITE_TOKEN }}
191+ run : |
192+ pr_count="$(gh pr list --repo GetTechAPI/TechAPI --head refresh/${{ steps.meta.outputs.date }} --base main --state open --json number --jq length)"
193+ if [ "$pr_count" -gt 0 ]; then
194+ exit 0
195+ fi
196+
197+ echo "::error::Refresh PR refresh/${{ steps.meta.outputs.date }} was not created."
198+ exit 1
You can’t perform that action at this time.
0 commit comments