Initial commit
This commit is contained in:
40
.gitea/workflows/build-push.yml
Normal file
40
.gitea/workflows/build-push.yml
Normal file
@@ -0,0 +1,40 @@
|
||||
name: 发布 Docker 镜像
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
push_to_registry:
|
||||
name: 推送 Docker 镜像到 Docker Hub
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
attestations: write
|
||||
id-token: write
|
||||
steps:
|
||||
- name: 检出仓库代码
|
||||
uses: https://git.kakunet.top/actions/checkout@v4
|
||||
|
||||
- name: 登录到 Gitea Docker Hub
|
||||
uses: https://git.kakunet.top/docker/login-action@v3
|
||||
with:
|
||||
registry: git.yinlihupo.cn
|
||||
username: { secrets.DOCKER_USERNAME }
|
||||
password: { secrets.DOCKER_PASSWORD }
|
||||
|
||||
- name: 提取 Docker 元数据(标签、标记)
|
||||
id: meta
|
||||
uses: https://git.kakunet.top/docker/metadata-action@v5
|
||||
with:
|
||||
images: git.yinlihupo.cn/warmonion/intelligent-daily-report-system
|
||||
|
||||
- name: 构建并推送后端 Docker 镜像
|
||||
uses: https://git.kakunet.top/docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./dockerfile
|
||||
push: true
|
||||
tags: { steps.meta.outputs.tags }
|
||||
labels: { steps.meta.outputs.labels }
|
||||
Reference in New Issue
Block a user