Skip to content

fix: fix a broken method on main branch #443

fix: fix a broken method on main branch

fix: fix a broken method on main branch #443

Workflow file for this run

name: Deploy
on:
push:
branches:
- '**'
tags:
- 'v*'
pull_request:
branches: [ main ]
jobs:
goreleaser:
name: GoReleaser
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: gpg init
if: github.event_name != 'pull_request'
run: .ci/gpg/create-keyring.sh
env:
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
- name: Install Go
uses: actions/setup-go@v3
with:
go-version: ~1.20
- name: Create release
run: |
if [[ $GITHUB_REF == refs/tags/* ]]; then
export GORELEASER_ARGS="--rm-dist"
fi
make release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
docker:
# TODO(fabianvf): skip pushing images for now, reenable once we're
# working on migrating the official helm plugin here
if: ${{ false }}
name: Docker
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Prepare
id: prep
run: |
IMG=quay.io/operator-framework/helm-operator
if [[ $GITHUB_REF == refs/tags/* ]]; then
TAG=${GITHUB_REF#refs/tags/}
MAJOR_MINOR=${TAG%.*}
echo ::set-output name=tags::${IMG}:${TAG},${IMG}:${MAJOR_MINOR}
elif [[ $GITHUB_REF == refs/heads/* ]]; then
TAG=$(echo ${GITHUB_REF#refs/heads/} | sed -r 's#/+#-#g')
if [ "${{ github.event.repository.default_branch }}" = "$TAG" ]; then
TAG=edge
fi
echo ::set-output name=tags::${IMG}:${TAG}
elif [[ $GITHUB_REF == refs/pull/* ]]; then
TAG=pr-${{ github.event.number }}
echo ::set-output name=tags::${IMG}:${TAG}
fi
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to Quay
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
registry: quay.io
- name: Build helm-operator image
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64,linux/ppc64le,linux/s390x
push: ${{ (github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main')) }}
tags: ${{ steps.prep.outputs.tags }}