Skip to content

Commit

Permalink
Fix upstream build and push CI job
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Necas <[email protected]>
  • Loading branch information
mnecas committed Jan 20, 2025
1 parent 9d052da commit fba48dc
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 16 deletions.
63 changes: 49 additions & 14 deletions .github/workflows/build-push-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,60 @@ 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
# Set tag 'latest' on main branch
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

Expand All @@ -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 }}
2 changes: 0 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]

Expand Down

0 comments on commit fba48dc

Please sign in to comment.