Merge pull request #3 from moneyforward/v8 #7
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |