Push website content as a docker image

This commit is contained in:
Zef Hemel
2025-09-22 09:14:50 +02:00
parent aa8ac7a0a0
commit 44a77ed5da
3 changed files with 37 additions and 4 deletions
+23
View File
@@ -10,6 +10,7 @@ env:
# Docker & Registries
ARCHITECTURES: linux/amd64,linux/arm64
IMAGE_NAME: silverbullet
WEBSITE_IMAGE_NAME: silverbullet
NAMESPACE_GITHUB: silverbulletmd
NAMESPACE_DOCKER: zefhemel
jobs:
@@ -76,3 +77,25 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: "Website: Extract metadata (tags, labels) for docker"
id: website_meta
uses: docker/metadata-action@v4.4.0
with:
images: |
${{ env.NAMESPACE_DOCKER }}/${{ env.WEBSITE_IMAGE_NAME }}
tags: |
type=edge,branch=main
- name: "Website: Build and push website docker images"
uses: docker/build-push-action@v4.0.0
with:
context: .
file: Dockerfile.website
platforms: ${{ env.ARCHITECTURES }}
push: true
provenance: false
tags: ${{ steps.website_meta.outputs.tags }}
labels: ${{ steps.website_meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
+8
View File
@@ -0,0 +1,8 @@
FROM zefhemel/silverbullet:v2
# Set some environment variables
ENV SB_INDEX_PAGE=SilverBullet
ENV SB_READ_ONLY=1
# Add the website content
ADD website /space
+6 -4
View File
@@ -1,5 +1,7 @@
# Update the repos
apt update
Uncomment the lines to actually run them.
# Install additional packages
apt install -y pandoc
## Update the repos
#apt update
## Install additional packages
#apt install -y pandoc