File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change 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 :
You can’t perform that action at this time.
0 commit comments