Skip to content

Commit

Permalink
bump build-and-push action version, remove deprecated set-output (scl…
Browse files Browse the repository at this point in the history
…org#265)

New version of build-and-push changes approach to suffix of the
image. The suffix is no longer an input, instead image name input was
introduced. As this action run build-and-push for either s2i-core and s2i-base
image, the image name can not be set directly in the matrix. For that
reason the image name is constructed when calling build-and-push with
prefix and suffix. Hence the added dash in the suffix string.
The suffix is not relevant for Fedora images.
  • Loading branch information
zmiklank committed May 17, 2023
1 parent be16b11 commit 5d58081
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ jobs:
tag: "centos7"
quayio_username: "QUAY_IMAGE_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_BUILDER_TOKEN"
suffix: "centos7"
suffix: "-centos7"
- dockerfile: "Dockerfile.c9s"
registry_namespace: "sclorg"
tag: "c9s"
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"
suffix: "c9s"
suffix: "-c9s"
- dockerfile: "Dockerfile.c8s"
registry_namespace: "sclorg"
tag: "c8s"
quayio_username: "QUAY_IMAGE_SCLORG_BUILDER_USERNAME"
quayio_token: "QUAY_IMAGE_SCLORG_BUILDER_TOKEN"
suffix: "c8s"
suffix: "-c8s"
- dockerfile: "Dockerfile.fedora"
registry_namespace: "fedora"
quayio_username: "QUAY_IMAGE_FEDORA_BUILDER_USERNAME"
Expand All @@ -52,28 +52,26 @@ jobs:
else
_tag=${{ matrix.tag }}
fi
echo "::set-output name=tag::${_tag}"
echo "tag=${_tag}" >> $GITHUB_OUTPUT
- name: Build and push s2i-core to quay.io registry
uses: sclorg/build-and-push-action@v2
uses: sclorg/build-and-push-action@v4
with:
registry: "quay.io"
registry_namespace: ${{ matrix.registry_namespace }}
registry_username: ${{ secrets[matrix.quayio_username] }}
registry_token: ${{ secrets[matrix.quayio_token] }}
dockerfile: ${{ matrix.dockerfile }}
dockerfile_path: "core"
suffix: ${{ matrix.suffix }}
dockerfile: "core/${{ matrix.dockerfile }}"
image_name: "s2i-core${{ matrix.suffix }}"
tag: ${{ steps.tag.outputs.tag }}

- name: Build and push s2i-base to quay.io registry
uses: sclorg/build-and-push-action@v2
uses: sclorg/build-and-push-action@v4
with:
registry: "quay.io"
registry_namespace: ${{ matrix.registry_namespace }}
registry_username: ${{ secrets[matrix.quayio_username] }}
registry_token: ${{ secrets[matrix.quayio_token] }}
dockerfile: ${{ matrix.dockerfile }}
dockerfile_path: "base"
suffix: ${{ matrix.suffix }}
dockerfile: "base/${{ matrix.dockerfile }}"
image_name: "s2i-base${{ matrix.suffix }}"
tag: ${{ steps.tag.outputs.tag }}

0 comments on commit 5d58081

Please sign in to comment.