Skip to content

Add manual workflow_dispatch for branch Docker image builds#808

Merged
jonstacks merged 2 commits intomainfrom
copilot/add-manual-docker-image-workflow
May 6, 2026
Merged

Add manual workflow_dispatch for branch Docker image builds#808
jonstacks merged 2 commits intomainfrom
copilot/add-manual-docker-image-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 6, 2026

  • Explored existing docker.yaml workflow to understand build process
  • Created .github/workflows/docker-branch.yaml for manual workflow_dispatch builds
  • Reject latest and stable reserved tags
  • Validate Docker tag constraints (charset, length 1-128, no leading/trailing separators)
  • Use printf instead of echo to safely write VERSION

Agent-Logs-Url: https://github.com/ngrok/ngrok-operator/sessions/08bc71a9-f824-47b7-b2af-132f07c37903

Co-authored-by: jonstacks <6900888+jonstacks@users.noreply.github.com>
@jonstacks jonstacks marked this pull request as ready for review May 6, 2026 05:07
@jonstacks jonstacks requested a review from a team as a code owner May 6, 2026 05:07
@jonstacks jonstacks added the meta/project Issues/PRs related to maintaining the project label May 6, 2026
@jonstacks jonstacks requested a review from Copilot May 6, 2026 05:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new manually triggered GitHub Actions workflow to build and publish multi-arch Docker images from arbitrary branches using a user-supplied tag, without creating a GitHub Release or automatically tagging latest.

Changes:

  • Introduces .github/workflows/docker-branch.yaml with a workflow_dispatch input (tag) to drive branch image builds.
  • Reuses the existing Docker build tooling/actions and multi-platform configuration to push ngrok/ngrok-operator:<tag>.
  • Applies reduced workflow permissions (contents: read) and a repository guard to limit where the workflow runs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/docker-branch.yaml
Comment thread .github/workflows/docker-branch.yaml Outdated
@github-actions github-actions Bot added area/ci Issues/PRs relating to CI size/M Denotes a PR that changes 30-99 lines and removed meta/project Issues/PRs related to maintaining the project labels May 6, 2026
@jonstacks
Copy link
Copy Markdown
Collaborator

@copilot apply changes based on the comments in this thread

…raints, use printf for VERSION

Agent-Logs-Url: https://github.com/ngrok/ngrok-operator/sessions/27d12327-4486-440e-b64d-bc81b60a8c1b

Co-authored-by: jonstacks <6900888+jonstacks@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 6, 2026

@copilot apply changes based on the comments in this thread

Done in commit 711bfc5. Both review items are addressed:

  1. Reserved tagslatest and stable are now explicitly rejected before any other checks.
  2. Docker tag constraints + safe VERSION write — the validation now checks tag length (1–128), allows only [a-zA-Z0-9_.-], rejects leading ./- and trailing ./- via an anchored regex (^[a-zA-Z0-9_]([a-zA-Z0-9_.-]*[a-zA-Z0-9_])?$), and printf '%s' is used instead of echo to write VERSION safely.

Copilot AI requested a review from jonstacks May 6, 2026 14:56
@jonstacks jonstacks added this pull request to the merge queue May 6, 2026
Merged via the queue into main with commit 98c1b9d May 6, 2026
16 checks passed
@jonstacks jonstacks deleted the copilot/add-manual-docker-image-workflow branch May 6, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ci Issues/PRs relating to CI size/M Denotes a PR that changes 30-99 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants