From aa06d125dfac2142b24adfb79e6549f84ae2d5b4 Mon Sep 17 00:00:00 2001 From: Jamie O'Meara Date: Wed, 12 May 2021 16:52:27 -0600 Subject: [PATCH 01/14] Update maven.yml --- .github/workflows/maven.yml | 39 ++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 18 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 60d8ec56f..3fcb970cf 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -47,13 +47,13 @@ jobs: - name: Checkout uses: actions/checkout@v2 - #- name: Cache local Maven repository - # uses: actions/cache@v2 - # with: - # path: ~/.m2/repository - # key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - # restore-keys: | - # ${{ runner.os }}-maven- + - name: Cache local Maven repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- #- name: Setup Java and Build # uses: actions/setup-java@v2 @@ -71,20 +71,23 @@ jobs: # username: ${{ env.USERNAME }} # password: ${{ secrets.GITHUB_TOKEN }} # registry: ${{ env.REGISTRY }} - - - - - - - - - + - name: Build image + id: build-image uses: bigloupe/buildpacks-action@master with: - image: 'spring-petclinic' - tag: '1.0.0' + image: '${{ env.IMAGE_NAME }} ' + tag: 'latest-${{ github.sha }}' path: '.' builder: 'gcr.io/paketo-buildpacks/builder:base' env: 'BP_JVM_VERSION=8.*' + + - name: Push To GHRC.io + id: push-to-quay + uses: redhat-actions/push-to-registry@v2 + with: + image: ${{ steps.build-image.outputs.image }} + tags: ${{ steps.build-image.outputs.tag }} + registry: ghrc.io + username: ${{ github.actor }} + password: ${{ secrets.github.token }} From d9b56f52cb02e7790e2067929693f1c62bc1c522 Mon Sep 17 00:00:00 2001 From: Jamie O'Meara Date: Wed, 12 May 2021 16:56:30 -0600 Subject: [PATCH 02/14] Update maven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 3fcb970cf..267dd4d03 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -76,7 +76,7 @@ jobs: id: build-image uses: bigloupe/buildpacks-action@master with: - image: '${{ env.IMAGE_NAME }} ' + image: 'ghrc.io/omearaj/spring-petclinic' tag: 'latest-${{ github.sha }}' path: '.' builder: 'gcr.io/paketo-buildpacks/builder:base' From d23c2c6ed5bab0c3752f57d522d542d602e0703a Mon Sep 17 00:00:00 2001 From: Jamie O'Meara Date: Wed, 12 May 2021 17:05:10 -0600 Subject: [PATCH 03/14] Update maven.yml --- .github/workflows/maven.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 267dd4d03..5faf9a986 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -86,8 +86,8 @@ jobs: id: push-to-quay uses: redhat-actions/push-to-registry@v2 with: - image: ${{ steps.build-image.outputs.image }} - tags: ${{ steps.build-image.outputs.tag }} + image: ghrc.io/omearaj/spring-petclinic + tags: latest-${{ github.sha }} registry: ghrc.io username: ${{ github.actor }} password: ${{ secrets.github.token }} From 2f188e7bc07651f997bec66f18964d4b6d8ef9c1 Mon Sep 17 00:00:00 2001 From: Jamie O'Meara Date: Wed, 12 May 2021 17:18:17 -0600 Subject: [PATCH 04/14] Update maven.yml --- .github/workflows/maven.yml | 52 ++++++++++++++++++------------------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 5faf9a986..7c1462c4a 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -62,32 +62,32 @@ jobs: # java-version: 8 #- run: mvn -B install --no-transfer-progress --file pom.xml - #- name: Set App Name + - name: Set App Name #run: 'echo "::set-env name=IMG_NAME::$(echo ${REGISTRY})/$(echo ${USERNAME})/$(echo ${IMG_NAME})"' - #- name: Pack Remote Build - # uses: dfreilich/pack-action@v1 - # with: - # args: 'build ${{ env.IMAGE_NAME }} --path /home/runner/work/spring-petclinic/spring-petclinic --builder ${{ env.BUILDER }} --env "BP_JVM_VERSION=8.*" --publish' - # username: ${{ env.USERNAME }} - # password: ${{ secrets.GITHUB_TOKEN }} - # registry: ${{ env.REGISTRY }} + - name: Pack Remote Build + uses: dfreilich/pack-action@v1 + with: + args: 'build ${{ env.IMAGE_NAME }} --path ./spring-petclinic --builder ${{ env.BUILDER }} --env "BP_JVM_VERSION=8.*" --publish' + username: ${{ env.USERNAME }} + password: ${{ secrets.GITHUB_TOKEN }} + registry: ${{ env.REGISTRY }} - - name: Build image - id: build-image - uses: bigloupe/buildpacks-action@master - with: - image: 'ghrc.io/omearaj/spring-petclinic' - tag: 'latest-${{ github.sha }}' - path: '.' - builder: 'gcr.io/paketo-buildpacks/builder:base' - env: 'BP_JVM_VERSION=8.*' + # - name: Build image + # id: build-image + # uses: bigloupe/buildpacks-action@master + # with: + # image: 'ghrc.io/omearaj/spring-petclinic' + # tag: 'latest-${{ github.sha }}' + # path: '.' + # builder: 'gcr.io/paketo-buildpacks/builder:base' + # env: 'BP_JVM_VERSION=8.*' - - name: Push To GHRC.io - id: push-to-quay - uses: redhat-actions/push-to-registry@v2 - with: - image: ghrc.io/omearaj/spring-petclinic - tags: latest-${{ github.sha }} - registry: ghrc.io - username: ${{ github.actor }} - password: ${{ secrets.github.token }} + # - name: Push To GHRC.io + # id: push-to-quay + # uses: redhat-actions/push-to-registry@v2 + # with: + # image: ghrc.io/omearaj/spring-petclinic + # tags: latest-${{ github.sha }} + # registry: ghrc.io + # username: ${{ github.actor }} + # password: ${{ secrets.github.token }} From b73300f9f690d7991b76b85bd8518e7d1239d606 Mon Sep 17 00:00:00 2001 From: Jamie O'Meara Date: Wed, 12 May 2021 17:19:06 -0600 Subject: [PATCH 05/14] Update maven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 7c1462c4a..4d70cde54 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -62,7 +62,7 @@ jobs: # java-version: 8 #- run: mvn -B install --no-transfer-progress --file pom.xml - - name: Set App Name + #- name: Set App Name #run: 'echo "::set-env name=IMG_NAME::$(echo ${REGISTRY})/$(echo ${USERNAME})/$(echo ${IMG_NAME})"' - name: Pack Remote Build uses: dfreilich/pack-action@v1 From c876c4897b7d78e27a185cb8383dde7f3cbd9cda Mon Sep 17 00:00:00 2001 From: Jamie O'Meara Date: Wed, 12 May 2021 17:47:36 -0600 Subject: [PATCH 06/14] Update maven.yml --- .github/workflows/maven.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 4d70cde54..1858c6ab2 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -64,6 +64,9 @@ jobs: #- name: Set App Name #run: 'echo "::set-env name=IMG_NAME::$(echo ${REGISTRY})/$(echo ${USERNAME})/$(echo ${IMG_NAME})"' + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 + - name: Pack Remote Build uses: dfreilich/pack-action@v1 with: From 0042fb09cf1e3bcf49711550092448d8e615857d Mon Sep 17 00:00:00 2001 From: Jamie O'Meara Date: Wed, 12 May 2021 17:52:41 -0600 Subject: [PATCH 07/14] Update maven.yml --- .github/workflows/maven.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 1858c6ab2..358fa93b2 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -64,8 +64,6 @@ jobs: #- name: Set App Name #run: 'echo "::set-env name=IMG_NAME::$(echo ${REGISTRY})/$(echo ${USERNAME})/$(echo ${IMG_NAME})"' - - name: Setup tmate session - uses: mxschmitt/action-tmate@v3 - name: Pack Remote Build uses: dfreilich/pack-action@v1 @@ -74,6 +72,9 @@ jobs: username: ${{ env.USERNAME }} password: ${{ secrets.GITHUB_TOKEN }} registry: ${{ env.REGISTRY }} + + - name: Setup tmate session + uses: mxschmitt/action-tmate@v3 # - name: Build image # id: build-image From 49e2e470e45b3999c09bda6510608811e15b1e3e Mon Sep 17 00:00:00 2001 From: Jamie O'Meara Date: Wed, 12 May 2021 17:56:23 -0600 Subject: [PATCH 08/14] Update maven.yml --- .github/workflows/maven.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 358fa93b2..b36e32448 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -74,6 +74,7 @@ jobs: registry: ${{ env.REGISTRY }} - name: Setup tmate session + if: ${{ failure() }} uses: mxschmitt/action-tmate@v3 # - name: Build image From bf8fcfdf3e180ae6bd68cfbc96ed413a1b37ea2e Mon Sep 17 00:00:00 2001 From: Jamie O'Meara Date: Tue, 18 May 2021 11:15:50 -0600 Subject: [PATCH 09/14] Update maven.yml --- .github/workflows/maven.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index b36e32448..db40c9d57 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -65,17 +65,17 @@ jobs: #- name: Set App Name #run: 'echo "::set-env name=IMG_NAME::$(echo ${REGISTRY})/$(echo ${USERNAME})/$(echo ${IMG_NAME})"' - - name: Pack Remote Build - uses: dfreilich/pack-action@v1 - with: - args: 'build ${{ env.IMAGE_NAME }} --path ./spring-petclinic --builder ${{ env.BUILDER }} --env "BP_JVM_VERSION=8.*" --publish' - username: ${{ env.USERNAME }} - password: ${{ secrets.GITHUB_TOKEN }} - registry: ${{ env.REGISTRY }} + # - name: Pack Remote Build + # uses: dfreilich/pack-action@v1 + # with: + # args: 'build ${{ env.IMAGE_NAME }} --path ./spring-petclinic --builder ${{ env.BUILDER }} --env "BP_JVM_VERSION=8.*" --publish' + # username: ${{ env.USERNAME }} + # password: ${{ secrets.GITHUB_TOKEN }} + # registry: ${{ env.REGISTRY }} - - name: Setup tmate session - if: ${{ failure() }} - uses: mxschmitt/action-tmate@v3 + # - name: Setup tmate session + # if: ${{ failure() }} + # uses: mxschmitt/action-tmate@v3 # - name: Build image # id: build-image From 963bb85047814be9a730b672124aac398af340b6 Mon Sep 17 00:00:00 2001 From: Jamie O'Meara Date: Tue, 18 May 2021 11:21:53 -0600 Subject: [PATCH 10/14] Update maven.yml --- .github/workflows/maven.yml | 38 ++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index db40c9d57..bfc7e7afd 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -33,27 +33,27 @@ jobs: java-version: ${{ matrix.java-version }} - run: mvn -B install --no-transfer-progress --file pom.xml - build-image-and-publish: - runs-on: ubuntu-latest - needs: [build-and-test-matrix] - env: - USERNAME: 'omearaj' - IMG_NAME: 'spring-petclinic' - REGISTRY: 'ghcr.io' - BUILDER: 'paketobuildpacks/builder:base' - IMAGE_NAME: 'ghrc.io/omearaj/spring-petclinic' +# build-image-and-publish: +# runs-on: ubuntu-latest +# needs: [build-and-test-matrix] +# env: +# USERNAME: 'omearaj' +# IMG_NAME: 'spring-petclinic' +# REGISTRY: 'ghcr.io' +# BUILDER: 'paketobuildpacks/builder:base' +# IMAGE_NAME: 'ghrc.io/omearaj/spring-petclinic' - steps: - - name: Checkout - uses: actions/checkout@v2 +# steps: +# - name: Checkout +# uses: actions/checkout@v2 - - name: Cache local Maven repository - uses: actions/cache@v2 - with: - path: ~/.m2/repository - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-maven- +# - name: Cache local Maven repository +# uses: actions/cache@v2 +# with: +3 path: ~/.m2/repository +# key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + # restore-keys: | + # ${{ runner.os }}-maven- #- name: Setup Java and Build # uses: actions/setup-java@v2 From bb5d5de8fe170567ff42ff9ec06c98c6dc27e71d Mon Sep 17 00:00:00 2001 From: Jamie O'Meara Date: Tue, 18 May 2021 11:22:53 -0600 Subject: [PATCH 11/14] Update maven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index bfc7e7afd..49d782cb7 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -50,7 +50,7 @@ jobs: # - name: Cache local Maven repository # uses: actions/cache@v2 # with: -3 path: ~/.m2/repository +# path: ~/.m2/repository # key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} # restore-keys: | # ${{ runner.os }}-maven- From e70b23d79bc469b8b31daf05ef6c33bfb4394a16 Mon Sep 17 00:00:00 2001 From: Jamie O'Meara Date: Tue, 18 May 2021 11:44:22 -0600 Subject: [PATCH 12/14] Update maven.yml --- .github/workflows/maven.yml | 43 +++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 49d782cb7..3cc554a1b 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -33,27 +33,32 @@ jobs: java-version: ${{ matrix.java-version }} - run: mvn -B install --no-transfer-progress --file pom.xml -# build-image-and-publish: -# runs-on: ubuntu-latest -# needs: [build-and-test-matrix] -# env: -# USERNAME: 'omearaj' -# IMG_NAME: 'spring-petclinic' -# REGISTRY: 'ghcr.io' -# BUILDER: 'paketobuildpacks/builder:base' -# IMAGE_NAME: 'ghrc.io/omearaj/spring-petclinic' + build-image-and-publish: + runs-on: ubuntu-latest + needs: [build-and-test-matrix] + env: + USERNAME: 'omearaj' + IMG_NAME: 'spring-petclinic' + REGISTRY: 'ghcr.io' + BUILDER: 'paketobuildpacks/builder:base' + IMAGE_NAME: 'ghrc.io/omearaj/spring-petclinic' -# steps: -# - name: Checkout -# uses: actions/checkout@v2 + steps: + - name: Checkout + uses: actions/checkout@v2 -# - name: Cache local Maven repository -# uses: actions/cache@v2 -# with: -# path: ~/.m2/repository -# key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} - # restore-keys: | - # ${{ runner.os }}-maven- + - name: Cache local Maven repository + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - uses: andrioid/setup-pack@latest + - name: Build Image using Pack + run: | + pack build ghrc.io/omearaj/spring-petclinic --builder paketobuildpacks/builder:base --env 'BP_JVM_VERSION=8.*' #- name: Setup Java and Build # uses: actions/setup-java@v2 From e86675a9c9f8272a417e0ff24f827453cd8f913e Mon Sep 17 00:00:00 2001 From: Jamie O'Meara Date: Tue, 18 May 2021 11:57:09 -0600 Subject: [PATCH 13/14] Update maven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 3cc554a1b..bbd041974 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -56,7 +56,7 @@ jobs: ${{ runner.os }}-maven- - uses: andrioid/setup-pack@latest - - name: Build Image using Pack + - name: "😆 Image using Pack" run: | pack build ghrc.io/omearaj/spring-petclinic --builder paketobuildpacks/builder:base --env 'BP_JVM_VERSION=8.*' From 61711026a029a61679ad0bd6a59f42e31714e4bd Mon Sep 17 00:00:00 2001 From: Jamie O'Meara Date: Tue, 18 May 2021 13:57:49 -0600 Subject: [PATCH 14/14] Update maven.yml --- .github/workflows/maven.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index bbd041974..5301a2f51 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -55,7 +55,7 @@ jobs: restore-keys: | ${{ runner.os }}-maven- - - uses: andrioid/setup-pack@latest + - uses: andrioid/setup-pack@v1.0.1 - name: "😆 Image using Pack" run: | pack build ghrc.io/omearaj/spring-petclinic --builder paketobuildpacks/builder:base --env 'BP_JVM_VERSION=8.*'