From 84406783d359ba5e238cd0255c2debf7c5fa279a Mon Sep 17 00:00:00 2001 From: Rajpal Chauhan Date: Fri, 19 Jan 2024 14:11:36 -0800 Subject: [PATCH] TEST Signed-off-by: Rajpal Chauhan --- .github/workflows/main.yaml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 5774d3ff..c4f1258a 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -14,7 +14,7 @@ env: GITHUB_IMAGE_REPO: ghcr.io/rajpalc7/dts-endorser-service OPENSHIFT_IMAGE_REPO: image-registry.apps.silver.devops.gov.bc.ca/4a9599-tools APP_NAMES: aries-endorser-agent,aries-endorser-db,aries-endorser-backup,aries-endorser-proxy,aries-endorser-api - + TAGS: v1 {{ github.sha}} jobs: build: if: (github.repository == 'rajpalc7/dts-endorser-service') || (github.event_name == 'workflow_dispatch') @@ -96,7 +96,7 @@ jobs: # labels: ${{ steps.meta.outputs.labels }} # cache-from: type=gha # cache-to: type=gha,mode=max - # if: contains(['aries-endorser-agent','aries-endorser-backup','aries-endorser-api'], ${{ matrix.service }} ) + # if: contains(fromJSON(['aries-endorser-agent','aries-endorser-backup','aries-endorser-api']), ${{ matrix.service }} ) - name: Setup and Build id: build_image @@ -106,29 +106,30 @@ jobs: # Builder image for a java project builder_image: ${{ matrix.BUILDER_IMAGE }} image: ghcr.io/rajpalc7/dts-endorser-service/${{ matrix.service }} - tags: ${{ steps.meta.outputs.tags }} - if: contains(['aries-endorser-db'], ${{ matrix.service }} ) + tags: ${{ env.TAGS }} + if: contains(fromJson(['aries-endorser-db']), ${{ matrix.service }} ) - name: Push image id: push uses: redhat-actions/push-to-registry@v2 with: - tags: "${{ steps.build-image.outputs.image }}:${{ steps.build-image.outputs.tags }}" + tags: ${{ steps.build_image.outputs.tags }} + image: ${{ steps.build_image.outputs.image }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - if: contains(['aries-endorser-db'], ${{ matrix.service }} ) + if: contains(fromJSON(['aries-endorser-db']), ${{ matrix.service }} ) - name: Print image url run: | echo "registry_path=${{ steps.push.outputs.registry-paths }}" echo "digest=${{ steps.push.outputs.digest }}" - if: contains(['aries-endorser-db'], ${{ matrix.service }} ) + if: contains(fromJson(['aries-endorser-db']), ${{ matrix.service }} ) - name: Display image results run: | echo 'imageid=${{ steps.docker_build.outputs.imageid }}' echo 'digest=${{ steps.docker_build.outputs.digest }}' - if: contains([' aries-endorser-agent','aries-endorser-backup','aries-endorser-api'], ${{ matrix.service }} ) + if: contains(fromJSON([' aries-endorser-agent','aries-endorser-backup','aries-endorser-api']), ${{ matrix.service }} ) deploy2dev: