Skip to content

Commit 7dec47f

Browse files
Merge branch 'main' into stakedao-additions
2 parents b2ffd1b + 57b93e6 commit 7dec47f

1 file changed

Lines changed: 8 additions & 9 deletions

File tree

.github/workflows/checksum_addresses.yaml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,17 @@ jobs:
1212
permissions:
1313
contents: write
1414
steps:
15-
- name: Checkout base (trusted script)
15+
- name: Checkout PR branch
1616
uses: actions/checkout@v6
1717
with:
18-
ref: ${{ github.base_ref }}
18+
ref: ${{ github.head_ref }}
1919

20-
- name: Overlay PR JSON files
20+
- name: Use trusted script from base
2121
env:
22-
PR_SHA: ${{ github.event.pull_request.head.sha }}
22+
BASE_REF: ${{ github.base_ref }}
2323
run: |
24-
git fetch origin "$PR_SHA"
25-
git checkout "$PR_SHA" -- 'config/*.json' 'extras/*.json' 2>/dev/null || true
24+
git fetch origin "$BASE_REF"
25+
git checkout "origin/$BASE_REF" -- scripts/validate_checksums.py
2626
2727
- name: Set up Python
2828
uses: actions/setup-python@v6
@@ -36,13 +36,12 @@ jobs:
3636
run: python scripts/validate_checksums.py --fix
3737

3838
- name: Push fixes to PR branch
39-
env:
40-
HEAD_REF: ${{ github.head_ref }}
4139
run: |
40+
git checkout -- scripts/validate_checksums.py
4241
git config user.name "github-actions[bot]"
4342
git config user.email "github-actions[bot]@users.noreply.github.com"
4443
git add config/*.json extras/*.json
4544
if ! git diff --staged --quiet; then
4645
git commit -m "chore: checksum addresses"
47-
git push origin "HEAD:$HEAD_REF"
46+
git push
4847
fi

0 commit comments

Comments
 (0)