Skip to content

Commit a8f9f50

Browse files
authored
Merge pull request #3 from moneyforward/v8
Adding fonts and update github actions
2 parents 0abb11b + 824b93c commit a8f9f50

26 files changed

+259
-149
lines changed

.env

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
GOLANG_VERSION=1.23
2+
GOTENBERG_VERSION=8
3+
GOTENBERG_USER_GID=1001
4+
GOTENBERG_USER_UID=1001
5+
NOTO_COLOR_EMOJI_VERSION=v2.042 # See https://github.com/googlefonts/noto-emoji/releases.
6+
PDFTK_VERSION=v3.3.3 # See https://gitlab.com/pdftk-java/pdftk/-/releases - Binary package.
7+
GOLANGCI_LINT_VERSION=v1.60.3

.github/FUNDING.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/dependabot.yml

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/stale.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- v8
7+
- main
8+
9+
jobs:
10+
build-and-push:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Set up QEMU
18+
uses: docker/setup-qemu-action@v3
19+
20+
- name: Set up Docker Buildx
21+
uses: docker/setup-buildx-action@v3
22+
23+
- name: Log in to Docker Hub
24+
uses: docker/login-action@v3
25+
with:
26+
username: ${{ secrets.DOCKER_USERNAME }}
27+
password: ${{ secrets.DOCKER_PASSWORD }}
28+
29+
- name: Build and push custom Docker image
30+
uses: docker/build-push-action@v6
31+
with:
32+
context: .
33+
file: build/Dockerfile.custom
34+
platforms: linux/amd64,linux/arm64
35+
push: true
36+
tags: |
37+
${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_REPOSITORY }}:v8-latest
38+
${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_REPOSITORY }}:v8-${{ github.sha }}
39+
build-args: |
40+
GOLANG_VERSION=1.23
41+
GOTENBERG_VERSION=8
42+
GOTENBERG_USER_GID=1001
43+
GOTENBERG_USER_UID=1001
44+
NOTO_COLOR_EMOJI_VERSION=v2.042
45+
PDFTK_VERSION=v3.3.3
46+
GOLANGCI_LINT_VERSION=v1.60.3
47+
48+
- name: Update latest release with Docker image details
49+
env:
50+
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
51+
run: |
52+
release_body="### ${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_REPOSITORY }} image
53+
\`\`\`shell
54+
${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_REPOSITORY }}:v8-latest
55+
${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_REPOSITORY }}:v8-${{ github.sha }}
56+
\`\`\`"
57+
gh release create v${{ github.run_number }} --notes "$release_body"

.github/workflows/continuous_delivery.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/continuous_integration.yml

Lines changed: 0 additions & 95 deletions
This file was deleted.

Makefile

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,18 @@ build: ## Build the Gotenberg's Docker image
2727
-t $(DOCKER_REGISTRY)/$(DOCKER_REPOSITORY):$(GOTENBERG_VERSION) \
2828
-f build/Dockerfile .
2929

30+
.PHONY: build-custom
31+
build-custom: ## Build the custom Gotenberg's Docker image
32+
docker build \
33+
--build-arg GOLANG_VERSION=$(GOLANG_VERSION) \
34+
--build-arg GOTENBERG_VERSION=$(GOTENBERG_VERSION) \
35+
--build-arg GOTENBERG_USER_GID=$(GOTENBERG_USER_GID) \
36+
--build-arg GOTENBERG_USER_UID=$(GOTENBERG_USER_UID) \
37+
--build-arg NOTO_COLOR_EMOJI_VERSION=$(NOTO_COLOR_EMOJI_VERSION) \
38+
--build-arg PDFTK_VERSION=$(PDFTK_VERSION) \
39+
-t $(DOCKER_REGISTRY)/$(DOCKER_REPOSITORY):$(GOTENBERG_VERSION) \
40+
-f build/Dockerfile.custom .
41+
3042
GOTENBERG_GRACEFUL_SHUTDOWN_DURATION=30s
3143
API_PORT=3000
3244
API_PORT_FROM_ENV=
@@ -198,4 +210,3 @@ release: ## Build the Gotenberg's Docker image and push it to a Docker repositor
198210
$(DOCKER_REGISTRY) \
199211
$(DOCKER_REPOSITORY) \
200212
$(LINUX_AMD64_RELEASE)
201-

0 commit comments

Comments
 (0)