From fba48dc990b0d601e0e38c2bb2b086d025797410 Mon Sep 17 00:00:00 2001 From: Martin Necas Date: Mon, 20 Jan 2025 13:43:05 +0100 Subject: [PATCH] Fix upstream build and push CI job Signed-off-by: Martin Necas --- .github/workflows/build-push-images.yml | 63 +++++++++++++++++++------ .github/workflows/pull-request.yml | 2 - 2 files changed, 49 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-push-images.yml b/.github/workflows/build-push-images.yml index cd9d9367e..4d2393ea7 100644 --- a/.github/workflows/build-push-images.yml +++ b/.github/workflows/build-push-images.yml @@ -5,10 +5,53 @@ on: branches: - main - release-* + pull_request: + branches: + - main workflow_dispatch: jobs: build_push: + strategy: + fail-fast: false + matrix: + include: + - name: forklift-api + file: build/forklift-api/Containerfile + repo: forklift-api + - name: forklift-controller + file: build/forklift-controller/Containerfile + repo: forklift-controller + - name: forklift-operator + file: build/forklift-operator/Containerfile + repo: forklift-operator + - name: forklift-operator-bundle + file: build/forklift-operator-bundle/Containerfile + repo: forklift-operator-bundle + - name: forklift-operator-index + file: build/forklift-operator-index/Containerfile + repo: forklift-operator-index + - name: openstack-populator + file: build/openstack-populator/Containerfile + repo: openstack-populator + - name: openstack-populator + file: build/openstack-populator/Containerfile + repo: openstack-populator + - name: ova-provider-server + file: build/ova-provider-server/Containerfile + repo: ova-provider-server + - name: ovirt-populator + file: build/ovirt-populator/Containerfile-upstream + repo: ovirt-populator + - name: populator-controller + file: build/populator-controller/Containerfile + repo: populator-controller + - name: forklift-validation + file: build/validation/Containerfile + repo: forklift-validation + - name: virt-v2v + file: build/virt-v2v/Containerfile-upstream + repo: forklift-virt-v2v runs-on: ubuntu-latest env: REGISTRY: quay.io @@ -16,16 +59,6 @@ jobs: REGISTRY_TAG: ${{ (github.head_ref||github.ref_name)=='main' && 'latest' || (github.head_ref||github.ref_name) }} REGISTRY_ORG: kubev2v steps: - - name: Free Disk Space (Ubuntu) - uses: jlumbroso/free-disk-space@main - with: - tool-cache: false - android: true - dotnet: true - haskell: true - large-packages: false - swap-storage: false - docker-images: false - name: Checkout forklift uses: actions/checkout@v4 @@ -36,7 +69,9 @@ jobs: username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_TOKEN }} - - name: Build and push images to quay.io - run: | - cd ${GITHUB_WORKSPACE} - make push-all-images + - name: Build and push ${{ matrix.name }} image to quay.io + uses: docker/build-push-action@v6 + with: + push: true + file: "${{ matrix.file }}" + tags: quay.io/mnecas0/${{ matrix.repo }}:${{ env.REGISTRY_TAG }} diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index fc2bc51a8..7d53cbfc8 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -4,8 +4,6 @@ name: CI # Controls when the action will run. on: # Triggers the workflow on push or pull request events but only for the main branch - push: - branches: [ main ] pull_request: branches: [ main ]