Skip to content

Commit

Permalink
Add gh workflow to build&push container
Browse files Browse the repository at this point in the history
Signed-off-by: Ondra Machacek <[email protected]>
  • Loading branch information
machacekondra committed Oct 2, 2024
1 parent 698d09b commit 30eaef1
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build-push-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build and push images

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build_push:
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: Checkout forklift
uses: actions/checkout@v4

- name: Login to quay.io with bot account
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_TOKEN }}

- name: Build and push images to quay.io
run: |
cd ${GITHUB_WORKSPACE}
make build-containers
make push-containers

0 comments on commit 30eaef1

Please sign in to comment.