-
-
Notifications
You must be signed in to change notification settings - Fork 144
Docker retag yaml added #1335
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
Docker retag yaml added #1335
Conversation
WalkthroughA new GitHub Actions workflow file is introduced to automate Docker image retagging on pull requests, excluding those limited to documentation or similar files. The workflow logs into Docker Hub, sets up Docker Buildx, derives a tag from the event, retags the "edge" image, pushes the new tag, and optionally inspects the image. Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub Actions
participant Docker Hub
GitHub Actions->>GitHub Actions: Trigger on PR (excluding docs/assets)
GitHub Actions->>GitHub Actions: Login to Docker Hub
GitHub Actions->>GitHub Actions: Setup Docker Buildx
GitHub Actions->>GitHub Actions: Extract tag from event
GitHub Actions->>Docker Hub: Pull "edge" image
GitHub Actions->>GitHub Actions: Retag image with new tag
GitHub Actions->>Docker Hub: Push new tagged image
GitHub Actions->>Docker Hub: (Optional) Inspect new image tag
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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
🧹 Nitpick comments (3)
.github/workflows/test-docker-retag.yaml (3)
1-7
: Refine docs path-ignore glob patternThe glob
"**.md"
may not correctly ignore markdown files in nested directories—use"**/*.md"
for comprehensive coverage.Example diff:
- - "**.md" + - "**/*.md"
33-38
: Ensure the 'edge' image is available before retag
docker buildx imagetools create
may require the source image locally. Add an explicit pull step before retagging:+ - name: Pull edge image + run: docker pull parseable/parseable:edge
39-42
: Guard the optional image inspect stepThe inspect step always runs and can fail if the new tag isn't available or the previous step errored. Wrap it with an
if:
conditional to make it truly optional, for example:- name: Inspect new tag (optional) if: ${{ always() && steps.meta.outputs.tag }} run: | docker buildx imagetools inspect parseable/parseable:${{ steps.meta.outputs.tag }}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.github/workflows/test-docker-retag.yaml
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (9)
- GitHub Check: Build Default aarch64-apple-darwin
- GitHub Check: Build Default x86_64-unknown-linux-gnu
- GitHub Check: Build Kafka x86_64-unknown-linux-gnu
- GitHub Check: Build Default x86_64-pc-windows-msvc
- GitHub Check: Build Default x86_64-apple-darwin
- GitHub Check: Build Default aarch64-unknown-linux-gnu
- GitHub Check: Quest Smoke and Load Tests for Distributed deployments
- GitHub Check: Quest Smoke and Load Tests for Standalone deployments
- GitHub Check: coverage
🔇 Additional comments (1)
.github/workflows/test-docker-retag.yaml (1)
17-18
: Ensure Docker Hub credentials are setThis workflow depends on
DOCKER_USERNAME
andDOCKER_PASSWORD
in repository secrets. Please verify they are configured under Settings → Secrets (or your environment) to avoid authentication failures.
- name: Extract Tag or SHA | ||
id: meta | ||
run: | | ||
if [[ "${{ github.event_name }}" == "push" ]]; then | ||
TAG_NAME="${GITHUB_REF#refs/tags/}" | ||
else | ||
TAG_NAME="test-pr-${GITHUB_SHA::7}" | ||
fi |
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.
Unreachable 'push' branch in tag extraction
The if [[ "${{ github.event_name }}" == "push" ]]
branch will never execute because the workflow only triggers on pull_request
. Either add a push
trigger or simplify/remove the unused conditional.
🤖 Prompt for AI Agents
In .github/workflows/test-docker-retag.yaml around lines 23 to 30, the
conditional checking if github.event_name is "push" is unreachable because the
workflow triggers only on pull_request events. To fix this, either add a push
trigger to the workflow triggers section to allow the push branch to execute or
simplify the script by removing the conditional and only handling the
pull_request case.
closing in favour of #1336 |
Fixes #XXXX.
Description
This PR has:
Summary by CodeRabbit