添加 GitHub Actions 工作流以同步容器镜像,更新 .gitignore 和 Python 版本文件,添加项目描述和依赖项
Some checks failed
Sync Container Images / sync-images (push) Failing after 30s

This commit is contained in:
2025-04-17 20:08:41 +08:00
commit f7b5b648ba
8 changed files with 135 additions and 0 deletions

50
.github/workflows/sync.yaml vendored Normal file
View File

@ -0,0 +1,50 @@
name: Sync Container Images
on:
schedule:
- cron: '0 0 * * *' # Every day at midnight
push:
branches:
- main
jobs:
sync-images:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
# source registries
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Login to GHCR
uses: docker/login-action@v3
with:
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_PASSWORD }}
# target registries
- name: Login to Liteyuki Harbor
uses: docker/login-action@v3
with:
username: ${{ secrets.LITEYUKIHARBOR_USERNAME }}
password: ${{ secrets.LITEYUKIHARBOR_PASSWORD }}
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Run Python script
run: |
uv venv --python 3.12
uv install
uv run python sync.py