Skip to content

Docs auto update#43

Open
joaopapereira wants to merge 3 commits into
carvel-dev:mainfrom
joaopapereira:docs-auto-update
Open

Docs auto update#43
joaopapereira wants to merge 3 commits into
carvel-dev:mainfrom
joaopapereira:docs-auto-update

Conversation

@joaopapereira
Copy link
Copy Markdown
Member

No description provided.

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')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will this also include prereleases? Do we want to include them?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what do you mean by prereleases?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not think that we do prereleases in our tools, but if we do we can look into it later

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .0 releases.
  • Update the install.sh template 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.

Comment thread scripts/install_sh/install.sh.txt Outdated
Comment on lines +17 to +24
# 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
Comment thread scripts/install_sh/install.sh.txt Outdated
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)
Comment on lines +185 to +190
- name: Checkout website
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: 'github.com/carvel-dev/carvel'
path: website
Comment thread .github/workflows/published_release.yml Outdated
AUTHOR_NAME='carvel-bot'
MESSAGE="chore: auto-update documentation for ${{ github.event.client_payload.toolName }} ${docVersion} ${timestamp}"

remote_repo="git@github.com:${REPOSITORY}"
Comment on lines +192 to +195
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}
Comment thread .github/workflows/published_release.yml Outdated
Comment on lines +204 to +208
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants