mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-17 10:26:21 +00:00
Compare commits
3
Commits
3f5f23a4e8
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b820f050bc | ||
|
|
cf27de9eb4 | ||
|
|
3f02916e8f |
No files matched your search
@@ -1,64 +0,0 @@
|
|||||||
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` }>
|
<div className={ `w-full` }>
|
||||||
<Card
|
<Card
|
||||||
as={ Link } href={ `/blog/post/${ post.identifier }` }
|
as={ Link } href={ `/blog/post/${ post.identifier }` }
|
||||||
className={ `group w-full dark:bg-[#353540]` }
|
className={ `group w-full` }
|
||||||
isPressable
|
isPressable
|
||||||
isHoverable
|
isHoverable
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -3,7 +3,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Chip } from '@nextui-org/react';
|
import { Chip } from '@nextui-org/react';
|
||||||
import { useRouter, useSearchParams } from 'next/navigation';
|
import { useRouter, useSearchParams } from 'next/navigation';
|
||||||
import { cn } from '@/src/utils';
|
|
||||||
|
|
||||||
interface TagChipProps {
|
interface TagChipProps {
|
||||||
tagName: string,
|
tagName: string,
|
||||||
@@ -38,10 +37,7 @@ const TagChip = ({ tagName, isHighlighted }: TagChipProps) => {
|
|||||||
className="cursor-pointer relative"
|
className="cursor-pointer relative"
|
||||||
>
|
>
|
||||||
<Chip
|
<Chip
|
||||||
className={ cn(
|
className={ 'hover:border-amber-400 hover:dark:border-amber-700 transition-all' }
|
||||||
'hover:border-amber-400 hover:dark:border-amber-700 transition-all ',
|
|
||||||
!isHighlighted && 'dark:border-amber-50/25'
|
|
||||||
) }
|
|
||||||
variant={ 'bordered' }
|
variant={ 'bordered' }
|
||||||
color={ isHighlighted ? 'warning' : 'default' }
|
color={ isHighlighted ? 'warning' : 'default' }
|
||||||
>{ tagName }</Chip>
|
>{ tagName }</Chip>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ const ButtonGoBack = () => {
|
|||||||
<Button
|
<Button
|
||||||
startContent={ <IoArrowBackOutline /> }
|
startContent={ <IoArrowBackOutline /> }
|
||||||
variant={ 'light' }
|
variant={ 'light' }
|
||||||
onPress={ () => router.back() }
|
onClick={ () => router.back() }
|
||||||
>
|
>
|
||||||
{ 'Back' }
|
{ 'Back' }
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const Footer = (props: Props) => {
|
|||||||
return (
|
return (
|
||||||
<div className={ `w-full` }>
|
<div className={ `w-full` }>
|
||||||
|
|
||||||
<div className={ 'flex transition bg-zinc-300/80 dark:bg-[#1c1c22]/50' }>
|
<div className={ 'flex transition bg-zinc-300/80 dark:bg-gray-600/25' }>
|
||||||
<div className={ `p-8 w-full overflow-hidden` }>
|
<div className={ `p-8 w-full overflow-hidden` }>
|
||||||
<div className={ 'relative' }>
|
<div className={ 'relative' }>
|
||||||
<FaCreativeCommons
|
<FaCreativeCommons
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ const MinifyPostCard = (props: Props) => {
|
|||||||
const { post, desc } = props;
|
const { post, desc } = props;
|
||||||
const img_url = post['header_img'] as string;
|
const img_url = post['header_img'] as string;
|
||||||
return (
|
return (
|
||||||
<div className={ 'w-full transition hover:brightness-90' }>
|
<div className={ 'w-full transition hover:brightness-75' }>
|
||||||
<Card isFooterBlurred
|
<Card isFooterBlurred
|
||||||
className="w-full h-[300px] shadow-none border-0 rounded-none overflow-hidden dark:bg-[#353540]"
|
className="w-full h-[300px] shadow-none border-0 rounded-none overflow-hidden"
|
||||||
as={ Link }
|
as={ Link }
|
||||||
isPressable
|
isPressable
|
||||||
href={ `/blog/post/${ post['identifier'] }` }
|
href={ `/blog/post/${ post['identifier'] }` }
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ async function PostCard(props: Props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Card className={ `max-w-full relative dark:bg-[#34343e]` }>
|
<Card className={ `max-w-full relative` }>
|
||||||
|
|
||||||
{/* card headers */ }
|
{/* card headers */ }
|
||||||
<Headers title={ post.title }
|
<Headers title={ post.title }
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ const TagChip = ({ tag }: { tag: string }) => {
|
|||||||
return (
|
return (
|
||||||
<div onClick={ () => router.push(`/blog?tags=${ tag }`) }>
|
<div onClick={ () => router.push(`/blog?tags=${ tag }`) }>
|
||||||
<Chip
|
<Chip
|
||||||
className={ 'hover:border-amber-400 hover:dark:border-amber-700 transition-all dark:bg-[#353540] dark:border-amber-50/25' }
|
className={ 'hover:border-amber-400 hover:dark:border-amber-700 transition-all' }
|
||||||
variant={ 'faded' }
|
variant={ 'faded' }
|
||||||
>{ tag }</Chip>
|
>{ tag }</Chip>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+2
-3
@@ -7,7 +7,7 @@ services:
|
|||||||
dockerfile: ../container/release/frontend.containerfile
|
dockerfile: ../container/release/frontend.containerfile
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "0.0.0.0:3000:3000"
|
- "3000:3000"
|
||||||
env_file:
|
env_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
|
|
||||||
@@ -22,7 +22,7 @@ services:
|
|||||||
ARCH: ${ARCH}
|
ARCH: ${ARCH}
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "0.0.0.0:3001:3001"
|
- "3001:3001"
|
||||||
env_file:
|
env_file:
|
||||||
- ./.env
|
- ./.env
|
||||||
- ./.env.local
|
- ./.env.local
|
||||||
@@ -57,4 +57,3 @@ services:
|
|||||||
timeout: 3s
|
timeout: 3s
|
||||||
retries: 10
|
retries: 10
|
||||||
start_period: 5s
|
start_period: 5s
|
||||||
restart: always
|
|
||||||
Reference in new issue
Block a user