File tree 1 file changed +54
-0
lines changed 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : shisui release image
2
+
3
+ on :
4
+ release :
5
+ types : [created]
6
+
7
+ defaults :
8
+ run :
9
+ shell : bash
10
+
11
+ concurrency :
12
+ group : ${{ github.workflow }}-${{ github.ref }}
13
+ cancel-in-progress : true
14
+
15
+ permissions :
16
+ contents : write
17
+
18
+ env :
19
+ releaseBuild : ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
20
+ REGISTRY : ghcr.io
21
+ IMAGE_NAME : ${{ github.repository }}
22
+
23
+ jobs :
24
+
25
+ push_image_to_github :
26
+ name : Push Docker image to Github
27
+ runs-on : ubuntu-latest
28
+ permissions : write-all
29
+ steps :
30
+ - name : Check out the repo
31
+ uses : actions/checkout@v4
32
+ - name : Log in to Docker Hub
33
+ uses : docker/login-action@v3
34
+ with :
35
+ registry : ${{ env.REGISTRY }}
36
+ username : ${{ github.actor }}
37
+ password : ${{ secrets.GITHUB_TOKEN }}
38
+
39
+ - name : Extract metadata (tags, labels) for Docker
40
+ id : meta
41
+ uses : docker/metadata-action@v5
42
+ with :
43
+ images : ${{ env.REGISTRY }}/${{ github.repository }}
44
+ tags : |
45
+ type=semver,pattern={{raw}}
46
+
47
+ - name : Build and push Docker image
48
+ uses : docker/build-push-action@v5
49
+ with :
50
+ context : .
51
+ file : ./Dockerfile
52
+ push : true
53
+ tags : ${{ steps.meta.outputs.tags }}
54
+ labels : ${{ steps.meta.outputs.labels }}
You can’t perform that action at this time.
0 commit comments