workflows/release-documentation: Validate input and remove template expansion#199760
workflows/release-documentation: Validate input and remove template expansion#199760tstellar wants to merge 2 commits into
Conversation
…xpansion https://github.com/llvm/llvm-project/security/code-scanning/1715 https://github.com/llvm/llvm-project/security/code-scanning/1716 https://github.com/llvm/llvm-project/security/code-scanning/1717 https://github.com/llvm/llvm-project/security/code-scanning/1718 https://github.com/llvm/llvm-project/security/code-scanning/1719 https://github.com/llvm/llvm-project/security/code-scanning/1720 https://github.com/llvm/llvm-project/security/code-scanning/1721 https://github.com/llvm/llvm-project/security/code-scanning/1722
|
@llvm/pr-subscribers-github-workflow Author: Tom Stellard (tstellar) Changeshttps://github.com/llvm/llvm-project/security/code-scanning/1715 https://github.com/llvm/llvm-project/security/code-scanning/1716 https://github.com/llvm/llvm-project/security/code-scanning/1717 https://github.com/llvm/llvm-project/security/code-scanning/1718 https://github.com/llvm/llvm-project/security/code-scanning/1719 https://github.com/llvm/llvm-project/security/code-scanning/1720 https://github.com/llvm/llvm-project/security/code-scanning/1721 https://github.com/llvm/llvm-project/security/code-scanning/1722 Full diff: https://github.com/llvm/llvm-project/pull/199760.diff 1 Files Affected:
diff --git a/.github/workflows/release-documentation.yml b/.github/workflows/release-documentation.yml
index 75f6edc5cf078..ef32b811f624d 100644
--- a/.github/workflows/release-documentation.yml
+++ b/.github/workflows/release-documentation.yml
@@ -46,6 +46,11 @@ jobs:
with:
persist-credentials: false
+ - name: Validate Input
+ uses: ./.github/workflows/validate-release-version
+ with:
+ release-version: ${{ inputs.release-version }}
+
- name: Setup Python env
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
@@ -65,8 +70,9 @@ jobs:
- name: Build Documentation
env:
GITHUB_TOKEN: ${{ github.token }}
+ INPUTS_RELEASE_VERSION: ${{ inputs.release-version }}
run: |
- ./llvm/utils/release/build-docs.sh -release "${{ inputs.release-version }}" -no-doxygen
+ ./llvm/utils/release/build-docs.sh -release "$INPUTS_RELEASE_VERSION" -no-doxygen
- name: Create Release Notes Artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
@@ -89,14 +95,16 @@ jobs:
env:
PUSH_TOKEN: ${{ secrets.LLVMBOT_WWW_RELEASES_PUSH }}
GH_TOKEN: ${{ secrets.WWW_RELEASES_TOKEN }}
+ INPUTS_RELEASE_VERSION: ${{ inputs.release-version }}
+ run: |
run: |
- mkdir -p www-releases/${{ inputs.release-version }}
- mv ./docs-build/html-export/* www-releases/${{ inputs.release-version }}
+ mkdir -p www-releases/$INPUTS_RELEASE_VERSION
+ mv ./docs-build/html-export/* www-releases/$INPUTS_RELEASE_VERSION
cd www-releases
- git checkout -b ${{ inputs.release-version }}
- git add ${{ inputs.release-version }}
+ git checkout -b $INPUTS_RELEASE_VERSION
+ git add $INPUTS_RELEASE_VERSION
git config user.email "llvmbot@llvm.org"
git config user.name "llvmbot"
- git commit -a -m "Add ${{ inputs.release-version }} documentation"
- git push --force "https://$PUSH_TOKEN@github.com/llvmbot/www-releases.git" HEAD:refs/heads/${{ inputs.release-version }}
- gh pr create -f -B main -H llvmbot:${{ inputs.release-version }}
+ git commit -a -m "Add $INPUTS_RELEASE_VERSION documentation"
+ git push --force "https://$PUSH_TOKEN@github.com/llvmbot/www-releases.git" HEAD:refs/heads/$INPUTS_RELEASE_VERSION
+ gh pr create -f -B main -H llvmbot:$INPUTS_RELEASE_VERSION
|
| PUSH_TOKEN: ${{ secrets.LLVMBOT_WWW_RELEASES_PUSH }} | ||
| GH_TOKEN: ${{ secrets.WWW_RELEASES_TOKEN }} | ||
| INPUTS_RELEASE_VERSION: ${{ inputs.release-version }} | ||
| run: | |
There was a problem hiding this comment.
We now have two run lines?
There was a problem hiding this comment.
Fixed now, good catch.
https://github.com/llvm/llvm-project/security/code-scanning/1715 https://github.com/llvm/llvm-project/security/code-scanning/1716 https://github.com/llvm/llvm-project/security/code-scanning/1717 https://github.com/llvm/llvm-project/security/code-scanning/1718 https://github.com/llvm/llvm-project/security/code-scanning/1719 https://github.com/llvm/llvm-project/security/code-scanning/1720 https://github.com/llvm/llvm-project/security/code-scanning/1721 https://github.com/llvm/llvm-project/security/code-scanning/1722