Adding Docker image for Simple mode
This commit is contained in:
24
.github/workflows/build-and-publish.yml
vendored
24
.github/workflows/build-and-publish.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: build docker image and push to dockerhub
|
name: Build and Push Docker Images (Default + Simple Mode)
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -6,6 +6,7 @@ on:
|
|||||||
- 'main'
|
- 'main'
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- 'v*'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docker-build-and-push:
|
docker-build-and-push:
|
||||||
@@ -13,6 +14,15 @@ jobs:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
packages: write
|
packages: write
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
mode:
|
||||||
|
- name: default
|
||||||
|
simple_mode: false
|
||||||
|
suffix: ""
|
||||||
|
- name: simple
|
||||||
|
simple_mode: true
|
||||||
|
suffix: "-simple"
|
||||||
steps:
|
steps:
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
@@ -35,12 +45,16 @@ jobs:
|
|||||||
echo "version_without_v=latest" >> $GITHUB_OUTPUT
|
echo "version_without_v=latest" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Build and push
|
- name: Build and push ${{ matrix.mode.name }} image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
push: true
|
push: true
|
||||||
|
build-args: |
|
||||||
|
SIMPLE_MODE=${{ matrix.mode.simple_mode }}
|
||||||
tags: |
|
tags: |
|
||||||
bentopdf/bentopdf:latest
|
altruisticisopod/bentopdf${{ matrix.mode.suffix }}:latest
|
||||||
bentopdf/bentopdf:${{ steps.version.outputs.version_without_v }}
|
altruisticisopod/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version_without_v }}
|
||||||
bentopdf/bentopdf:${{ steps.version.outputs.version }}
|
altruisticisopod/bentopdf${{ matrix.mode.suffix }}:${{ steps.version.outputs.version }}
|
||||||
platforms: linux/amd64,linux/arm64
|
platforms: linux/amd64,linux/arm64
|
||||||
|
cache-from: type=gha
|
||||||
|
cache-to: type=gha,mode=max
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
services:
|
services:
|
||||||
bentopdf:
|
bentopdf:
|
||||||
|
# default mode
|
||||||
|
# simple mode - bentopdf-simple:latest
|
||||||
image: bentopdf/bentopdf:latest
|
image: bentopdf/bentopdf:latest
|
||||||
container_name: bentopdf
|
container_name: bentopdf
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- '3000:80'
|
- '3000:80'
|
||||||
environment:
|
|
||||||
- SIMPLE_MODE=${SIMPLE_MODE:-false}
|
|
||||||
Reference in New Issue
Block a user