Skip to content
Snippets Groups Projects
Commit c3c1b047 authored by Tom Stellard's avatar Tom Stellard Committed by Tobias Hieta
Browse files

workflows/release-documentation: Submit a pull request with changes (#108247)

This is instead of pushing directly. Creating a pull request is slightly
more work for the release manager, but it is more secure as we no longer
need a secret with write access to the www-releases repo.

(cherry picked from commit 9cd289fa4a7355e1bfd3129ba9c755f979fd0a72)
parent 7b275648
No related branches found
No related tags found
No related merge requests found
...@@ -72,17 +72,20 @@ jobs: ...@@ -72,17 +72,20 @@ jobs:
ref: main ref: main
fetch-depth: 0 fetch-depth: 0
path: www-releases path: www-releases
persist-credentials: false
- name: Upload Release Notes - name: Upload Release Notes
if: env.upload if: env.upload
env: env:
WWW_RELEASES_TOKEN: ${{ secrets.WWW_RELEASES_TOKEN }} GH_TOKEN: ${{ secrets.WWW_RELEASES_TOKEN }}
run: | run: |
mkdir -p ../www-releases/${{ inputs.release-version }} mkdir -p www-releases/${{ inputs.release-version }}
mv ./docs-build/html-export/* ../www-releases/${{ inputs.release-version }} mv ./docs-build/html-export/* www-releases/${{ inputs.release-version }}
cd ../www-releases cd www-releases
git checkout -b ${{ inputs.release-version }}
git add ${{ inputs.release-version }} git add ${{ inputs.release-version }}
git config user.email "llvmbot@llvm.org" git config user.email "llvmbot@llvm.org"
git config user.name "llvmbot" git config user.name "llvmbot"
git commit -a -m "Add ${{ inputs.release-version }} documentation" git commit -a -m "Add ${{ inputs.release-version }} documentation"
git push "https://$WWW_RELEASES_TOKEN@github.com/${{ github.repository_owner }}/www-releases" main:main git push --force "https://$GH_TOKEN@github.com/llvmbot/www-releases.git" HEAD:refs/heads/${{ inputs.release-version }}
gh pr create -f -B main -H ${{ inputs.release-version }} -R llvmbot/www-releases
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment