Another approach

This commit is contained in:
Zef Hemel
2025-09-03 08:45:22 +02:00
parent 8d591ef224
commit 63c7c55f94
6 changed files with 12 additions and 7 deletions
+4
View File
@@ -46,6 +46,10 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Write commit hash to file
run: |
echo $GITHUB_SHA > GITHUB_SHA
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4.4.0
+1
View File
@@ -16,6 +16,7 @@ jobs:
deno-version: v2.4.3
- name: Compile for all platforms
run: |
echo $GITHUB_SHA > GITHUB_SHA
deno task build
deno task server:zip:linux-x86_64
deno task server:zip:linux-aarch64
+3 -1
View File
@@ -21,7 +21,9 @@ jobs:
with:
deno-version: v2.4.5
- name: Run build
run: deno task build
run: |
echo $GITHUB_SHA > GITHUB_SHA
deno task build
- name: Publish to JSR
run: deno publish --allow-dirty
- name: Release
+1
View File
@@ -23,6 +23,7 @@ jobs:
- name: Build bundles
run: |
echo $GITHUB_SHA > GITHUB_SHA
deno task build
- name: Compile for all platforms
+1 -4
View File
@@ -5,11 +5,8 @@ RUN apt update && apt install -y git
WORKDIR /app
ADD . /app
# Inject the github sha if available
ARG GITHUB_SHA
# This will produce the `silverbullet` self-contained binary in /app/silverbullet
RUN GITHUB_SHA=${GITHUB_SHA} deno task build
RUN deno task build
# Stage 2: Create the runtime from the build
FROM ubuntu:noble
+2 -2
View File
@@ -11,8 +11,8 @@ export async function updateVersionFile() {
let commitVersion = new TextDecoder().decode(stdout).trim();
if (!commitVersion) {
// Probably in CI, let's pull from Github environment variables instead
commitVersion = `${version}-${Deno.env.get("GITHUB_SHA")}`;
// Probably in CI, let's pull from the GITHUB_SHA file
commitVersion = `${version}-${Deno.readTextFileSync("GITHUB_SHA")}`;
}
const versionFilePath = "./public_version.ts";