diff --git a/.gitea/workflows/poll-upstream.yml b/.gitea/workflows/poll-upstream.yml index 1d3cb66..299aa2e 100644 --- a/.gitea/workflows/poll-upstream.yml +++ b/.gitea/workflows/poll-upstream.yml @@ -78,7 +78,8 @@ jobs: # executing would cancel it (concurrency cancel-in-progress) and restart # identical work — builds longer than the poll interval could never # finish. Skip dispatching and let the running build complete; the next - # poll re-checks the published RPMs. + # poll re-checks the published RPMs. Note: the runs API reports path as + # "@", hence the startswith match. - name: Check for in-flight release build id: inflight run: | @@ -86,7 +87,7 @@ jobs: --header "Authorization: token ${{ secrets.DISPATCH_TOKEN }}" \ --url "${{ github.server_url }}/api/v1/repos/${{ github.repository }}/actions/runs?limit=50" \ | jq '[.workflow_runs[] - | select(.path | endswith("build-release.yml")) + | select((.path // "") | startswith("build-release.yml@")) | select(.status != "completed")] | length') echo "count=${count}" >> "$GITHUB_OUTPUT" echo "in-flight build-release runs: ${count}" @@ -170,7 +171,7 @@ jobs: --header "Authorization: token ${{ secrets.DISPATCH_TOKEN }}" \ --url "${{ github.server_url }}/api/v1/repos/${{ github.repository }}/actions/runs?limit=50" \ | jq '[.workflow_runs[] - | select(.path | endswith("build-prerelease.yml")) + | select((.path // "") | startswith("build-prerelease.yml@")) | select(.status != "completed")] | length') echo "count=${count}" >> "$GITHUB_OUTPUT" echo "in-flight build-prerelease runs: ${count}"