mirror of
https://github.com/katelya77/K-Vault.git
synced 2026-05-06 22:10:57 +08:00
- 实现 HuggingFaceStorageAdapter,用于在 Hugging Face 上传和下载文件 - 增加 S3CompatAdapter,支持兼容 S3 的存储方案(包含上传、下载和删除功能) - 创建 TelegramStorageAdapter,通过 Telegram Bot API 处理文件上传与下载 - 引入通用工具函数,用于处理文件扩展名和存储类型规范化 - 开发 StorageFactory,基于配置统一管理存储适配器的创建 - 增加认证工具函数,用于会话管理和 Cookie 处理 - 实现访客上传服务,包含 IP 追踪和每日限额功能 - 建立加解密工具函数,确保存储配置的安全性 - 创建 package.json 和 package-lock.json,用于项目依赖管理和初始化配置
74 lines
1.8 KiB
YAML
74 lines
1.8 KiB
YAML
name: Docker Images
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags:
|
|
- "v*"
|
|
pull_request:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
packages: write
|
|
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- image_name: k-vault-api
|
|
context: ./server
|
|
file: ./server/Dockerfile
|
|
- image_name: k-vault-web
|
|
context: .
|
|
file: ./frontend/Dockerfile
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Setup Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to GHCR
|
|
if: github.event_name != 'pull_request'
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Extract image metadata
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ matrix.image_name }}
|
|
tags: |
|
|
type=ref,event=branch
|
|
type=ref,event=pr
|
|
type=ref,event=tag
|
|
type=sha,prefix=sha-
|
|
type=raw,value=latest,enable={{is_default_branch}}
|
|
|
|
- name: Build and push image
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
context: ${{ matrix.context }}
|
|
file: ${{ matrix.file }}
|
|
platforms: linux/amd64,linux/arm64
|
|
push: ${{ github.event_name != 'pull_request' }}
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
cache-from: type=gha
|
|
cache-to: type=gha,mode=max
|