File tree Expand file tree Collapse file tree 2 files changed +11
-16
lines changed Expand file tree Collapse file tree 2 files changed +11
-16
lines changed Original file line number Diff line number Diff line change @@ -59,25 +59,26 @@ jobs:
59
59
if : inputs.tags != ''
60
60
run : echo "TAGS=-PdockerTags=${{ inputs.tags }}" >> $GITHUB_ENV
61
61
62
- - name : Setup Docker Hub credentials
62
+ - name : Login to DockerHub
63
63
if : inputs.registry == 'docker.io'
64
- run : |
65
- echo "DOCKER_USERNAME=${{ secrets.DOCKERHUB_USERNAME }}" >> $GITHUB_ENV
66
- echo "DOCKER_PASSWORD=${{ secrets.DOCKERHUB_TOKEN }}" >> $GITHUB_ENV
64
+ uses : docker/login-action@v3
65
+ with :
66
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
67
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
67
68
68
- - name : Setup GitHub Container Registry credentials
69
+ - name : Login to GitHub Container Registry
69
70
if : inputs.registry == 'ghcr.io'
70
- run : |
71
- echo "DOCKER_USERNAME=${{ github.actor }}" >> $GITHUB_ENV
72
- echo "DOCKER_PASSWORD=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
71
+ uses : docker/login-action@v3
72
+ with :
73
+ registry : ghcr.io
74
+ username : ${{ github.actor }}
75
+ password : ${{ secrets.GITHUB_TOKEN }}
73
76
74
77
- name : Build and deploy OCI image
75
78
run : >
76
79
./gradlew bootBuildImage
77
80
-PjvmType=${{ inputs.image-jvm-type }}
78
81
-PjdkVersion=${{ inputs.image-jvm-version }}
79
- -PdockerUsername=${{ env.DOCKER_USERNAME }}
80
- -PdockerPassword=${{ env.DOCKER_PASSWORD }}
81
82
$TAGS
82
83
--imageName=${{ inputs.registry }}/${{ inputs.image-name }}
83
84
--publishImage
Original file line number Diff line number Diff line change @@ -8,8 +8,6 @@ plugins {
8
8
9
9
val jdkVersion: String by project
10
10
val jvmType: String by project
11
- val dockerUsername: String by project
12
- val dockerPassword: String by project
13
11
val dockerTags: String? by project
14
12
val imageRegistry: String? by project
15
13
val imageName: String? by project
@@ -54,10 +52,6 @@ tasks {
54
52
" paketo-buildpacks/environment-variables" ,
55
53
" gcr.io/paketo-buildpacks/health-checker"
56
54
)
57
- docker.publishRegistry {
58
- username = dockerUsername
59
- password = dockerPassword
60
- }
61
55
environment = mapOf (
62
56
" BP_JVM_TYPE" to jvmType,
63
57
" BP_JVM_VERSION" to jdkVersion,
You can’t perform that action at this time.
0 commit comments