返回提交历史
Added
.github/workflows/publish-workflow.yaml
+33
-0
XFEstudio/gpt4free
Add publish-workflow.yaml
654180c4
代码差异
1 个文件
+33
-0
@@ -0,0 +1,33 @@
1
name: Publish Docker image
2
3
on:
4
push:
5
tags:
6
- '**'
7
8
jobs:
9
publish:
10
runs-on: ubuntu-latest
11
steps:
12
- name: Setup Buildx
13
uses: docker/setup-buildx-action@v3
14
- name: Checkout repository
15
uses: actions/checkout@v4
16
- name: Get metadata for Docker
17
id: metadata
18
uses: docker/metadata-action@v5
19
with:
20
images: ghcr.io/${{ github.repository }}
21
- name: Login to GitHub Container Registry
22
uses: docker/login-action@v3
23
with:
24
registry: ghcr.io
25
username: ${{ github.repository_owner }}
26
password: ${{ secrets.GITHUB_TOKEN }}
27
- name: Build and push image
28
uses: docker/build-push-action@v5
29
with:
30
context: .
31
push: true
32
tags: ${{ steps.metadata.outputs.tags }}
33
labels: ${{ steps.metadata.outputs.labels }}