mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-17 10:26:21 +00:00
Compare commits
3
Commits
master
...
3f5f23a4e8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f5f23a4e8 | ||
|
|
7205faddbe | ||
|
|
f1d43e6799 |
No files matched your search
@@ -0,0 +1,64 @@
|
||||
name: build canary nocturne image
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
|
||||
env:
|
||||
REGISTRY: cr.lmt.moe
|
||||
TAG: canary
|
||||
PROJECT: nocturne
|
||||
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: setup builder
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: registry login
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ secrets.REGISTRY_USERNAME }}
|
||||
password: ${{ secrets.REGISTRY_PASSWORD }}
|
||||
|
||||
- name: build containers
|
||||
run: |
|
||||
make build
|
||||
|
||||
- name: tag and push
|
||||
run: |
|
||||
PROJECT_NAME=$(basename "$PWD")
|
||||
|
||||
ALL_IMAGES=$(docker compose -f prod.compose.yaml config --services 2>/dev/null)
|
||||
PULLED_IMAGES=$(docker compose -f prod.compose.yaml config 2>/dev/null \
|
||||
| awk '/image:/ {print $2}' \
|
||||
| sort -u \
|
||||
| sed 's/:.*//' \
|
||||
)
|
||||
TO_PUSH=$(comm -23 \
|
||||
<(echo "$ALL_IMAGES" | sort) \
|
||||
<(echo "$PULLED_IMAGES") \
|
||||
)
|
||||
|
||||
FMT_STRING=$(echo "$TO_PUSH" | xargs printf '%s, ' | sed 's/, $//')
|
||||
echo "services to push: $FMT_STRING"
|
||||
|
||||
for SERVICE in $TO_PUSH; do
|
||||
LOCAL_TAG="${PROJECT_NAME}-${SERVICE}:latest"
|
||||
REMOTE_TAG="${REGISTRY}/${PROJECT}/${SERVICE}:${TAG}"
|
||||
|
||||
if docker image inspect "$LOCAL_TAG" >/dev/null 2>&1; then
|
||||
echo "Pushing $REMOTE_TAG"
|
||||
docker tag "$LOCAL_TAG" "$REMOTE_TAG"
|
||||
docker push "$REMOTE_TAG"
|
||||
else
|
||||
echo "warn: image $LOCAL_TAG not found, skipping $SERVICE"
|
||||
fi
|
||||
|
||||
done
|
||||
@@ -32,7 +32,7 @@ function BlogPostCard({ post, highlightSelector }: Props) {
|
||||
<div className={ `w-full` }>
|
||||
<Card
|
||||
as={ Link } href={ `/blog/post/${ post.identifier }` }
|
||||
className={ `group w-full` }
|
||||
className={ `group w-full dark:bg-[#353540]` }
|
||||
isPressable
|
||||
isHoverable
|
||||
>
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
import React from 'react';
|
||||
import { Chip } from '@nextui-org/react';
|
||||
import { useRouter, useSearchParams } from 'next/navigation';
|
||||
import { cn } from '@/src/utils';
|
||||
|
||||
interface TagChipProps {
|
||||
tagName: string,
|
||||
@@ -37,7 +38,10 @@ const TagChip = ({ tagName, isHighlighted }: TagChipProps) => {
|
||||
className="cursor-pointer relative"
|
||||
>
|
||||
<Chip
|
||||
className={ 'hover:border-amber-400 hover:dark:border-amber-700 transition-all' }
|
||||
className={ cn(
|
||||
'hover:border-amber-400 hover:dark:border-amber-700 transition-all ',
|
||||
!isHighlighted && 'dark:border-amber-50/25'
|
||||
) }
|
||||
variant={ 'bordered' }
|
||||
color={ isHighlighted ? 'warning' : 'default' }
|
||||
>{ tagName }</Chip>
|
||||
|
||||
@@ -12,7 +12,7 @@ const ButtonGoBack = () => {
|
||||
<Button
|
||||
startContent={ <IoArrowBackOutline /> }
|
||||
variant={ 'light' }
|
||||
onClick={ () => router.back() }
|
||||
onPress={ () => router.back() }
|
||||
>
|
||||
{ 'Back' }
|
||||
</Button>
|
||||
|
||||
@@ -33,7 +33,7 @@ const Footer = (props: Props) => {
|
||||
return (
|
||||
<div className={ `w-full` }>
|
||||
|
||||
<div className={ 'flex transition bg-zinc-300/80 dark:bg-gray-600/25' }>
|
||||
<div className={ 'flex transition bg-zinc-300/80 dark:bg-[#1c1c22]/50' }>
|
||||
<div className={ `p-8 w-full overflow-hidden` }>
|
||||
<div className={ 'relative' }>
|
||||
<FaCreativeCommons
|
||||
|
||||
@@ -12,9 +12,9 @@ const MinifyPostCard = (props: Props) => {
|
||||
const { post, desc } = props;
|
||||
const img_url = post['header_img'] as string;
|
||||
return (
|
||||
<div className={ 'w-full transition hover:brightness-75' }>
|
||||
<div className={ 'w-full transition hover:brightness-90' }>
|
||||
<Card isFooterBlurred
|
||||
className="w-full h-[300px] shadow-none border-0 rounded-none overflow-hidden"
|
||||
className="w-full h-[300px] shadow-none border-0 rounded-none overflow-hidden dark:bg-[#353540]"
|
||||
as={ Link }
|
||||
isPressable
|
||||
href={ `/blog/post/${ post['identifier'] }` }
|
||||
|
||||
@@ -16,7 +16,7 @@ async function PostCard(props: Props) {
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Card className={ `max-w-full relative` }>
|
||||
<Card className={ `max-w-full relative dark:bg-[#34343e]` }>
|
||||
|
||||
{/* card headers */ }
|
||||
<Headers title={ post.title }
|
||||
|
||||
@@ -10,7 +10,7 @@ const TagChip = ({ tag }: { tag: string }) => {
|
||||
return (
|
||||
<div onClick={ () => router.push(`/blog?tags=${ tag }`) }>
|
||||
<Chip
|
||||
className={ 'hover:border-amber-400 hover:dark:border-amber-700 transition-all' }
|
||||
className={ 'hover:border-amber-400 hover:dark:border-amber-700 transition-all dark:bg-[#353540] dark:border-amber-50/25' }
|
||||
variant={ 'faded' }
|
||||
>{ tag }</Chip>
|
||||
</div>
|
||||
|
||||
+3
-2
@@ -7,7 +7,7 @@ services:
|
||||
dockerfile: ../container/release/frontend.containerfile
|
||||
restart: always
|
||||
ports:
|
||||
- "3000:3000"
|
||||
- "0.0.0.0:3000:3000"
|
||||
env_file:
|
||||
- ./.env
|
||||
|
||||
@@ -22,7 +22,7 @@ services:
|
||||
ARCH: ${ARCH}
|
||||
restart: always
|
||||
ports:
|
||||
- "3001:3001"
|
||||
- "0.0.0.0:3001:3001"
|
||||
env_file:
|
||||
- ./.env
|
||||
- ./.env.local
|
||||
@@ -57,3 +57,4 @@ services:
|
||||
timeout: 3s
|
||||
retries: 10
|
||||
start_period: 5s
|
||||
restart: always
|
||||
Reference in new issue
Block a user