Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ jobs:
with:
go-version-file: go.mod

- uses: docker/setup-qemu-action@v3

- uses: docker/setup-buildx-action@v3

- uses: docker/login-action@v4
with:
registry: ghcr.io
Expand Down
13 changes: 9 additions & 4 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ changelog:
- "^docs:"
- "^test:"

dockers:
- image_templates:
- "ghcr.io/laenzlinger/setlist:latest"
- "ghcr.io/laenzlinger/setlist:{{ .Tag }}"
dockers_v2:
- images:
- "ghcr.io/laenzlinger/setlist"
tags:
- "{{ .Tag }}"
- "latest"
platforms:
- linux/amd64
- linux/arm64
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
FROM docker.io/chromedp/headless-shell:latest

ARG TARGETPLATFORM

RUN apt-get update \
&& apt-get install -y libreoffice-writer \
&& rm -rf /var/lib/apt/lists/*
Expand All @@ -14,6 +16,6 @@ RUN mkdir /repertoire

WORKDIR /repertoire

COPY setlist /setlist
COPY ${TARGETPLATFORM}/setlist /setlist

ENTRYPOINT [ "/setlist" ]
10 changes: 8 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,14 @@ clean: ## clean all output files
rm -rf dist
go clean -testcache

docker-build: build ## build the ocker container
docker build -t $(DOCKER_IMAGE):latest .
docker-build: build ## build the docker image (native arch)
@mkdir -p linux/$(shell go env GOARCH)
@cp setlist linux/$(shell go env GOARCH)/setlist
docker build --build-arg TARGETPLATFORM=linux/$(shell go env GOARCH) -t $(DOCKER_IMAGE):latest .
@rm -rf linux

docker-build-multiarch: ## build multi-arch docker image via goreleaser snapshot
goreleaser release --snapshot --clean

help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'