chore(deps): update dependency uvloop to v0.21.0 #181
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: build-s2i-python-kopf-pr | |
on: | |
pull_request: | |
paths: | |
- build-s2i-python-kopf/** | |
- .github/workflows/build-s2i-python-kopf-pr.yaml | |
# Declare default permissions as read only. | |
permissions: read-all | |
jobs: | |
test: | |
env: | |
CONTEXT_DIR: build-s2i-python-kopf | |
IMAGE_NAME: python-kopf-s2i | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 | |
- name: Check and verify version.json | |
id: check_version | |
uses: redhat-cop/github-actions/get-image-version@e4729075dcd3f34946b80df6b1bfb952b9fee166 # v4 | |
with: | |
IMAGE_CONTEXT_DIR: ${{ env.CONTEXT_DIR }} | |
- name: Update Dockerfile version | |
run: | | |
sed -i -e "s/^FROM .*/FROM ${IMAGE_NAME}:${{ steps.check_version.outputs.VERSION }}/" ${CONTEXT_DIR}/examples/kopf-simple/Dockerfile | |
- name: Build s2i image | |
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 # v2 | |
with: | |
context: ${{ env.CONTEXT_DIR }} | |
dockerfiles: | | |
./${{ env.CONTEXT_DIR }}/Dockerfile | |
image: ${{ env.IMAGE_NAME }} | |
oci: true | |
tags: ${{ steps.check_version.outputs.VERSION }} | |
- name: Build kopf-simple example from s2i image | |
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 # v2 | |
with: | |
context: ${{ env.CONTEXT_DIR }}/examples/kopf-simple | |
dockerfiles: | | |
./${{ env.CONTEXT_DIR }}/examples/kopf-simple | |
image: ${{ env.IMAGE_NAME }}-example | |
oci: true | |
tags: ${{ steps.check_version.outputs.VERSION }} | |
- name: Test image | |
run: | | |
EXAMPLE_IMAGE="${IMAGE_NAME}-example:${{ steps.check_version.outputs.VERSION }}" | |
echo "Checking kopf version..." | |
KOPF_VERSION="$(podman run --entrypoint '/bin/sh' $EXAMPLE_IMAGE -c 'kopf --version')" | |
if [[ "$KOPF_VERSION" != 'kopf, version ${{ steps.check_version.outputs.MINOR_VERSION }}' ]]; then | |
echo "$KOPF_VERSION not expected ${{ steps.check_version.outputs.MINOR_VERSION }}" | |
fi | |
echo "Checking example operator.py..." | |
podman run --entrypoint '/bin/sh' $EXAMPLE_IMAGE -c 'python3 -m py_compile /opt/app-root/operator/operator.py' | |
echo "Check example requirements were installed..." | |
podman run --entrypoint '/bin/sh' $EXAMPLE_IMAGE -c 'python3 -c "import yaml"' |