feat: add nfpm/2.41.1
Build / build (pull_request) Successful in 2m11s

- add the nfpm package by compiling the project from source
This commit is contained in:
2024-12-01 22:34:17 +11:00
parent d2c15dea58
commit 6c0bbe0180
3 changed files with 61 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
# Start with the AlmaLinux 8.10 base image
FROM git.query.consul/unkin/almalinux8-buildagent:latest
# Create output directory for RPMs
RUN mkdir -p /app/dist
# Set working directory
WORKDIR /app
ARG PACKAGE_RELEASE
ENV PACKAGE_RELEASE=${PACKAGE_RELEASE}
ARG PACKAGE_VERSION
ENV PACKAGE_VERSION=${PACKAGE_VERSION}
# Copy nfpm.yaml from the context into the container
COPY nfpm.yaml /app/nfpm.yaml
# Compile the binaries
RUN GOBIN=/app go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v${PACKAGE_VERSION}
# Default command to build RPMs
CMD nfpm pkg --config /app/nfpm.yaml --target /app/dist --packager rpm