Skip to content

use numeric user to avoid security errors, bump to 0.1.1 in preparation for operator hub submission #214

use numeric user to avoid security errors, bump to 0.1.1 in preparation for operator hub submission

use numeric user to avoid security errors, bump to 0.1.1 in preparation for operator hub submission #214

Workflow file for this run

name: ci
on:
push:
branches:
- main
- release/*
- snapshot/*
tags:
- v*
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.ref_name != 'main' }}
jobs:
build:
name: "go and github release"
runs-on: ubuntu-latest
permissions:
contents: write
env:
# This env is required for the docker manifest command to work
DOCKER_CLI_EXPERIMENTAL: "enabled"
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: perses/github-actions@v0.9.0
- uses: ./.github/perses-ci/actions/setup_environment
with:
enable_go: true
- # Add support for more platforms with QEMU (optional)
# https://github.com/docker/setup-qemu-action
name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
if: ${{ github.event_name == 'push' && (startsWith(github.ref_name, 'v') || github.ref_name == 'main') }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login with podman
uses: redhat-actions/podman-login@v1
if: ${{ github.event_name == 'push' && (startsWith(github.ref_name, 'v') || github.ref_name == 'main') }}
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: "docker.io"
- name: install goreleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
install-only: true
- name: Build Go binaries and docker images
run: |
make cross-build
make bundle-build
- name: Publish Release and binaries
## This step will only run when a new tag is pushed.
## It will build the Go binaries and the docker images and then publish:
## - the GitHub release with the archive built
## - docker images on the different docker registry selected
if: ${{ github.event_name == 'push' && startsWith(github.ref_name, 'v') }}
run: |
make cross-release
make bundle-push
make catalog-build
make catalog-push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}