File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 66
77env :
88 IMAGE_BASE_NAME : docker.pkg.github.com/${{ github.repository }}
9- IMAGE_NAME : ${IMAGE_BASE_NAME}/${IMAGE_NAME}
109
1110jobs :
1211 publish-release :
@@ -48,13 +47,14 @@ jobs:
4847
4948 # The GITHUB_REF tag comes in the format 'refs/tags/xxx'.
5049 # 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}"
5550 run : |
5651 export GPG_TTY=$(tty) && echo ${GPG_KEY_BASE64} | base64 --decode | gpg --fast-import --batch
5752 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"
5956 ./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}"
6060
You can’t perform that action at this time.
0 commit comments