Compare commits
25
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bd42c08538 | ||
|
|
651ee66baf | ||
|
|
6e06010f92 | ||
|
|
db05596242 | ||
|
|
c8513e43b4 | ||
|
|
64b0bc4300 | ||
|
|
f17c9fc3a5 | ||
|
|
729928ce6c | ||
|
|
cccdec850b | ||
|
|
21aa823e8e | ||
|
|
fa7f8487f7 | ||
|
|
c2241e16f2 | ||
|
|
9ee22c35f9 | ||
|
|
447bdceb7d | ||
|
|
1569f2585d | ||
|
|
97b78d87af | ||
|
|
542127eafe | ||
|
|
7b776f65ce | ||
|
|
d7545ce55a | ||
|
|
98c608db5b | ||
|
|
bffc3701c8 | ||
|
|
07fba450b3 | ||
|
|
1f6de535cc | ||
|
|
59a7b3783d | ||
|
|
6f9cd23fc5 |
@@ -1,61 +0,0 @@
|
||||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ["v*"]
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
IMAGE: registry.traberph.de/public/homepage
|
||||
# Baked in at build time (canonical URLs); override with a repository variable.
|
||||
SITE_URL: ${{ vars.SITE_URL || 'https://traberph.de' }}
|
||||
# Default Harbor instance baked into the image as an env var (overridable at runtime).
|
||||
HARBOR_URL: ${{ vars.HARBOR_URL || 'https://registry.traberph.de' }}
|
||||
|
||||
jobs:
|
||||
image:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
# Tag scheme for Flux image automation: <UTC yyyymmddHHMMSS>-<short sha>,
|
||||
# e.g. 20260926154233-1a2b3c4. Timestamps sort numerically, see README.
|
||||
- name: Compute tags
|
||||
id: tags
|
||||
run: |
|
||||
ts="$(date -u +%Y%m%d%H%M%S)"
|
||||
sha="$(git rev-parse --short=7 HEAD)"
|
||||
tags="${IMAGE}:${ts}-${sha}"
|
||||
if [ "${GITHUB_REF_TYPE}" = "tag" ]; then
|
||||
tags="${tags},${IMAGE}:${GITHUB_REF_NAME}"
|
||||
else
|
||||
tags="${tags},${IMAGE}:latest"
|
||||
fi
|
||||
echo "tags=${tags}" >> "$GITHUB_OUTPUT"
|
||||
echo "created=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> "$GITHUB_OUTPUT"
|
||||
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
||||
echo "Tags: ${tags}"
|
||||
|
||||
- uses: docker/setup-qemu-action@v4
|
||||
- uses: docker/setup-buildx-action@v4
|
||||
|
||||
- uses: docker/login-action@v4
|
||||
with:
|
||||
registry: registry.traberph.de
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_TOKEN }}
|
||||
|
||||
- uses: docker/build-push-action@v7
|
||||
with:
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.tags.outputs.tags }}
|
||||
build-args: |
|
||||
SITE_URL=${{ env.SITE_URL }}
|
||||
HARBOR_URL=${{ env.HARBOR_URL }}
|
||||
labels: |
|
||||
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
|
||||
org.opencontainers.image.revision=${{ steps.tags.outputs.sha }}
|
||||
org.opencontainers.image.created=${{ steps.tags.outputs.created }}
|
||||
@@ -0,0 +1,23 @@
|
||||
name: build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ["v*"]
|
||||
paths-ignore: ["**.md"]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
# Tags and build steps are shared across repos, see traberph/ci.
|
||||
image:
|
||||
uses: traberph/ci/.gitea/workflows/image.yaml@v1.0.3
|
||||
with:
|
||||
project: public
|
||||
image: homepage
|
||||
# SITE_URL is compiled in (canonical URLs); HARBOR_URL is the default Harbor
|
||||
build-args: |
|
||||
SITE_URL=${{ vars.SITE_URL || 'https://traberph.de' }}
|
||||
HARBOR_URL=${{ vars.HARBOR_URL || 'https://registry.traberph.de' }}
|
||||
secrets:
|
||||
registry-username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
registry-token: ${{ secrets.REGISTRY_TOKEN }}
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
# syntax=docker/dockerfile:1.28
|
||||
|
||||
# The build output is platform-independent, so build natively (no QEMU) for multi-arch images.
|
||||
FROM --platform=$BUILDPLATFORM node:24-alpine AS build
|
||||
FROM --platform=$BUILDPLATFORM node:26-alpine AS build
|
||||
WORKDIR /app
|
||||
RUN corepack enable
|
||||
ENV ASTRO_TELEMETRY_DISABLED=1
|
||||
@@ -13,7 +13,7 @@ COPY . .
|
||||
ARG SITE_URL
|
||||
RUN pnpm build
|
||||
|
||||
FROM node:24-alpine
|
||||
FROM node:26-alpine
|
||||
WORKDIR /app
|
||||
ENV NODE_ENV=production HOST=0.0.0.0 PORT=8080
|
||||
# Default Harbor instance; still overridable with `-e HARBOR_URL=...` at runtime.
|
||||
|
||||
+1
-1
@@ -28,5 +28,5 @@
|
||||
"typescript": "^6.0.3"
|
||||
},
|
||||
"private": true,
|
||||
"packageManager": "pnpm@11.28.5"
|
||||
"packageManager": "pnpm@12.14.0"
|
||||
}
|
||||
|
||||
Generated
+412
-274
File diff suppressed because it is too large
Load Diff
@@ -23,6 +23,12 @@
|
||||
"matchPackageNames": ["astro", "@astrojs/**"],
|
||||
"matchUpdateTypes": ["minor", "patch"],
|
||||
"groupName": "astro"
|
||||
},
|
||||
{
|
||||
"description": "The shared image workflow lives on this Gitea, not on github.com",
|
||||
"matchDepNames": ["traberph/ci"],
|
||||
"overrideDatasource": "gitea-tags",
|
||||
"registryUrls": ["https://git.traberph.de"]
|
||||
}
|
||||
],
|
||||
"lockFileMaintenance": {
|
||||
|
||||
Reference in New Issue
Block a user