-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add option to trigger release-assets workflow manually #280
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Artem Bortnikov <[email protected]>
WalkthroughThe pull request modifies the GitHub Actions workflow file Changes
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🔭 Outside diff range comments (1)
.github/workflows/release-assets.yaml (1)
Line range hint
26-31
: Adapt tag handling for manual workflow runs.The current tag extraction needs to account for both automatic (release) and manual triggers. For manual runs, use the input parameter instead of
github.ref_name
.- name: Get tag from current run run: | - TAG=${{ github.ref_name }} + if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then + TAG=${{ inputs.tag }} + else + TAG=${{ github.ref_name }} + fi echo "Tag for packaging chart is $TAG" echo "RELEASE_TAG=${TAG}" >> $GITHUB_ENV echo "RELEASE_TAG_TRIMMED_V=${TAG#v}" >> $GITHUB_ENV
🧹 Nitpick comments (1)
.github/workflows/release-assets.yaml (1)
Line range hint
32-32
: Add error handling for the build step.Consider adding error checking and better logging for the manifest build step to help diagnose issues when the workflow fails.
- - run: make build-dist-manifests IMG=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${RELEASE_TAG} + - name: Build distribution manifests + run: | + set -euo pipefail + echo "Building manifests for image: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${RELEASE_TAG}" + make build-dist-manifests IMG=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${RELEASE_TAG} + echo "Verifying generated manifests..." + for file in etcd-operator.yaml etcd-operator.crds.yaml etcd-operator.non-crds.yaml; do + if [[ ! -f "dist/$file" ]]; then + echo "Error: $file was not generated" + exit 1 + fi + done
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/release-assets.yaml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: test on k8s latest version
- GitHub Check: test-e2e on k8s latest version
- GitHub Check: test-e2e on k8s previous version
- GitHub Check: test on k8s previous version
- GitHub Check: test-e2e on k8s penultimate version
- GitHub Check: pre-commit
- GitHub Check: test on k8s penultimate version
🔇 Additional comments (1)
.github/workflows/release-assets.yaml (1)
Line range hint
15-17
: LGTM! Good security practices in place.The workflow follows security best practices by:
- Using pinned action versions
- Setting minimal required permissions (contents: write)
Release v0.4.1 did not trigger creation of assets, hence documentation is not consistent with the state of the release:
but the etcd-operator.yaml does not exists for release v0.4.1 (latest)
To solve this bug, we can manually trigger the workflow targeting it to the tag v0.4.1.
Fixes: #263
Summary by CodeRabbit