Skip to content

Commit

Permalink
Merge pull request #3 from moneyforward/v8
Browse files Browse the repository at this point in the history
Adding fonts and update github actions
  • Loading branch information
quangnhut123 authored Sep 27, 2024
2 parents 0abb11b + 824b93c commit a8f9f50
Show file tree
Hide file tree
Showing 26 changed files with 259 additions and 149 deletions.
7 changes: 7 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
GOLANG_VERSION=1.23
GOTENBERG_VERSION=8
GOTENBERG_USER_GID=1001
GOTENBERG_USER_UID=1001
NOTO_COLOR_EMOJI_VERSION=v2.042 # See https://github.com/googlefonts/noto-emoji/releases.
PDFTK_VERSION=v3.3.3 # See https://gitlab.com/pdftk-java/pdftk/-/releases - Binary package.
GOLANGCI_LINT_VERSION=v1.60.3
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

8 changes: 0 additions & 8 deletions .github/dependabot.yml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/stale.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/build_push_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build and Push Docker Image

on:
push:
branches:
- v8
- main

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build and push custom Docker image
uses: docker/build-push-action@v6
with:
context: .
file: build/Dockerfile.custom
platforms: linux/amd64,linux/arm64
push: true
tags: |
${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_REPOSITORY }}:v8-latest
${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_REPOSITORY }}:v8-${{ github.sha }}
build-args: |
GOLANG_VERSION=1.23
GOTENBERG_VERSION=8
GOTENBERG_USER_GID=1001
GOTENBERG_USER_UID=1001
NOTO_COLOR_EMOJI_VERSION=v2.042
PDFTK_VERSION=v3.3.3
GOLANGCI_LINT_VERSION=v1.60.3
- name: Update latest release with Docker image details
env:
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
run: |
release_body="### ${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_REPOSITORY }} image
\`\`\`shell
${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_REPOSITORY }}:v8-latest
${{ secrets.DOCKER_REGISTRY }}/${{ secrets.DOCKER_REPOSITORY }}:v8-${{ github.sha }}
\`\`\`"
gh release create v${{ github.run_number }} --notes "$release_body"
26 changes: 0 additions & 26 deletions .github/workflows/continuous_delivery.yml

This file was deleted.

95 changes: 0 additions & 95 deletions .github/workflows/continuous_integration.yml

This file was deleted.

13 changes: 12 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,18 @@ build: ## Build the Gotenberg's Docker image
-t $(DOCKER_REGISTRY)/$(DOCKER_REPOSITORY):$(GOTENBERG_VERSION) \
-f build/Dockerfile .

.PHONY: build-custom
build-custom: ## Build the custom Gotenberg's Docker image
docker build \
--build-arg GOLANG_VERSION=$(GOLANG_VERSION) \
--build-arg GOTENBERG_VERSION=$(GOTENBERG_VERSION) \
--build-arg GOTENBERG_USER_GID=$(GOTENBERG_USER_GID) \
--build-arg GOTENBERG_USER_UID=$(GOTENBERG_USER_UID) \
--build-arg NOTO_COLOR_EMOJI_VERSION=$(NOTO_COLOR_EMOJI_VERSION) \
--build-arg PDFTK_VERSION=$(PDFTK_VERSION) \
-t $(DOCKER_REGISTRY)/$(DOCKER_REPOSITORY):$(GOTENBERG_VERSION) \
-f build/Dockerfile.custom .

GOTENBERG_GRACEFUL_SHUTDOWN_DURATION=30s
API_PORT=3000
API_PORT_FROM_ENV=
Expand Down Expand Up @@ -198,4 +210,3 @@ release: ## Build the Gotenberg's Docker image and push it to a Docker repositor
$(DOCKER_REGISTRY) \
$(DOCKER_REPOSITORY) \
$(LINUX_AMD64_RELEASE)

Loading

0 comments on commit a8f9f50

Please sign in to comment.