mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
58 lines
1.5 KiB
YAML
58 lines
1.5 KiB
YAML
name: "Hocuspocus / Dockerize"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- dev
|
|
- release/*
|
|
paths:
|
|
- 'extensions/op-blocknote-hocuspocus/**'
|
|
workflow_call:
|
|
inputs:
|
|
tags:
|
|
description: "Newline-separated full Docker image tags (e.g., openproject/hocuspocus:17.1.0)"
|
|
required: true
|
|
type: string
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: ./extensions/op-blocknote-hocuspocus
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Include Git SHA in package.json version
|
|
run: |
|
|
SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`
|
|
|
|
# also include Git SHA in version string
|
|
sed -ri "s/\"version\": \"(.*)\"/\"version\": \"\1-$SHORT_SHA\"/g" package.json
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKER_USERNAME }}
|
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ./extensions/op-blocknote-hocuspocus
|
|
push: true
|
|
platforms: linux/amd64,linux/arm64/v8
|
|
tags: ${{ inputs.tags }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|
|
|
|
- name: Summarize build
|
|
run: |
|
|
echo "Built and pushed the following tags:" > $GITHUB_STEP_SUMMARY
|
|
echo "${{ inputs.tags }}" > $GITHUB_STEP_SUMMARY
|