From f0066a16c6f8154d010d771534296db8711d9ba0 Mon Sep 17 00:00:00 2001 From: Dan Alima Date: Sun, 31 Dec 2023 15:22:06 +0200 Subject: [PATCH] addind latest tag to the image --- .github/workflows/README.md | 2 +- .github/workflows/maven-build.yml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 5224b88fb..130efd6dd 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -26,7 +26,7 @@ The pipeline publishes the Docker image to JFrog Artifactory using JFrog CLI com 2. Run the following command to build and run the Docker image: ```bash - docker run -p 8080:8080 danvid.jfrog.io/spring-petclinic-docker-local/spring-petclinic:d21a8c454126fe435287cb448a555e9d213c6cbe + docker run -p 8080:8080 danvid.jfrog.io/spring-petclinic-docker-local/spring-petclinic ``` 3. Access the Spring Pet Clinic application at [http://localhost:8080/](http://localhost:8080/). diff --git a/.github/workflows/maven-build.yml b/.github/workflows/maven-build.yml index 020d4f58e..cead959ac 100644 --- a/.github/workflows/maven-build.yml +++ b/.github/workflows/maven-build.yml @@ -2,7 +2,7 @@ name: JFrog - Home Assignment on: push: - branches: [ main ] + branches: [ main, jfrog_assignment ] pull_request: branches: [ main ] @@ -10,6 +10,7 @@ jobs: build: env: IMAGE_NAME: danvid.jfrog.io/spring-petclinic-docker/spring-petclinic:${{ github.sha }} + IMAGE_NAME_LATEST: danvid.jfrog.io/spring-petclinic-docker/spring-petclinic:latest SCA_REPORT_FILE: jfrog_sca_report.json runs-on: ubuntu-latest @@ -37,7 +38,7 @@ jobs: run: ./mvnw test - name: Package the project as a runnable Docker image run: | - jf docker build -t ${{ env.IMAGE_NAME }} . + jf docker build -t ${{ env.IMAGE_NAME }} -t ${{ env.IMAGE_NAME_LATEST }} . - name: Scan the project with your preferred SCA tool run: |