WIP: GHA to publish to DockerHub with PR comments - #687
Conversation
There was a problem hiding this comment.
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 }} |
There was a problem hiding this comment.
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).
| BUILD_DATE=${{ github.event.head_commit.timestamp }} | |
| BUILD_DATE=${{ github.event.comment.created_at }} |
| - 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
0cf1c97 to
9a8cbc5
Compare
|
Will get back to this in the future |
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.