File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Publish
2
+
3
+ on :
4
+ push :
5
+ branches : ["master"]
6
+
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+ name : Publish
11
+ steps :
12
+ - name : Checkout Repository
13
+ uses : actions/checkout@v4
14
+ - name : Login to GitHub Container Registry
15
+ uses : docker/login-action@v3
16
+ with :
17
+ registry : ghcr.io
18
+ username : ${{ github.actor }}
19
+ password : ${{ secrets.GITHUB_TOKEN }}
20
+ - name : Generate tag
21
+ id : tag
22
+ run : |
23
+ ts=$(date +%s)
24
+ branch=${GITHUB_REF##*/}
25
+ echo "IMAGE_ID=${branch}-${GITHUB_SHA::8}-${ts}" >> "$GITHUB_OUTPUT"
26
+ - name : Publish Docker image
27
+ uses : docker/build-push-action@v5
28
+ with :
29
+ context : .
30
+ push : true
31
+ tags : |
32
+ ghcr.io/jroy/disgit:latest
33
+ ghcr.io/jroy/disgit:${{ steps.tag.outputs.IMAGE_ID }}
You can’t perform that action at this time.
0 commit comments