From 9a09107494ab6a2b726be5bfb1c26b21add1fd88 Mon Sep 17 00:00:00 2001 From: Xiaofeng Wang Date: Sun, 28 Jan 2024 22:17:57 +0800 Subject: [PATCH] ci: add build test runner container image ci --- .github/workflows/build-runner.yml | 23 +++++++++++++++++++++++ tools/Dockerfile | 11 +++++------ 2 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/build-runner.yml diff --git a/.github/workflows/build-runner.yml b/.github/workflows/build-runner.yml new file mode 100644 index 0000000..f73defa --- /dev/null +++ b/.github/workflows/build-runner.yml @@ -0,0 +1,23 @@ +--- +name: Build test runner container + +on: + workflow_dispatch: + +jobs: + build-upload: + # Do not run this job on any fork repos + if: github.repository == 'virt-s1/bootc-workflow-test' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Build container + run: | + sudo apt-get install -y podman + podman build -t bootc-test-runner:x86_64 -f tools/Dockerfile tools + podman push --creds "$QUAY_USERNAME":"$QUAY_PASSWORD" bootc-test-runner:x86_64 quay.io/rhel-edge/bootc-test-runner:x86_64 + podman push --creds "$QUAY_USERNAME":"$QUAY_PASSWORD" bootc-test-runner:x86_64 quay.io/rhel-edge/bootc-test-runner:latest + env: + QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} + QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} diff --git a/tools/Dockerfile b/tools/Dockerfile index 143e76d..4a779a5 100644 --- a/tools/Dockerfile +++ b/tools/Dockerfile @@ -8,21 +8,20 @@ RUN dnf -y update && \ ansible-core \ beaker-client \ curl \ + gcc \ google-cloud-cli \ net-tools \ + podman \ procps-ng \ python3 \ python3-devel \ - python3-pip && \ + python3-pip \ + skopeo \ + unzip && \ dnf clean all && \ pip install boto3 botocore openstacksdk && \ ansible-galaxy collection install openstack.cloud community.general amazon.aws ansible.posix && \ curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ unzip awscliv2.zip && \ ./aws/install && \ - aws --version && \ rm -rf aws awscliv2.zip && \ - ansible --version && \ - ansible-galaxy collection list && \ - gcloud --version && \ - pip list