Merge pull request #9 from my0373/feature-change-repository

Feature change repository - Disable auto run
This commit is contained in:
Matt York 2024-02-05 10:27:59 +00:00 committed by GitHub
commit 5d3d54ea5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 23 additions and 17 deletions

View file

@ -4,10 +4,13 @@
name: Java CI with Maven (more complex) name: Java CI with Maven (more complex)
on: on:
push: workflow_dispatch:
branches: [ main ]
pull_request: # on:
branches: [ main ] # push:
# branches: [ main ]
# pull_request:
# branches: [ main ]
jobs: jobs:
@ -60,11 +63,11 @@ jobs:
run: ./mvnw spring-boot:build-image run: ./mvnw spring-boot:build-image
- name: Retag image with jfrog repo - name: Retag image with jfrog repo
run: docker tag spring-petclinic:3.1.0-SNAPSHOT my0373.jfrog.io/my0373-docker/spring-petclinic:3.1.0-SNAPSHOT run: docker tag spring-petclinic:3.1.0-SNAPSHOT matthewy.jfrog.io/petclinic-docker/spring-petclinic:3.1.0-SNAPSHOT
- name: Export the built image to a tar file - name: Export the built image to a tar file
env: env:
IMAGE_NAME: my0373.jfrog.io/my0373-docker/spring-petclinic:3.1.0-SNAPSHOT IMAGE_NAME: matthewy.jfrog.io/petclinic-docker/spring-petclinic:3.1.0-SNAPSHOT
run: docker save $IMAGE_NAME > /tmp/petclinic.tar run: docker save $IMAGE_NAME > /tmp/petclinic.tar
- name: Upload Image as an artifact - name: Upload Image as an artifact
@ -103,12 +106,12 @@ jobs:
- name: Scan Image for vulnerabilities - name: Scan Image for vulnerabilities
run: run:
jf docker scan my0373.jfrog.io/my0373-docker/spring-petclinic:3.1.0-SNAPSHOT jf docker scan matthewy.jfrog.io/petclinic-docker/spring-petclinic:3.1.0-SNAPSHOT
- name: Push Docker Image to the Artifactory repository - name: Push Docker Image to the Artifactory repository
env: env:
IMAGE_NAME: my0373.jfrog.io/my0373-docker/spring-petclinic:3.1.0-SNAPSHOT IMAGE_NAME: matthewy.jfrog.io/petclinic-docker/spring-petclinic:3.1.0-SNAPSHOT
run: run:
jf docker push $IMAGE_NAME jf docker push $IMAGE_NAME

View file

@ -3,15 +3,18 @@
name: Java CI with Maven (minimal) name: Java CI with Maven (minimal)
# The workflow will execute on Push / PR as well as manually running.
on: on:
push: workflow_dispatch:
branches:
- 'main'
pull_request: # # The workflow will execute on Push / PR as well as manually running.
branches: # on:
- 'main' # push:
# branches:
# - 'main'
# pull_request:
# branches:
# - 'main'
# The actual workflow jobs. I've split some of these up to # The actual workflow jobs. I've split some of these up to
@ -65,11 +68,11 @@ jobs:
# In order to upload the image to Artifactory, we'll retag the image. # In order to upload the image to Artifactory, we'll retag the image.
- name: Retag image with jfrog repo - name: Retag image with jfrog repo
run: docker tag spring-petclinic:3.1.0-SNAPSHOT my0373.jfrog.io/my0373-docker/spring-petclinic:3.1.0-SNAPSHOT run: docker tag spring-petclinic:3.1.0-SNAPSHOT matthewy.jfrog.io/petclinic-docker/spring-petclinic:3.1.0-SNAPSHOT
# We push the image into artifactory # We push the image into artifactory
- name: Push Docker Image to Artifactory - name: Push Docker Image to Artifactory
env: env:
IMAGE_NAME: my0373.jfrog.io/my0373-docker/spring-petclinic:3.1.0-SNAPSHOT IMAGE_NAME: matthewy.jfrog.io/petclinic-docker/spring-petclinic:3.1.0-SNAPSHOT
run: run:
jf docker push $IMAGE_NAME jf docker push $IMAGE_NAME