Skip to content

Commit

Permalink
Merge pull request #16 from systemli/Fix-Release-Workflow
Browse files Browse the repository at this point in the history
👷 Fix Release Workflow
  • Loading branch information
0x46616c6b authored Oct 3, 2024
2 parents bdaad79 + f624ee6 commit 5a61eea
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 6 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ jobs:
with:
go-version-file: "go.mod"

- name: Build
run: go build

- name: Docker Build
run: docker build .
- name: Build Releases
uses: goreleaser/goreleaser-action@v6.0.0
with:
version: "~> v2"
args: release --clean --snapshot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.env
dist
3 changes: 2 additions & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ builds:
dockers:
- goos: linux
goarch: amd64
dockerfile: Dockerfile.release
image_templates:
- "systemli/userli-postfix-adapter:{{ .Tag }}"
- "systemli/userli-postfix-adapter:{{ .Major }}"
Expand All @@ -26,6 +27,6 @@ dockers:
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ .Tag }}-next"
version_template: "{{ .Tag }}-next"
changelog:
disable: true
25 changes: 25 additions & 0 deletions Dockerfile.release
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
FROM alpine:3.19 AS build

ENV USER=appuser
ENV UID=10001

RUN adduser \
--disabled-password \
--gecos "" \
--home "/nonexistent" \
--shell "/sbin/nologin" \
--no-create-home \
--uid "${UID}" \
"${USER}"

FROM scratch AS runtime

COPY userli-postfix-adapter /userli-postfix-adapter

COPY --from=build /etc/passwd /etc/passwd
COPY --from=build /etc/group /etc/group
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt

USER appuser:appuser

ENTRYPOINT ["/userli-postfix-adapter"]

0 comments on commit 5a61eea

Please sign in to comment.