From f9c7fdd521f331097f6ee9d0715389e34b6969a8 Mon Sep 17 00:00:00 2001 From: sravan-git-web <80620826+sravan-git-web@users.noreply.github.com> Date: Tue, 3 Jan 2023 16:14:41 +0530 Subject: [PATCH 1/4] Create cicheck.yml --- .github/workflows/cicheck.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/cicheck.yml diff --git a/.github/workflows/cicheck.yml b/.github/workflows/cicheck.yml new file mode 100644 index 000000000..3dbc8dde1 --- /dev/null +++ b/.github/workflows/cicheck.yml @@ -0,0 +1,34 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle + +name: Java CI with Gradle + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up JDK 11 + uses: actions/setup-java@v3 + with: + java-version: '11' + distribution: 'temurin' + - name: Build with Gradle + uses: gradle/gradle-build-action@67421db6bd0bf253fb4bd25b31ebb98943c375e1 + with: + arguments: build From 5bf3bddfe156f65f36d0969cb1b870e0bce2c10a Mon Sep 17 00:00:00 2001 From: sravan-git-web <80620826+sravan-git-web@users.noreply.github.com> Date: Tue, 3 Jan 2023 16:49:03 +0530 Subject: [PATCH 2/4] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a429a2a98..e7c3bf13c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,7 +31,7 @@ jobs: - name: Build and Push Docker Image uses: mr-smithers-excellent/docker-build-push@v4 with: - image: nanajanashia/demo-app + image: nanajanashia/k8s-demo-app registry: docker.io username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_PASSWORD }} From 0501bc49e22876cdecaea7841f8241919d7be797 Mon Sep 17 00:00:00 2001 From: sravan-git-web <80620826+sravan-git-web@users.noreply.github.com> Date: Tue, 3 Jan 2023 16:58:51 +0530 Subject: [PATCH 3/4] Update ci.yml --- .github/workflows/ci.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e7c3bf13c..56dc2c30f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,11 +28,5 @@ jobs: - name: Build with Gradle run: ./gradlew build - - name: Build and Push Docker Image - uses: mr-smithers-excellent/docker-build-push@v4 - with: - image: nanajanashia/k8s-demo-app - registry: docker.io - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + From 3f378d85eb6a6eb5f654a0c34ad9a6ef682fcab7 Mon Sep 17 00:00:00 2001 From: sravan-git-web <80620826+sravan-git-web@users.noreply.github.com> Date: Tue, 3 Jan 2023 17:48:23 +0530 Subject: [PATCH 4/4] Update ci.yml --- .github/workflows/ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56dc2c30f..d01b205fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,6 +27,13 @@ jobs: - name: Build with Gradle run: ./gradlew build - + + - name: Build and Push Docker Image + uses: mr-smithers-excellent/docker-build-push@v4 + with: + image: tomcat + registry: docker.io + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }}