Merge pull request #131 from refactor-group/add_tiptap_doc_loading_in… #102
This file contains hidden or 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 Non-Production Images | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
types: [opened, synchronize, reopened] | |
workflow_dispatch: | |
env: | |
REGISTRY: ghcr.io | |
ORG_NAME: refactor-group | |
REPO_NAME: refactor-platform-fe | |
jobs: | |
build_and_push_amd64: | |
runs-on: ubuntu-24.04 | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Docker login | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set Image Tag | |
id: vars | |
run: | | |
BRANCH_NAME=${GITHUB_HEAD_REF:-${GITHUB_REF##*/}} | |
IMAGE_BASE="${{ env.REGISTRY }}/${{ env.ORG_NAME }}/${{ env.REPO_NAME }}/${BRANCH_NAME}" | |
echo "tag=${IMAGE_BASE}:amd64" >> $GITHUB_OUTPUT | |
- name: Build + Push AMD64 | |
id: build | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile | |
target: runner | |
platforms: linux/amd64 | |
push: true | |
provenance: true | |
sbom: true | |
build-args: | | |
NEXT_PUBLIC_BACKEND_SERVICE_PROTOCOL=${{ vars.BACKEND_SERVICE_PROTOCOL }} | |
NEXT_PUBLIC_BACKEND_SERVICE_HOST=${{ vars.BACKEND_SERVICE_HOST }} | |
NEXT_PUBLIC_BACKEND_SERVICE_PORT=${{ vars.BACKEND_SERVICE_PORT }} | |
NEXT_PUBLIC_BACKEND_SERVICE_API_PATH=${{ vars.BACKEND_SERVICE_API_PATH }} | |
NEXT_PUBLIC_BACKEND_API_VERSION=${{ vars.BACKEND_API_VERSION }} | |
NEXT_PUBLIC_TIPTAP_APP_ID=${{ vars.TIPTAP_APP_ID }} | |
FRONTEND_SERVICE_PORT=${{ vars.FRONTEND_SERVICE_PORT }} | |
FRONTEND_SERVICE_INTERFACE=${{ vars.FRONTEND_SERVICE_INTERFACE }} | |
tags: ${{ steps.vars.outputs.tag }} | |
cache-from: type=gha,scope=amd64 | |
cache-to: type=gha,mode=max,scope=amd64 | |
build_and_push_arm64: | |
runs-on: ubuntu-24.04 | |
permissions: | |
contents: read | |
packages: write | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: docker/setup-buildx-action@v3 | |
with: | |
install: true | |
- name: Docker login | |
uses: docker/login-action@v2 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set Image Tag | |
id: vars | |
run: | | |
BRANCH_NAME=${GITHUB_HEAD_REF:-${GITHUB_REF##*/}} | |
IMAGE_BASE="${{ env.REGISTRY }}/${{ env.ORG_NAME }}/${{ env.REPO_NAME }}/${BRANCH_NAME}" | |
echo "tag=${IMAGE_BASE}:arm64" >> $GITHUB_OUTPUT | |
- name: Build + Push ARM64 | |
id: build | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
file: ./Dockerfile | |
target: runner | |
platforms: linux/arm64 | |
push: true | |
provenance: true | |
sbom: true | |
build-args: | | |
NEXT_PUBLIC_BACKEND_SERVICE_PROTOCOL=${{ vars.BACKEND_SERVICE_PROTOCOL }} | |
NEXT_PUBLIC_BACKEND_SERVICE_HOST=${{ vars.BACKEND_SERVICE_HOST }} | |
NEXT_PUBLIC_BACKEND_SERVICE_PORT=${{ vars.BACKEND_SERVICE_PORT }} | |
NEXT_PUBLIC_BACKEND_SERVICE_API_PATH=${{ vars.BACKEND_SERVICE_API_PATH }} | |
NEXT_PUBLIC_BACKEND_API_VERSION=${{ vars.BACKEND_API_VERSION }} | |
NEXT_PUBLIC_TIPTAP_APP_ID=${{ vars.TIPTAP_APP_ID }} | |
FRONTEND_SERVICE_PORT=${{ vars.FRONTEND_SERVICE_PORT }} | |
FRONTEND_SERVICE_INTERFACE=${{ vars.FRONTEND_SERVICE_INTERFACE }} | |
tags: ${{ steps.vars.outputs.tag }} | |
cache-from: type=gha,scope=arm64 | |
cache-to: type=gha,mode=max,scope=arm64 |