Skip to content

Commit 086992e

Browse files
Merge branch 'master' into release
2 parents 1c6dcf3 + 5cc3643 commit 086992e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/create-release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,45 @@ jobs:
1313
steps:
1414
- name: Checkout code
1515
uses: actions/checkout@v2
16+
17+
- name: Test for get release data
18+
run: |
19+
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME
20+
21+
echo $IMAGE_ID
22+
23+
# Change all uppercase to lowercase
24+
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
25+
26+
echo $IMAGE_ID
27+
28+
# Strip git ref prefix from version
29+
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
30+
echo $VERSION
31+
32+
# Strip "v" prefix from tag name
33+
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
34+
35+
echo $VERSION
36+
37+
# Use Docker `latest` tag convention
38+
[ "$VERSION" == "master" ] && VERSION=latest
39+
40+
echo $VERSION
41+
echo $IMAGE_ID
42+
43+
echo IMAGE_ID=$IMAGE_ID
44+
echo VERSION=$VERSION
45+
46+
echo $IMAGE_ID:$VERSION
47+
48+
docker tag image $IMAGE_ID:$VERSION
49+
docker push $IMAGE_ID:$VERSION
50+
1651
- name: Create Release
1752
id: create_release
1853
uses: actions/create-release@v1
54+
1955
env:
2056
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2157
with:

0 commit comments

Comments
 (0)