File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 6
6
7
7
env :
8
8
IMAGE_BASE_NAME : docker.pkg.github.com/${{ github.repository }}
9
- IMAGE_NAME : ${IMAGE_BASE_NAME}/${IMAGE_NAME}
10
9
11
10
jobs :
12
11
publish-release :
@@ -48,13 +47,14 @@ jobs:
48
47
49
48
# The GITHUB_REF tag comes in the format 'refs/tags/xxx'.
50
49
# So if we split on '/' and take the 3rd value, we can get the release name.
51
-
52
- # ./gradlew jibDockerBuild --image="${IMAGE_NAME}:${NEW_VERSION}"
53
- # echo "$GITHUB_TOKEN" | docker login --username "$GITHUB_REPOSITORY" --password-stdin https://docker.pkg.github.com
54
- # docker push "${IMAGE_NAME}:${NEW_VERSION}"
55
50
run : |
56
51
export GPG_TTY=$(tty) && echo ${GPG_KEY_BASE64} | base64 --decode | gpg --fast-import --batch
57
52
NEW_VERSION=$(echo "${GITHUB_REF}" | cut -d "/" -f3)
58
- echo "New version: ${NEW_VERSION}"
53
+ REPO_NAME=$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}')
54
+ IMAGE=${IMAGE_BASE_NAME}/${REPO_NAME}:${NEW_VERSION}
55
+ echo "Releasing new version ${NEW_VERSION} of ${REPO_NAME} and docker image $IMAGE"
59
56
./gradlew -Pversion=${NEW_VERSION} publish closeAndReleaseRepository -Dorg.gradle.internal.publish.checksums.insecure=true --info
57
+ ./gradlew jibDockerBuild --image="${IMAGE}"
58
+ echo "$GITHUB_TOKEN" | docker login --username "$GITHUB_REPOSITORY" --password-stdin https://docker.pkg.github.com
59
+ docker push "${IMAGE}"
60
60
You can’t perform that action at this time.
0 commit comments