diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index ea8f37f5..15b8932f 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -62,6 +62,14 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 + + - name: Pull base image + id: pull_build_image + run: | + docker pull $builder_image + env: + builder_image: ${{ matrix.BUILDER_IMAGE }} + - name: Log in to the GHCR uses: docker/login-action@v2 with: @@ -84,7 +92,7 @@ jobs: type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} type=sha,value=latest - if: contains(fromJSON('["aries-endorser-agent","aries-endorser-backup","aries-endorser-api"]'), '$service') + if: contains(fromJSON('["aries-endorser-agent","aries-endorser-backup","aries-endorser-api"]'), ${{ env.service }}) env: service: ${{ matrix.service }} # - name: Build and push Docker image @@ -100,12 +108,7 @@ jobs: # cache-to: type=gha,mode=max # if: contains(fromJSON(['aries-endorser-agent','aries-endorser-backup','aries-endorser-api']), ${{ matrix.service }} ) - - name: Pull base image - id: pull_build_image - run: | - docker pull $builder_image - env: - builder_image: ${{ matrix.BUILDER_IMAGE }} + - name: Setup and Build id: build_image uses: redhat-actions/s2i-build@v2