Support/arm arch for pdf converter publish #20
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: Release Docker Image for @growi/pdf-converter | |
on: | |
pull_request: | |
branches: | |
- release/pdf-converter/** | |
types: [opened, synchronize] | |
jobs: | |
build-and-push-image: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Retrieve information from package.json | |
uses: myrotvorets/[email protected] | |
id: package-json | |
with: | |
workingDir: apps/pdf-converter | |
- name: Docker meta | |
id: meta | |
uses: docker/metadata-action@v4 | |
with: | |
images: growilabs/pdf-converter | |
tags: | | |
type=raw,value=latest | |
type=raw,value=${{ steps.package-json.outputs.packageVersion }} | |
- name: Debug Dockerfile | |
run: cat ./apps/pdf-converter/docker/Dockerfile | |
- name: Login to docker.io registry | |
run: | | |
echo ${{ secrets.DOCKER_REGISTRY_PASSWORD_GROWIMOOGLE }} | docker login --username growimoogle --password-stdin | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build and push | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./apps/pdf-converter/docker/Dockerfile | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
builder: ${{ steps.buildx.outputs.name }} | |
# cache-from: type=gha | |
# cache-to: type=gha,mode=max | |
tags: ${{ steps.meta.outputs.tags }} | |
no-cache: true | |
# - name: Add tag | |
# uses: anothrNick/github-tag-action@v1 | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# CUSTOM_TAG: pdf-converter/v${{ steps.package-json.outputs.packageVersion }} | |
# VERBOSE : true | |
# - name: Update Docker Hub Description | |
# uses: peter-evans/dockerhub-description@v3 | |
# with: | |
# username: growimoogle | |
# password: ${{ secrets.DOCKER_REGISTRY_PASSWORD_GROWIMOOGLE }} | |
# repository: growilabs/pdf-converter | |
# readme-filepath: ./apps/pdf-converter/docker/README.md | |
# create-pr-for-next-rc: | |
# needs: build-and-push-image | |
# runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# node-version: [20.x] | |
# steps: | |
# - uses: actions/checkout@v4 | |
# with: | |
# ref: ${{ github.event.pull_request.base.ref }} | |
# - uses: pnpm/action-setup@v4 | |
# - uses: actions/setup-node@v4 | |
# with: | |
# node-version: ${{ matrix.node-version }} | |
# cache: 'pnpm' | |
# - name: Install dependencies | |
# run: | | |
# pnpm add turbo --global | |
# pnpm install --frozen-lockfile | |
# - name: Bump versions for next RC | |
# run: | | |
# turbo run version:prerelease --filter=@growi/pdf-converter | |
# - name: Retrieve information from package.json | |
# uses: myrotvorets/[email protected] | |
# id: package-json | |
# with: | |
# workingDir: apps/pdf-converter | |
# - name: Commit | |
# uses: github-actions-x/[email protected] | |
# with: | |
# github-token: ${{ secrets.GITHUB_TOKEN }} | |
# push-branch: support/prepare-v${{ steps.package-json.outputs.packageVersion }} | |
# commit-message: 'Bump version' | |
# name: GitHub Action | |
# - name: Create PR | |
# uses: repo-sync/pull-request@v2 | |
# with: | |
# source_branch: support/prepare-v${{ steps.package-json.outputs.packageVersion }} | |
# destination_branch: master | |
# pr_title: Prepare pdf-converter v${{ steps.package-json.outputs.packageVersion }} | |
# pr_label: flag/exclude-from-changelog,type/prepare-next-version | |
# pr_body: "An automated PR generated by ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | |
# github_token: ${{ secrets.GITHUB_TOKEN }} |