mirror of
https://github.com/ivuorinen/gh-action-readme.git
synced 2026-01-26 03:04:10 +00:00
Templates are embedded in the binary via go:embed directive and don't need to be copied as external files. Removing COPY and ENV directives for templates from Dockerfile and template file patterns from GoReleaser. Changes: - Remove COPY templates from Dockerfile (was failing: directory doesn't exist) - Remove ENV GH_ACTION_README_TEMPLATE_PATH (never used in code) - Remove template file patterns from GoReleaser archives - Remove templates from GoReleaser extra_files - Keep schemas (still used in config) Fixes: - Docker image builds now succeed - No 'no files matched' warnings from GoReleaser - Release workflow can complete successfully - Binary uses embedded templates at runtime
32 lines
1.2 KiB
Docker
32 lines
1.2 KiB
Docker
# Dockerfile for gh-action-readme
|
|
FROM scratch
|
|
|
|
# Multi-platform build support
|
|
# See: https://goreleaser.com/customization/dockers_v2/
|
|
# GoReleaser organizes binaries in platform subdirectories (linux/amd64/, linux/arm64/)
|
|
# TARGETPLATFORM arg resolves to the correct platform directory
|
|
ARG TARGETPLATFORM
|
|
|
|
# Copy the binary from the build context (platform-specific)
|
|
COPY $TARGETPLATFORM/gh-action-readme /usr/local/bin/gh-action-readme
|
|
|
|
# Copy schemas (templates are embedded in the binary via go:embed)
|
|
COPY schemas /usr/local/share/gh-action-readme/schemas
|
|
|
|
# Set environment variable for schema path
|
|
ENV GH_ACTION_README_SCHEMA_PATH=/usr/local/share/gh-action-readme/schemas
|
|
|
|
# Set the binary as entrypoint
|
|
ENTRYPOINT ["/usr/local/bin/gh-action-readme"]
|
|
|
|
# Default command
|
|
CMD ["--help"]
|
|
|
|
# Labels for metadata
|
|
LABEL org.opencontainers.image.title="gh-action-readme"
|
|
LABEL org.opencontainers.image.description="Auto-generate beautiful README and HTML documentation for GitHub Actions"
|
|
LABEL org.opencontainers.image.url="https://github.com/ivuorinen/gh-action-readme"
|
|
LABEL org.opencontainers.image.source="https://github.com/ivuorinen/gh-action-readme"
|
|
LABEL org.opencontainers.image.vendor="ivuorinen"
|
|
LABEL org.opencontainers.image.licenses="MIT"
|