Merge pull request #228 from 3scale-ops/konflux/references/main #128
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 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: "1.20.14" | |
- name: Build image | |
run: make docker-build | |
- name: Export release name | |
run: | | |
echo "NEW_RELEASE=$(make get-new-release)" >> $GITHUB_ENV | |
- name: Login to quay.io/3scale | |
if: ${{ env.NEW_RELEASE != '' }} | |
uses: docker/login-action@v2 | |
with: | |
registry: quay.io | |
username: ${{ secrets.REGISTRY_USER }} | |
password: ${{ secrets.REGISTRY_PASSWORD }} | |
- name: Push new operator image | |
if: ${{ env.NEW_RELEASE != '' }} | |
run: make docker-push | |
- name: Publish new bundle image in marin3r index | |
if: ${{ env.NEW_RELEASE != '' }} | |
run: make bundle-publish | |
- name: Create a new draft-release in github | |
if: ${{ env.NEW_RELEASE != '' }} | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "${{ env.NEW_RELEASE }}" | |
title: "${{ env.NEW_RELEASE }}" | |
draft: true |