Skip to content

WIP: GHA to publish to DockerHub with PR comments - #687

Closed
javuto wants to merge 1 commit into
mainfrom
pr-publish-docker-image
Closed

WIP: GHA to publish to DockerHub with PR comments#687
javuto wants to merge 1 commit into
mainfrom
pr-publish-docker-image

Conversation

@javuto

@javuto javuto commented Aug 26, 2025

Copy link
Copy Markdown
Collaborator

Adding a new GitHub Action to be able to push commits as DockerHub images, when requested by a list of authorized users in the comments of the Pull Request.

@javuto
javuto requested a review from Copilot August 26, 2025 17:34
@javuto javuto added 📦 build Building related issues cicd CICD related issues labels Aug 26, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 introduces a GitHub Action workflow that allows authorized users to trigger Docker image publishing to DockerHub by commenting /publish on pull requests. The workflow includes user authorization checks, multi-platform Docker builds, and automated PR comments for success/failure feedback.

  • Adds PR comment-triggered publishing workflow with user authorization
  • Updates existing workflow names for better clarity
  • Implements matrix build strategy for multiple components (tls, admin, api, cli)

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/pr-comment-publish.yml New workflow for PR comment-triggered Docker publishing with authorization and feedback
.github/workflows/test-release.yml Updated workflow name to be more descriptive
.github/workflows/release.yml Updated workflow name to be more descriptive

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

build-args: |
GOLANG_VERSION=${{ env.GOLANG_VERSION }}
GIT_SHA=${{ needs.check-comment.outputs.pr-sha }}
BUILD_DATE=${{ github.event.head_commit.timestamp }}

Copilot AI Aug 26, 2025

Copy link

Choose a reason for hiding this comment

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

The github.event.head_commit.timestamp will be null in the context of an issue_comment event since it's not a push event. Consider using ${{ github.event.comment.created_at }} or generate the timestamp dynamically with $(date -u +%Y-%m-%dT%H:%M:%SZ).

Suggested change
BUILD_DATE=${{ github.event.head_commit.timestamp }}
BUILD_DATE=${{ github.event.comment.created_at }}

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/pr-comment-publish.yml
Comment on lines +71 to +77
- name: Checkout PR code
uses: actions/checkout@v4
with:
ref: ${{ needs.check-comment.outputs.pr-sha }}
fetch-depth: 0

- name: Set up Docker Buildx

Check failure

Code scanning / CodeQL

Checkout of untrusted code in trusted context High

Potential execution of untrusted code on a privileged workflow (
issue_comment
)
@javuto
javuto force-pushed the pr-publish-docker-image branch from 0cf1c97 to 9a8cbc5 Compare September 2, 2025 18:25
@javuto

javuto commented Sep 2, 2025

Copy link
Copy Markdown
Collaborator Author

Will get back to this in the future

@javuto javuto closed this Sep 2, 2025
@javuto
javuto deleted the pr-publish-docker-image branch September 2, 2025 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📦 build Building related issues cicd CICD related issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants