-
Notifications
You must be signed in to change notification settings - Fork 1
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
fix(create-new-release.yml): update client-payload to use github.ref_… #92
Conversation
…name instead of github.ref to correctly reference the branch name feat(publish-docker-image.yml): add support for specifying a custom tag when triggering the workflow manually The client-payload in create-new-release.yml is updated to use github.ref_name instead of github.ref to ensure the correct branch name is used. In publish-docker-image.yml, support is added for specifying a custom tag when manually triggering the workflow using workflow_dispatch. This allows users to provide a specific tag for the Docker image build and push process.
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.
Hey @mauvehed - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 3 issues found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
tags: ghcr.io/${{ github.repository_owner }}/yourip:nightly | ||
- name: Build and push Docker image | ||
run: | | ||
TAG="${{ github.event.client_payload.tag || github.event.inputs.tag }}" |
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.
issue (bug_risk): Potential issue with tag extraction.
The expression ${{ github.event.client_payload.tag || github.event.inputs.tag }}
might not work as expected if github.event.client_payload.tag
is an empty string. Consider using a more explicit check.
exit 1 | ||
fi | ||
|
||
if [ "${TAG}" = "nightly" ]; then |
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.
suggestion: Use double brackets for string comparison.
Using double brackets [[ ... ]]
for string comparison is generally safer and more robust in shell scripts.
if [ "${TAG}" = "nightly" ]; then | |
if [[ "${TAG}" == "nightly" ]]; then |
…test image based on the TAG value The workflow file now includes a conditional statement to build and push a test image to the GitHub Container Registry (GHCR) when the TAG value is set to "test". This enhancement allows for better testing and validation of the application in a separate environment before deploying to production.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
…ic for better readability and maintainability The TAG variable assignment logic has been refactored to improve readability and maintainability. The script now sets the TAG variable based on the event type (repository_dispatch, workflow_dispatch, push) and commit message content. This change makes it easier to understand how the TAG is determined in different scenarios, ensuring consistent behavior across events.
…name instead of github.ref to correctly reference the branch name
feat(publish-docker-image.yml): add support for specifying a custom tag when triggering the workflow manually The client-payload in create-new-release.yml is updated to use github.ref_name instead of github.ref to ensure the correct branch name is used. In publish-docker-image.yml, support is added for specifying a custom tag when manually triggering the workflow using workflow_dispatch. This allows users to provide a specific tag for the Docker image build and push process.