Skip to content

Add Docker image build and publish workflow#1

Merged
xDarksome merged 2 commits into
masterfrom
copilot/add-docker-build-workflow
Jan 6, 2026
Merged

Add Docker image build and publish workflow#1
xDarksome merged 2 commits into
masterfrom
copilot/add-docker-build-workflow

Conversation

Copilot AI commented Jan 6, 2026

Copy link
Copy Markdown

Adds GitHub Actions workflow to automatically build and publish Docker images to GitHub Container Registry.

Workflow Configuration

  • Triggers: pushes to main, version tags (v*), and PRs (build-only validation)
  • Registry: GitHub Container Registry (ghcr.io)
  • Tagging strategy:
    • Branch names for main builds
    • Semver patterns for release tags (v1.2.31.2.3, 1.2, 1)
    • Commit SHA with branch prefix for traceability

Implementation

  • Builds static Go binary matching Makefile configuration (CGO_ENABLED=0, stripped, trimpath)
  • Uses existing images/Dockerfile.prom2parquet
  • Authenticates via GITHUB_TOKEN with scoped permissions (contents: read, packages: write)
  • Conditional push: builds on PRs but only publishes on main/tags

Example Usage

After merging, images will be available at:

ghcr.io/walletconnect/prom2parquet:main          # latest main build
ghcr.io/walletconnect/prom2parquet:v1.2.3        # release version
ghcr.io/walletconnect/prom2parquet:main-abc1234  # specific commit

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • github.com (HTTP Only)
    • Triggering command: /usr/bin/ssh /usr/bin/ssh -o SendEnv=GIT_PROTOCOL git@github.com git-upload-pack 'acrlabs/build-scripts' (packet block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

make a workflow that builds and publishes the docker image


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: xDarksome <22872975+xDarksome@users.noreply.github.com>
Copilot AI changed the title [WIP] Add workflow to build and publish Docker image Add Docker image build and publish workflow Jan 6, 2026
Copilot AI requested a review from xDarksome January 6, 2026 12:19
@xDarksome xDarksome marked this pull request as ready for review January 6, 2026 14:04
Copilot AI review requested due to automatic review settings January 6, 2026 14:04
@xDarksome xDarksome merged commit 225cf20 into master Jan 6, 2026
9 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

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 adds a GitHub Actions workflow to automatically build and publish Docker images to GitHub Container Registry (ghcr.io). The workflow is triggered on pushes to main, version tags, and pull requests (build-only for PRs).

  • Builds a static Go binary matching the project's Makefile configuration
  • Uses the existing images/Dockerfile.prom2parquet for containerization
  • Implements a multi-tag strategy including branch names, semver patterns, and commit SHAs

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

type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=sha,prefix={{branch}}-

Copilot AI Jan 6, 2026

Copy link

Choose a reason for hiding this comment

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

The {{branch}} pattern variable is not valid in the docker/metadata-action. This will result in tags with literal {{branch}}- prefixes instead of the actual branch name. The metadata-action does not support dynamic prefix values in this way. Consider either using a static prefix like type=sha,prefix=sha- or removing the branch prefix entirely since the SHA itself provides unique identification.

Suggested change
type=sha,prefix={{branch}}-
type=sha,prefix=sha-

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants