From a27a8218fac4dc65b5f073e90f1bde71d40e0124 Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Mon, 30 Oct 2023 12:05:35 -0400 Subject: [PATCH 01/12] fix1 --- .github/workflows/push-ci.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/push-ci.yml b/.github/workflows/push-ci.yml index 6c98953e4c..e6a5acfe6f 100644 --- a/.github/workflows/push-ci.yml +++ b/.github/workflows/push-ci.yml @@ -19,48 +19,48 @@ jobs: checkout-repo: ${{ github.event.pull_request.head.repo.full_name }} checkout-ref: ${{ github.event.pull_request.head.ref }} secrets: inherit - if: github.repository_owner == 'cryostatio' + build-and-test-amd64: uses: ./.github/workflows/ci-build-image.yml secrets: inherit with: build-arch: amd64 - if: github.repository_owner == 'cryostatio' + build-and-test-arm64: uses: ./.github/workflows/ci-build-image.yml secrets: inherit with: build-arch: arm64 - if: github.repository_owner == 'cryostatio' + push-to-quay: runs-on: ubuntu-latest needs: [code-analysis, build-and-test-amd64, build-and-test-arm64] env: CRYOSTAT_IMG: quay.io/cryostat/cryostat - if: always() && github.repository_owner == 'cryostatio' + if: always() steps: - uses: actions/download-artifact@v3 with: name: cryostat-amd64 - if: github.repository_owner == 'cryostatio' + - name: Load cryostat-amd64 image env: IMAGE_VERSION: ${{ needs.build-and-test-amd64.outputs.image-version }} run: | podman load -i cryostat-amd64.tar podman tag quay.io/cryostat/cryostat:latest $CRYOSTAT_IMG:$IMAGE_VERSION-linux-amd64 - if: github.repository_owner == 'cryostatio' + - uses: actions/download-artifact@v3 with: name: cryostat-arm64 - if: github.repository_owner == 'cryostatio' + - name: Load cryostat-arm64 image env: IMAGE_VERSION: ${{ needs.build-and-test-arm64.outputs.image-version }} run: | podman load -i cryostat-arm64.tar podman tag quay.io/cryostat/cryostat:latest $CRYOSTAT_IMG:$IMAGE_VERSION-linux-arm64 - if: github.repository_owner == 'cryostatio' + - name: Create OCI Manifest id: create-manifest env: @@ -75,7 +75,7 @@ jobs: else echo "tags=$IMAGE_VERSION" >> "$GITHUB_OUTPUT" fi - if: github.repository_owner == 'cryostatio' + - name: Push to quay.io uses: redhat-actions/push-to-registry@v2 with: From 55d96a1ce1dc9952e2b14571f5782e49cd49ed87 Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Mon, 30 Oct 2023 12:32:03 -0400 Subject: [PATCH 02/12] fix1 --- .github/workflows/ci-build-image.yml | 11 +---------- .github/workflows/push-ci.yml | 6 +++--- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci-build-image.yml b/.github/workflows/ci-build-image.yml index a0b20983d0..136ff23c00 100644 --- a/.github/workflows/ci-build-image.yml +++ b/.github/workflows/ci-build-image.yml @@ -63,16 +63,7 @@ jobs: - name: maven-settings uses: s4u/maven-settings-action@v2 with: - githubServer: false - - name: ghcr login - uses: redhat-actions/podman-login@v1 - with: - registry: ghcr.io/${{ github.repository_owner }} - username: ${{ github.event.comment.user.login }} - password: ${{ secrets.GITHUB_TOKEN }} - - uses: skjolber/maven-cache-github-action@v1 - with: - step: restore + githubServer: true - run: git submodule init - run: git submodule update - run: mvn -B -U -Dbuild.arch=${{ inputs.build-arch }} clean package diff --git a/.github/workflows/push-ci.yml b/.github/workflows/push-ci.yml index e6a5acfe6f..6ca6620f2f 100644 --- a/.github/workflows/push-ci.yml +++ b/.github/workflows/push-ci.yml @@ -20,13 +20,13 @@ jobs: checkout-ref: ${{ github.event.pull_request.head.ref }} secrets: inherit - build-and-test-amd64: + build-amd64: uses: ./.github/workflows/ci-build-image.yml secrets: inherit with: build-arch: amd64 - build-and-test-arm64: + build-arm64: uses: ./.github/workflows/ci-build-image.yml secrets: inherit with: @@ -34,7 +34,7 @@ jobs: push-to-quay: runs-on: ubuntu-latest - needs: [code-analysis, build-and-test-amd64, build-and-test-arm64] + needs: [code-analysis, build-amd64, build-arm64] env: CRYOSTAT_IMG: quay.io/cryostat/cryostat if: always() From 2415974ee951e6d5de64da3738c23c40e3582cf1 Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Mon, 30 Oct 2023 12:57:07 -0400 Subject: [PATCH 03/12] fix1 --- .github/workflows/ci-build-image.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/ci-build-image.yml b/.github/workflows/ci-build-image.yml index 136ff23c00..3edfe81a6e 100644 --- a/.github/workflows/ci-build-image.yml +++ b/.github/workflows/ci-build-image.yml @@ -64,6 +64,15 @@ jobs: uses: s4u/maven-settings-action@v2 with: githubServer: true + - name: ghcr login + uses: redhat-actions/podman-login@v1 + with: + registry: ghcr.io/${{ github.repository_owner }} + username: ${{ github.event.comment.user.login }} + password: ${{ secrets.GITHUB_TOKEN }} + - uses: skjolber/maven-cache-github-action@v1 + with: + step: restore - run: git submodule init - run: git submodule update - run: mvn -B -U -Dbuild.arch=${{ inputs.build-arch }} clean package From 302ce6167fdb146319934b1b0b187d6fef1efdf1 Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Mon, 30 Oct 2023 13:19:35 -0400 Subject: [PATCH 04/12] fix1 --- .github/workflows/ci-build-image.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-build-image.yml b/.github/workflows/ci-build-image.yml index 3edfe81a6e..d34d91f75a 100644 --- a/.github/workflows/ci-build-image.yml +++ b/.github/workflows/ci-build-image.yml @@ -60,19 +60,17 @@ jobs: with: java-version: '17' distribution: 'temurin' + - uses: actions/cache@v3 + with: + path: ~/.m2 + key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-build- + ${{ runner.os }}- - name: maven-settings uses: s4u/maven-settings-action@v2 with: githubServer: true - - name: ghcr login - uses: redhat-actions/podman-login@v1 - with: - registry: ghcr.io/${{ github.repository_owner }} - username: ${{ github.event.comment.user.login }} - password: ${{ secrets.GITHUB_TOKEN }} - - uses: skjolber/maven-cache-github-action@v1 - with: - step: restore - run: git submodule init - run: git submodule update - run: mvn -B -U -Dbuild.arch=${{ inputs.build-arch }} clean package From f103724574c1658f6e42f168fa6dbff86ff76375 Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Mon, 30 Oct 2023 13:20:34 -0400 Subject: [PATCH 05/12] fix1 --- .github/workflows/pr-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-ci.yml b/.github/workflows/pr-ci.yml index f3abd44d7d..59381d833a 100644 --- a/.github/workflows/pr-ci.yml +++ b/.github/workflows/pr-ci.yml @@ -12,7 +12,7 @@ on: jobs: check-before-build: runs-on: ubuntu-latest - if: github.repository_owner == 'cryostatio' && github.event.issue.pull_request && (startsWith(github.event.comment.body, '/build_test') || startsWith(github.event.comment.body, '/retest')) + if: github.event.issue.pull_request && (startsWith(github.event.comment.body, '/build_test') || startsWith(github.event.comment.body, '/retest')) permissions: pull-requests: write steps: From 0787d1da6e92d77a531cf329820f31d594f27b60 Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Mon, 30 Oct 2023 13:26:08 -0400 Subject: [PATCH 06/12] fix1 --- .github/workflows/ci-build-image.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci-build-image.yml b/.github/workflows/ci-build-image.yml index d34d91f75a..a0b20983d0 100644 --- a/.github/workflows/ci-build-image.yml +++ b/.github/workflows/ci-build-image.yml @@ -60,17 +60,19 @@ jobs: with: java-version: '17' distribution: 'temurin' - - uses: actions/cache@v3 - with: - path: ~/.m2 - key: ${{ runner.os }}-build-${{ hashFiles('**/pom.xml') }} - restore-keys: | - ${{ runner.os }}-build- - ${{ runner.os }}- - name: maven-settings uses: s4u/maven-settings-action@v2 with: - githubServer: true + githubServer: false + - name: ghcr login + uses: redhat-actions/podman-login@v1 + with: + registry: ghcr.io/${{ github.repository_owner }} + username: ${{ github.event.comment.user.login }} + password: ${{ secrets.GITHUB_TOKEN }} + - uses: skjolber/maven-cache-github-action@v1 + with: + step: restore - run: git submodule init - run: git submodule update - run: mvn -B -U -Dbuild.arch=${{ inputs.build-arch }} clean package From 41319150815f74753f1f7b5a8f32159ac6111ad8 Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Mon, 30 Oct 2023 13:48:43 -0400 Subject: [PATCH 07/12] fix1 --- .github/workflows/ci-build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-build-image.yml b/.github/workflows/ci-build-image.yml index a0b20983d0..d5f89413cb 100644 --- a/.github/workflows/ci-build-image.yml +++ b/.github/workflows/ci-build-image.yml @@ -68,7 +68,7 @@ jobs: uses: redhat-actions/podman-login@v1 with: registry: ghcr.io/${{ github.repository_owner }} - username: ${{ github.event.comment.user.login }} + username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - uses: skjolber/maven-cache-github-action@v1 with: From dd46ade18fd72f1f0bf17a43bb68c045aa04f363 Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Mon, 30 Oct 2023 14:39:15 -0400 Subject: [PATCH 08/12] fix1 --- .github/workflows/push-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/push-ci.yml b/.github/workflows/push-ci.yml index 6ca6620f2f..dd9bf2ee3b 100644 --- a/.github/workflows/push-ci.yml +++ b/.github/workflows/push-ci.yml @@ -84,7 +84,5 @@ jobs: registry: quay.io/cryostat username: cryostat+bot password: ${{ secrets.REGISTRY_PASSWORD }} - if: github.repository_owner == 'cryostatio' - name: Print image URL run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}" - if: github.repository_owner == 'cryostatio' From bdf0ae86717138d0d6ce36a578dbdc37345febf0 Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Mon, 30 Oct 2023 15:01:46 -0400 Subject: [PATCH 09/12] fix1 --- .github/workflows/push-ci.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/push-ci.yml b/.github/workflows/push-ci.yml index dd9bf2ee3b..544fad2835 100644 --- a/.github/workflows/push-ci.yml +++ b/.github/workflows/push-ci.yml @@ -20,13 +20,13 @@ jobs: checkout-ref: ${{ github.event.pull_request.head.ref }} secrets: inherit - build-amd64: + build-and-test-amd64: uses: ./.github/workflows/ci-build-image.yml secrets: inherit with: build-arch: amd64 - build-arm64: + build-and-test-arm64: uses: ./.github/workflows/ci-build-image.yml secrets: inherit with: @@ -34,7 +34,7 @@ jobs: push-to-quay: runs-on: ubuntu-latest - needs: [code-analysis, build-amd64, build-arm64] + needs: [code-analysis, build-and-test-amd64, build-and-test-arm64] env: CRYOSTAT_IMG: quay.io/cryostat/cryostat if: always() @@ -60,7 +60,6 @@ jobs: run: | podman load -i cryostat-arm64.tar podman tag quay.io/cryostat/cryostat:latest $CRYOSTAT_IMG:$IMAGE_VERSION-linux-arm64 - - name: Create OCI Manifest id: create-manifest env: @@ -75,7 +74,6 @@ jobs: else echo "tags=$IMAGE_VERSION" >> "$GITHUB_OUTPUT" fi - - name: Push to quay.io uses: redhat-actions/push-to-registry@v2 with: From 4ab56447cb61ba09dfa9bb13b103e2f36eb4009a Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Mon, 30 Oct 2023 19:08:36 -0400 Subject: [PATCH 10/12] fix1 --- .github/workflows/push-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/push-ci.yml b/.github/workflows/push-ci.yml index 544fad2835..cccf48a9a3 100644 --- a/.github/workflows/push-ci.yml +++ b/.github/workflows/push-ci.yml @@ -81,6 +81,6 @@ jobs: tags: ${{ steps.create-manifest.outputs.tags }} registry: quay.io/cryostat username: cryostat+bot - password: ${{ secrets.REGISTRY_PASSWORD }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Print image URL run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}" From ffdf0de4bfb7e6952202f5e781ef81233c23e197 Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Mon, 30 Oct 2023 19:58:36 -0400 Subject: [PATCH 11/12] fix1 --- .github/workflows/push-ci.yml | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/.github/workflows/push-ci.yml b/.github/workflows/push-ci.yml index cccf48a9a3..1be7d1d560 100644 --- a/.github/workflows/push-ci.yml +++ b/.github/workflows/push-ci.yml @@ -19,47 +19,48 @@ jobs: checkout-repo: ${{ github.event.pull_request.head.repo.full_name }} checkout-ref: ${{ github.event.pull_request.head.ref }} secrets: inherit - + if: github.repository_owner == 'cryostatio' build-and-test-amd64: uses: ./.github/workflows/ci-build-image.yml secrets: inherit with: build-arch: amd64 - + if: github.repository_owner == 'cryostatio' build-and-test-arm64: uses: ./.github/workflows/ci-build-image.yml secrets: inherit with: build-arch: arm64 - + if: github.repository_owner == 'cryostatio' push-to-quay: runs-on: ubuntu-latest needs: [code-analysis, build-and-test-amd64, build-and-test-arm64] env: CRYOSTAT_IMG: quay.io/cryostat/cryostat - if: always() + if: always() && github.repository_owner == 'cryostatio' steps: - uses: actions/download-artifact@v3 with: name: cryostat-amd64 - + if: github.repository_owner == 'cryostatio' - name: Load cryostat-amd64 image env: IMAGE_VERSION: ${{ needs.build-and-test-amd64.outputs.image-version }} run: | podman load -i cryostat-amd64.tar podman tag quay.io/cryostat/cryostat:latest $CRYOSTAT_IMG:$IMAGE_VERSION-linux-amd64 - + if: github.repository_owner == 'cryostatio' - uses: actions/download-artifact@v3 with: name: cryostat-arm64 - + if: github.repository_owner == 'cryostatio' - name: Load cryostat-arm64 image env: IMAGE_VERSION: ${{ needs.build-and-test-arm64.outputs.image-version }} run: | podman load -i cryostat-arm64.tar podman tag quay.io/cryostat/cryostat:latest $CRYOSTAT_IMG:$IMAGE_VERSION-linux-arm64 + if: github.repository_owner == 'cryostatio' - name: Create OCI Manifest id: create-manifest env: @@ -75,12 +76,14 @@ jobs: echo "tags=$IMAGE_VERSION" >> "$GITHUB_OUTPUT" fi - name: Push to quay.io + id: push-to-quay uses: redhat-actions/push-to-registry@v2 with: image: cryostat tags: ${{ steps.create-manifest.outputs.tags }} registry: quay.io/cryostat username: cryostat+bot - password: ${{ secrets.GITHUB_TOKEN }} + password: ${{ secrets.REGISTRY_PASSWORD }} - name: Print image URL run: echo "Image pushed to ${{ steps.push-to-quay.outputs.registry-paths }}" + From 01595e0e8efe3a4bdb761836b8e866fc7bd9f97b Mon Sep 17 00:00:00 2001 From: Atif Ali Date: Mon, 30 Oct 2023 20:42:01 -0400 Subject: [PATCH 12/12] fix username --- .github/workflows/ci-build-image.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/ci-build-image.yml b/.github/workflows/ci-build-image.yml index d5f89413cb..b1e3e272cf 100644 --- a/.github/workflows/ci-build-image.yml +++ b/.github/workflows/ci-build-image.yml @@ -64,15 +64,6 @@ jobs: uses: s4u/maven-settings-action@v2 with: githubServer: false - - name: ghcr login - uses: redhat-actions/podman-login@v1 - with: - registry: ghcr.io/${{ github.repository_owner }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - uses: skjolber/maven-cache-github-action@v1 - with: - step: restore - run: git submodule init - run: git submodule update - run: mvn -B -U -Dbuild.arch=${{ inputs.build-arch }} clean package