Commit 48fd85e 1 parent c3195ae commit 48fd85e Copy full SHA for 48fd85e
File tree 2 files changed +6
-57
lines changed
2 files changed +6
-57
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -15,8 +15,8 @@ name: release-ghcr
15
15
16
16
on :
17
17
push :
18
- tags :
19
- - v*
18
+ tags : [v*]
19
+ branches : [main]
20
20
21
21
jobs :
22
22
build :
@@ -26,18 +26,14 @@ jobs:
26
26
packages : write
27
27
steps :
28
28
- name : Checkout
29
- uses : actions/checkout@v3
29
+ uses : actions/checkout@v4
30
30
- name : prepare
31
31
id : prepare
32
32
run : |
33
- VERSION=${GITHUB_REF#refs/*/}
34
- BRANCH_NAME=${GITHUB_REF#refs/heads/}
35
- if [[ "${VERSION}" == "${BRANCH_NAME}" ]]; then
36
- VERSION=$(git rev-parse --short HEAD)
37
- fi
38
- echo "ref=ghcr.io/${{ github.repository }}:${VERSION}" >> $GITHUB_OUTPUT
33
+ TAG=${GITHUB_REF#refs/*/} # get branch or tag as image tag
34
+ echo "ref=ghcr.io/${{ github.repository }}:${TAG}" >> $GITHUB_OUTPUT
39
35
- name : docker login
40
- uses : docker/login-action@v2
36
+ uses : docker/login-action@v3
41
37
with :
42
38
registry : ghcr.io
43
39
username : ${{ github.actor }}
You can’t perform that action at this time.
0 commit comments