Add Docker image build and publish workflow#1
Conversation
Co-authored-by: xDarksome <22872975+xDarksome@users.noreply.github.com>
There was a problem hiding this comment.
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.prom2parquetfor 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}}- |
There was a problem hiding this comment.
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.
| type=sha,prefix={{branch}}- | |
| type=sha,prefix=sha- |
Adds GitHub Actions workflow to automatically build and publish Docker images to GitHub Container Registry.
Workflow Configuration
main, version tags (v*), and PRs (build-only validation)ghcr.io)v1.2.3→1.2.3,1.2,1)Implementation
CGO_ENABLED=0, stripped, trimpath)images/Dockerfile.prom2parquetGITHUB_TOKENwith scoped permissions (contents: read,packages: write)Example Usage
After merging, images will be available at:
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)/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
💡 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.