Auto-backup data and configs
Browse files- .github/workflows/docker-image.yml +61 -0
- data/database.db +2 -2
- tags/v1.1.2.json +1 -0
.github/workflows/docker-image.yml
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
name: Docker Image CI
|
| 2 |
+
|
| 3 |
+
on:
|
| 4 |
+
push:
|
| 5 |
+
branches: [ "master", "main" ]
|
| 6 |
+
tags: [ 'v*.*.*' ]
|
| 7 |
+
pull_request:
|
| 8 |
+
branches: [ "master", "main" ]
|
| 9 |
+
|
| 10 |
+
env:
|
| 11 |
+
REGISTRY: ghcr.io
|
| 12 |
+
IMAGE_NAME: ${{ github.repository }}
|
| 13 |
+
|
| 14 |
+
jobs:
|
| 15 |
+
build-and-push-image:
|
| 16 |
+
runs-on: ubuntu-latest
|
| 17 |
+
permissions:
|
| 18 |
+
contents: read
|
| 19 |
+
packages: write
|
| 20 |
+
|
| 21 |
+
steps:
|
| 22 |
+
- name: Checkout repository
|
| 23 |
+
uses: actions/checkout@v4
|
| 24 |
+
|
| 25 |
+
- name: Set up Docker Buildx
|
| 26 |
+
uses: docker/setup-buildx-action@v3
|
| 27 |
+
|
| 28 |
+
- name: Log in to the Container registry
|
| 29 |
+
if: github.event_name != 'pull_request'
|
| 30 |
+
uses: docker/login-action@v3
|
| 31 |
+
with:
|
| 32 |
+
registry: ${{ env.REGISTRY }}
|
| 33 |
+
username: ${{ github.actor }}
|
| 34 |
+
# 修改这里:使用 GHCR_TOKEN 而不是 GITHUB_TOKEN
|
| 35 |
+
password: ${{ secrets.GHCR_TOKEN }}
|
| 36 |
+
|
| 37 |
+
- name: Extract metadata (tags, labels) for Docker
|
| 38 |
+
id: meta
|
| 39 |
+
uses: docker/metadata-action@v5
|
| 40 |
+
with:
|
| 41 |
+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
| 42 |
+
tags: |
|
| 43 |
+
type=raw,value=latest
|
| 44 |
+
type=ref,event=branch
|
| 45 |
+
type=semver,pattern={{version}}
|
| 46 |
+
type=semver,pattern={{major}}.{{minor}}
|
| 47 |
+
type=semver,pattern={{major}}
|
| 48 |
+
type=sha
|
| 49 |
+
|
| 50 |
+
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
- name: Build and push Docker image
|
| 54 |
+
uses: docker/build-push-action@v5
|
| 55 |
+
with:
|
| 56 |
+
context: .
|
| 57 |
+
push: ${{ github.event_name != 'pull_request' }}
|
| 58 |
+
tags: ${{ steps.meta.outputs.tags }}
|
| 59 |
+
labels: ${{ steps.meta.outputs.labels }}
|
| 60 |
+
cache-from: type=gha
|
| 61 |
+
cache-to: type=gha,mode=max
|
data/database.db
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:89c9e7bf73463af1de07b480be21266e415c839bab9af6a14a21804c5843a3f6
|
| 3 |
+
size 6103040
|
tags/v1.1.2.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"tag_name": "v1.1.2", "commit": "3ab48fc79cbac31fdb90af12840fd6e97d63b480","date": "2026-03-26 21:31:26"}
|