From ff3a2cd0914b1e2b60cb23f9410325bc166c28c1 Mon Sep 17 00:00:00 2001 From: Rajpal Chauhan Date: Wed, 31 Jan 2024 10:04:15 -0800 Subject: [PATCH] test Signed-off-by: Rajpal Chauhan --- .github/workflows/main.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 3f93b635..f040a543 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -87,6 +87,7 @@ jobs: - name: Prepare docker tags for image id: meta + if: contains(fromJSON('["aries-endorser-db",aries-endorser-agent","aries-endorser-backup","aries-endorser-api","aries-endorser-proxy,"]'), matrix.service) uses: docker/metadata-action@v5 with: images: ghcr.io/bcgov/dts-endorser-service/${{ matrix.service }} @@ -100,10 +101,10 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} type=sha,value=latest - if: contains(fromJSON('["aries-endorser-db",aries-endorser-agent","aries-endorser-backup","aries-endorser-api","aries-endorser-proxy,"]'), matrix.service) - name: Build and push Docker image id: docker_build + if: contains(fromJSON('["aries-endorser-agent","aries-endorser-backup","aries-endorser-api","aries-endorser-proxy"]'), matrix.service) uses: docker/build-push-action@v5 with: context: ${{ matrix.SOURCE_CONTEXT_DIR }} @@ -113,15 +114,15 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max - if: contains(fromJSON('["aries-endorser-agent","aries-endorser-backup","aries-endorser-api","aries-endorser-proxy"]'), matrix.service) - name: Pull database image + if: contains(fromJSON('["aries-endorser-db"]'), matrix.service) run: | docker pull ${{ matrix.BUILDER_IMAGE }} - if: contains(fromJSON('["aries-endorser-db"]'), matrix.service) - name: Build database image id: build_image + if: contains(fromJSON('["aries-endorser-db"]'), matrix.service) uses: redhat-actions/s2i-build@v2 with: path_context: ${{ matrix.PATH }} @@ -129,10 +130,10 @@ jobs: builder_image: ${{ matrix.BUILDER_IMAGE }} image: dts-endorser-service/${{ matrix.service }} tags: ${{ steps.meta.outputs.tags }} - if: contains(fromJSON('["aries-endorser-db"]'), matrix.service) - name: Push database image id: push + if: contains(fromJSON('["aries-endorser-db"]'), matrix.service) uses: redhat-actions/push-to-registry@v2 with: tags: ${{ steps.build_image.outputs.tags }} @@ -140,28 +141,26 @@ jobs: username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} registry: ghcr.io/bcgov - if: contains(fromJSON('["aries-endorser-db"]'), matrix.service) - name: Display ${{ matrix.service }} image results id: digests + if: contains(fromJSON('["aries-endorser-db"]'), matrix.service) run: | echo "registry_path=${{ steps.push.outputs.registry-paths }}" digest=${{ steps.push.outputs.digest }} echo 'digest=${digest}' echo "${{ matrix.service }}_digest=${digest}" >> $GITHUB_OUTPUT - if: contains(fromJSON('["aries-endorser-db"]'), matrix.service) - name: Display ${{ matrix.service}} image results id: digest + if: contains(fromJSON('["aries-endorser-agent","aries-endorser-backup","aries-endorser-api","aries-endorser-proxy"]'), matrix.service) run: | echo 'imageid=${{ steps.docker_build.outputs.imageid }}' digest=${{ steps.docker_build.outputs.digest }} echo 'digest=${digest}' echo "${{ matrix.service }}_digest=${digest}" >> $GITHUB_OUTPUT cat $GITHUB_OUTPUT - if: contains(fromJSON('["aries-endorser-agent","aries-endorser-backup","aries-endorser-api","aries-endorser-proxy"]'), matrix.service) - # deploy2dev: # needs: build # env: