File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -195,7 +195,9 @@ jobs:
195195
196196 # --- 4. Dated branch + auto PR against TechAPI (only with a PAT) ---
197197 - name : Create refresh PR
198+ id : create_pr
198199 if : env.TECHAPI_WRITE_TOKEN != ''
200+ continue-on-error : true
199201 uses : peter-evans/create-pull-request@v6
200202 with :
201203 path : ./techapi
@@ -212,3 +214,16 @@ jobs:
212214 committer : TechEngineBot <289859915+TechEngineBot@users.noreply.github.com>
213215 author : TechEngineBot <289859915+TechEngineBot@users.noreply.github.com>
214216 delete-branch : true
217+
218+ - name : Confirm refresh PR exists
219+ if : env.TECHAPI_WRITE_TOKEN != ''
220+ env :
221+ GH_TOKEN : ${{ env.TECHAPI_WRITE_TOKEN }}
222+ run : |
223+ pr_count="$(gh pr list --repo GetTechAPI/TechAPI --head refresh/${{ steps.meta.outputs.date }} --base main --state open --json number --jq length)"
224+ if [ "$pr_count" -gt 0 ]; then
225+ exit 0
226+ fi
227+
228+ echo "::error::Refresh PR refresh/${{ steps.meta.outputs.date }} was not created."
229+ exit 1
You can’t perform that action at this time.
0 commit comments