Skip to content

Commit b336dba

Browse files
Update "Update version history" workflow (devcontainers#442)
1 parent d205f9f commit b336dba

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/version-history.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
name: Update version history
3030
if: ${{ github.ref == 'refs/heads/main' || github.event.base_ref == 'refs/heads/main' }}
3131
runs-on: ubuntu-latest
32+
environment: documentation
3233
permissions:
3334
contents: write
3435
pull-requests: write
@@ -88,7 +89,7 @@ jobs:
8889
- name: Create PR with updated image information
8990
id: push_image_info
9091
env:
91-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
92+
GITHUB_TOKEN: ${{ secrets.PAT }}
9293
run: |
9394
set -e
9495
@@ -109,5 +110,12 @@ jobs:
109110
# Push (unless disabled for testing)
110111
if [ "$NO_UPDATES" != "true" ] && [ "${{ inputs.push }}" = "true" ]; then
111112
git push origin "$branch"
112-
gh pr create --title "$message" --body "$message"
113+
gh api \
114+
--method POST \
115+
-H "Accept: application/vnd.github+json" \
116+
/repos/${GITHUB_REPOSITORY}/pulls \
117+
-f title="$message" \
118+
-f body="$message" \
119+
-f head="$branch" \
120+
-f base='main'
113121
fi

0 commit comments

Comments
 (0)