Bump k8s dependencies: k8s -> v0.30.2, ctrl-run -> v0.18.4 (#673) #538
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and push to quay.io | |
on: | |
push: | |
branches: [ main, release-*, workflow-test ] | |
env: | |
WF_REGISTRY_USER: netobserv+github_ci | |
WF_REGISTRY: quay.io/netobserv | |
WF_IMAGE: network-observability-operator | |
WF_ORG: netobserv | |
WF_MULTIARCH_TARGETS: amd64 arm64 ppc64le s390x | |
WF_VERSION: ${{ github.ref_name }} | |
jobs: | |
push-image: | |
name: push image | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: ['1.22'] | |
steps: | |
- name: install make | |
run: sudo apt-get install make | |
- name: set up go 1.x | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: docker login to quay.io | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ env.WF_REGISTRY_USER }} | |
password: ${{ secrets.QUAY_SECRET }} | |
registry: quay.io | |
- name: get short sha | |
run: echo "short_sha=$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
- name: build images | |
run: | | |
MULTIARCH_TARGETS="${{ env.WF_MULTIARCH_TARGETS }}" IMAGE_ORG=${{ env.WF_ORG }} IMAGE=${{ env.WF_REGISTRY }}/${{ env.WF_IMAGE }}:${{ env.WF_VERSION }} make image-build | |
MULTIARCH_TARGETS="${{ env.WF_MULTIARCH_TARGETS }}" IMAGE_ORG=${{ env.WF_ORG }} IMAGE=${{ env.WF_REGISTRY }}/${{ env.WF_IMAGE }}:${{ env.short_sha }} OCI_BUILD_OPTS="--label quay.expires-after=2w" make image-build | |
- name: push images | |
run: | | |
MULTIARCH_TARGETS="${{ env.WF_MULTIARCH_TARGETS }}" IMAGE_ORG=${{ env.WF_ORG }} IMAGE=${{ env.WF_REGISTRY }}/${{ env.WF_IMAGE }}:${{ env.WF_VERSION }} make image-push | |
MULTIARCH_TARGETS="${{ env.WF_MULTIARCH_TARGETS }}" IMAGE_ORG=${{ env.WF_ORG }} IMAGE=${{ env.WF_REGISTRY }}/${{ env.WF_IMAGE }}:${{ env.short_sha }} make image-push | |
- name: build and push manifest | |
run: | | |
MULTIARCH_TARGETS="${{ env.WF_MULTIARCH_TARGETS }}" IMAGE_ORG=${{ env.WF_ORG }} IMAGE=${{ env.WF_REGISTRY }}/${{ env.WF_IMAGE }}:${{ env.WF_VERSION }} make manifest-build manifest-push | |
MULTIARCH_TARGETS="${{ env.WF_MULTIARCH_TARGETS }}" IMAGE_ORG=${{ env.WF_ORG }} IMAGE=${{ env.WF_REGISTRY }}/${{ env.WF_IMAGE }}:${{ env.short_sha }} make manifest-build manifest-push | |
- name: build bundle | |
run: IMAGE_ORG=${{ env.WF_ORG }} VERSION=${{ env.WF_VERSION }} PLG_VERSION=${{ env.WF_VERSION }} FLP_VERSION=${{ env.WF_VERSION }} BPF_VERSION=${{ env.WF_VERSION }} BUNDLE_VERSION=0.0.0-${{ env.WF_VERSION }} make bundle bundle-build | |
- name: push bundle to quay.io | |
run: IMAGE_ORG=${{ env.WF_ORG }} BUNDLE_VERSION=0.0.0-${{ env.WF_VERSION }} make bundle-push | |
- name: build catalog | |
run: IMAGE_ORG=${{ env.WF_ORG }} BUNDLE_VERSION=0.0.0-${{ env.WF_VERSION }} make catalog-build | |
- name: push catalog to quay.io | |
run: IMAGE_ORG=${{ env.WF_ORG }} BUNDLE_VERSION=0.0.0-${{ env.WF_VERSION }} make catalog-push | |
codecov: | |
name: Codecov upload | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: ['1.22'] | |
steps: | |
- name: install make | |
run: sudo apt-get install make | |
- name: set up go 1.x | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Test | |
run: make test | |
- name: Report coverage | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
files: ./cover.out | |
flags: unittests | |
fail_ci_if_error: true | |
verbose: true |