Skip to content

Update OWNERS

Update OWNERS #114

Workflow file for this run

name: Build Main
on:
push:
branches: [ main, ghactions ]
jobs:
build-main:
name: Build and push a main snapshot image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
cache: false
go-version-file: go.mod
id: go
- name: Set release version
run: |
RELEASE_TAG=$(gh --repo "${GITHUB_REPOSITORY}" release list \
--json name,isLatest \
--jq '.[] | select(.isLatest) | .name')
if [ -z "${RELEASE_TAG}" ]; then
RELEASE_TAG="0.0.0"
fi
echo "RELEASE_TAG=${RELEASE_TAG}" | tee -a "${GITHUB_ENV}"
env:
GH_TOKEN: ${{ github.token }}
- name: Set image registry env
run: |
echo IMAGE_REGISTRY=$(echo ${{ secrets.IMAGE_REGISTRY }} | cut -d '/' -f 1) >> $GITHUB_ENV
echo IMAGE_REPO=$(echo ${{ secrets.IMAGE_REGISTRY }} | cut -d '/' -f 2) >> $GITHUB_ENV
- name: Build Operator Image
id: build-operator-image
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 # v2.13
with:
image: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPO }}/operator-certification-operator
tags: ${{ github.sha }} latest
build-args: |
quay_expiration=1w
release_tag=${{ env.RELEASE_TAG }}
dockerfiles: |
./Dockerfile
- name: Push Operator Image
id: push-operator-image
uses: redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c # v2.8
with:
image: operator-certification-operator
tags: ${{ steps.build-operator-image.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPO }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- name: Build Bundle
id: build-bundle
run: |
IMAGE_REGISTRY=${{ env.IMAGE_REGISTRY }} \
IMAGE_REPO=${{ env.IMAGE_REPO }} \
RELEASE_TAG=${{ env.RELEASE_TAG }} \
VERSION=${{ env.RELEASE_TAG }} \
make bundle
- name: Build Bundle Image
id: build-bundle-image
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 # v2.13
with:
image: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPO }}/operator-certification-operator-bundle
tags: latest
dockerfiles: |
./bundle.Dockerfile
- name: Push Bundle Image
id: push-bundle-image
uses: redhat-actions/push-to-registry@5ed88d269cf581ea9ef6dd6806d01562096bee9c # v2.8
with:
image: operator-certification-operator-bundle
tags: ${{ steps.build-bundle-image.outputs.tags }}
registry: ${{ env.IMAGE_REGISTRY }}/${{ env.IMAGE_REPO }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_PASSWORD }}
- run: echo "Operator Image pushed to ${{ steps.push-operator-image.outputs.registry-paths }}"
- run: echo "Bundle Image pushed to ${{ steps.push-bundle-image.outputs.registry-paths }}"