File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515 create-pr :
1616 needs : create-snapshot
1717 runs-on : ubuntu-24.04
18+ permissions :
19+ contents : write
1820 steps :
1921 - uses : actions/checkout@v5
2022 with :
@@ -28,19 +30,16 @@ jobs:
2830 name : snapshot
2931 path : test/snapshot
3032
31- - name : Compare snapshots
32- id : compare-snapshots
33+ - name : Configure git author
3334 run : |
34- git add test/snapshot
35- set +e
36- git diff --staged --exit-code test/snapshot
37- echo "diff=$?" >> "$GITHUB_OUTPUT"
35+ git config user.name 'github-actions'
36+ git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
3837
3938 - name : Create a pull request
40- if : steps.compare-snapshots.outputs.diff != '0'
4139 run : |
42- git config user.name 'github-actions'
43- git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
4440 git switch -c update-snapshots-${{ github.run_id }}
41+ git add test/snapshot
4542 git commit -m 'test: update snapshots'
4643 gh pr create --dry-run --fill --base "$GITHUB_REF_NAME"
44+ env :
45+ GH_TOKEN : ${{ github.token }}
You can’t perform that action at this time.
0 commit comments