Docs auto update#43
Conversation
Signed-off-by: João Pereira <joao.pereira@broadcom.com>
Signed-off-by: João Pereira <joao.pereira@broadcom.com>
| prepare-documentation-update: | ||
| runs-on: ubuntu-latest | ||
| needs: [process-release-information,update-releases-yaml] | ||
| if: endsWith(github.event.client_payload.tagName, '.0') |
There was a problem hiding this comment.
Will this also include prereleases? Do we want to include them?
There was a problem hiding this comment.
what do you mean by prereleases?
There was a problem hiding this comment.
I do not think that we do prereleases in our tools, but if we do we can look into it later
There was a problem hiding this comment.
Pull request overview
This PR aims to automate documentation updates as part of the published release workflow, and adjusts the generated install.sh template to verify downloaded binaries using a checksum tool available on the target system.
Changes:
- Add a new GitHub Actions job to auto-run the website documentation release script and push changes to the website repo on
.0releases. - Update the
install.shtemplate to select a checksum utility dynamically and use it for verification.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| scripts/install_sh/install.sh.txt | Updates checksum command selection/usage in the generated install script. |
| .github/workflows/published_release.yml | Adds a documentation auto-update job triggered on .0 releases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Check for required commands | ||
| check_command sha256sum || check_command sha1sum | ||
|
|
||
| # Set checksum command based on availability | ||
| CHECKSUM_CMD=sha256sum | ||
| if ! command -v $CHECKSUM_CMD >/dev/null 2>&1; then | ||
| CHECKSUM_CMD=sha1sum | ||
| fi |
| fi | ||
|
|
||
| shasum -v 1>/dev/null 2>&1 || (echo "Missing shasum binary" && exit 1) | ||
| $CHECKSUM_CMD -v 1>/dev/null 2>&1 || (echo "Missing shasum binary" && exit 1) |
| - name: Checkout website | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| repository: 'github.com/carvel-dev/carvel' | ||
| path: website |
| AUTHOR_NAME='carvel-bot' | ||
| MESSAGE="chore: auto-update documentation for ${{ github.event.client_payload.toolName }} ${docVersion} ${timestamp}" | ||
|
|
||
| remote_repo="git@github.com:${REPOSITORY}" |
| run: | | ||
| pushd website/site | ||
| docVersion=`echo ${{ github.event.client_payload.tagName }} | awk -F. '{print $1"."$2".x"}'` | ||
| ./hack/release-doc.sh ${{ github.event.client_payload.toolName }} ${docVersion} |
| tempkey=`basename $0` | ||
| TMP_DEPLOY_PRIV_KEY=`mktemp /tmp/${tempkey}.XXXXXX` || exit 1 | ||
| echo "${{ secrets.INSTALL_SH_DEPLOY_PRIVATE_KEY }}" > $TMP_DEPLOY_PRIV_KEY | ||
| eval $(ssh-agent -s) | ||
| ssh-add ${TMP_DEPLOY_PRIV_KEY} |
- Ensure the shasum logic is correct - Update all the version of the actions being used to the latest Signed-off-by: Joao Pereira <joaopapereira@gmail.com>
No description provided.