File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ concurrency:
1717 group : ${{ github.workflow }}-${{ github.ref }}
1818 cancel-in-progress : true
1919
20+ permissions :
21+ contents : write
22+ pull-requests : write
23+
2024jobs :
2125
2226 update-schemas : # ----------------------------------------------------------
3337
3438 - name : Commit and Create Pull Request
3539 env :
36- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
40+ GH_TOKEN : ${{ github.token }}
3741 PR_BODY : |
3842 **This is an automated pull-request**
3943
4751 git checkout -b update-schemas
4852 git add assets/
4953 git commit -m "Update schema fallback files"
50- git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.git
5154 git push -f origin update-schemas
5255
53- PR_NUMBER=$(gh pr list --head update-schemas --json number --jq '.[0].number')
56+ PR_NUMBER=$(gh pr list --head update-schemas --json number --jq '.[0].number // empty ')
5457 if [ -z "$PR_NUMBER" ]; then
5558 gh pr create \
5659 --title "Update schema fallback files" \
5962 --base "${{ github.event.repository.default_branch }}" \
6063 --head "update-schemas" \
6164 --reviewer "swissspidy"
65+ else
66+ gh pr edit "$PR_NUMBER" \
67+ --title "Update schema fallback files" \
68+ --body "$PR_BODY" \
69+ --add-label "scope:distribution" \
70+ --base "${{ github.event.repository.default_branch }}"
6271 fi
72+
6373 fi
6474
You can’t perform that action at this time.
0 commit comments