Skip to content

Commit cc4171f

Browse files
committed
ci: fix regenerate-models signed-commit retries and master baseline
1 parent a2d2349 commit cc4171f

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/manual_regenerate_models.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,14 @@ jobs:
6363
with:
6464
token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
6565

66-
# Record master's SHA now: a later dispatch checks out the auto-update branch before regenerating,
67-
# so the "did anything change vs. master?" check below must compare against this SHA, not HEAD.
66+
# Record master's SHA up front: a later step checks out the auto-update branch, so the change check below
67+
# can't compare against HEAD. Resolve master from the remote rather than the checked-out ref: the run may be
68+
# dispatched from a non-master ref, but that check and the PR both target master, so master is the baseline.
6869
- name: Record master ref
6970
id: base
70-
run: echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
71+
run: |
72+
git fetch --depth=1 origin master
73+
echo "sha=$(git rev-parse FETCH_HEAD)" >> "$GITHUB_OUTPUT"
7174
7275
# Does the auto-update branch already exist on the remote? If so, a previous dispatch opened the PR
7376
# and we append to it. If not, the signed-commit step creates it from master.
@@ -155,7 +158,6 @@ jobs:
155158
github-token: ${{ secrets.APIFY_SERVICE_ACCOUNT_GITHUB_TOKEN }}
156159
branch: ${{ env.BRANCH }}
157160
create-branch: ${{ steps.branch.outputs.create }}
158-
retries: "3"
159161

160162
# Ensure exactly one PR exists for this branch. It's no longer auto-closed, so an existing PR is
161163
# reused. Only the first run (or one whose PR step a concurrent dispatch cancelled) creates it.

0 commit comments

Comments
 (0)