Skip to content

Commit b16df15

Browse files
committed
ci: 开启前端 Docker 镜像发布 workflow(tag v* 触发)
1 parent 52bfe07 commit b16df15

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
tags: ["v*"]
6+
7+
jobs:
8+
build-docker:
9+
runs-on: ubuntu-latest
10+
11+
permissions:
12+
contents: read
13+
packages: write
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- uses: docker/setup-buildx-action@v3
19+
20+
- uses: docker/login-action@v3
21+
with:
22+
registry: ghcr.io
23+
username: ${{ github.actor }}
24+
password: ${{ secrets.GITHUB_TOKEN }}
25+
26+
- uses: docker/build-push-action@v5
27+
with:
28+
context: .
29+
push: true
30+
tags: ghcr.io/${{ github.repository }}:${{ github.ref_name }}
31+
labels: |
32+
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
33+
org.opencontainers.image.revision=${{ github.sha }}
34+
cache-from: type=gha
35+
cache-to: type=gha,mode=max

0 commit comments

Comments
 (0)