Skip to content

NETOBSERV-1616: collect flow metric object from netobserv ns (#13) #12

NETOBSERV-1616: collect flow metric object from netobserv ns (#13)

NETOBSERV-1616: collect flow metric object from netobserv ns (#13) #12

name: Build and Push Images
on:
push:
branches:
- main
- release-*
jobs:
build_push:
if: (github.repository == 'netobserv/must-gather')
name: Build and Push Images
runs-on: ubuntu-latest
env:
REGISTRY_USERNAME: netobserv+github_ci
REGISTRY_PASSWORD: ${{ secrets.QUAY_SECRET }}
REGISTRY_NAMESPACE: netobserv
steps:
- name: Checkout the latest code
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Check build
run: |
make lint MUST_GATHER_IMAGE=$REGISTRY_NAMESPACE/must-gather
- name: Build image
run: |
make image-build MUST_GATHER_IMAGE=$REGISTRY_NAMESPACE/must-gather
- name: podman login to quay.io
uses: redhat-actions/podman-login@v1
with:
username: ${{ env.REGISTRY_USERNAME }}
password: ${{ env.REGISTRY_PASSWORD }}
registry: quay.io
- name: get short sha
run: |
echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_ENV
- name: Push image
run: |
IMAGE_TAG=${{ env.short_sha }}
make build MUST_GATHER_IMAGE=$REGISTRY_NAMESPACE/must-gather