diff --git a/.github/workflows/gradle-cicd.yml b/.github/workflows/gradle-cicd.yml index 5940f5f..97bd6cc 100644 --- a/.github/workflows/gradle-cicd.yml +++ b/.github/workflows/gradle-cicd.yml @@ -22,8 +22,10 @@ jobs: java-version: '11' distribution: 'temurin' - - name: Create application.yml + - name: Create properties run: | + cd favor + echo "${{ secrets.GRADLE_PROPERTIES_CONTENT }}" > gradle.properties mkdir -p src/main/resources echo "${{ secrets.APPLICATION_YML_CONTENT }}" > src/main/resources/application.yml diff --git a/favor/.gitignore b/favor/.gitignore index 9df3f0b..5363c8e 100644 --- a/favor/.gitignore +++ b/favor/.gitignore @@ -39,4 +39,6 @@ out/ ### Config Files ### application.yml application-dev.yml -application-prod.yml \ No newline at end of file +application-prod.yml + +gradle.properties \ No newline at end of file diff --git a/favor/build.gradle b/favor/build.gradle index 416bb24..9624050 100644 --- a/favor/build.gradle +++ b/favor/build.gradle @@ -19,6 +19,10 @@ jib { to { image = "justuser0129/favor" tags = [ "latest" ] + auth { + username = project.findProperty('DockerUsername') + password = project.findProperty('DockerPassword') + } } from { image = "eclipse-temurin:11-jre" @@ -28,6 +32,10 @@ jib { os = "linux" } } + auth { + username = project.findProperty('DockerUsername') + password = project.findProperty('DockerPassword') + } } container { creationTime = "USE_CURRENT_TIMESTAMP"