Skip to content

Fix codecov-action params (#347) #738

Fix codecov-action params (#347)

Fix codecov-action params (#347) #738

Workflow file for this run

name: Deploy
on:
merge_group:
push:
branches:
- 'main'
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@v4
with:
fetch-depth: 0
- name: gpg init
if: github.ref_type == 'tag'
run: .ci/gpg/create-keyring.sh
env:
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: "go.mod"
id: go
- name: Create release
run: |
if [[ $GITHUB_REF == refs/tags/* ]]; then
export GORELEASER_ARGS="--clean"
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@v4
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@v3
- name: Login to Quay
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_PASSWORD }}
registry: quay.io
- name: Build helm-operator image
uses: docker/build-push-action@v5
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 }}