Skip to content

Commit

Permalink
fix: broken release candidate workflow (#306)
Browse files Browse the repository at this point in the history
This commit fixes the broken candidate release workflow by incorporating
the candidate release workflow into the main `release` workflow. This
modifies the graphs as follows

e2e-test -> <release-pr?> ┳━ yes ━▸  create-gh-pre-release -> publish-olm-candidate
                          ┃
                          ┗━ no ━▸  publish-olm-development

Signed-by: sthaha@redhat.com
  • Loading branch information
sthaha authored Jul 4, 2023
1 parent d0d4c74 commit 56f9e2c
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 41 deletions.
40 changes: 0 additions & 40 deletions .github/workflows/olm-candidate.yaml

This file was deleted.

58 changes: 58 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ jobs:
with:
quay_login: ${{ secrets.QUAY_LOGIN }}
quay_token: ${{ secrets.QUAY_TOKEN }}
go-version: ${{ env.go-version }}

- name: Push catalog index changes
uses: ad-m/github-push-action@master
Expand Down Expand Up @@ -127,3 +128,60 @@ jobs:
bodyFile: RELEASE_BODY.md
# NOTE: We always generate pre-releases and mark them as releases manually
prerelease: true

publish-olm-candidate:
needs:
- create-github-prerelease
runs-on: ubuntu-latest
environment: quay
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.REPOSITORY_PUSH_TOKEN }}

- name: Import common environment variables
run: cat ".github/env" >> "$GITHUB_ENV"

- name: Setup Go environment
uses: actions/setup-go@v3
with:
go-version: ${{ env.go-version }}
check-latest: true
cache: true

- name: Set version
id: version
run: |
version="$(cat VERSION)-rc"
echo "version=$version" >> "$GITHUB_OUTPUT"
- name: publish catalog
uses: ./.github/olm-publish
env:
IMAGE_BASE: ${{ secrets.IMAGE_BASE }}
VERSION: ${{ steps.version.outputs.version }}
CHANNELS: candidate,development
DEFAULT_CHANNEL: candidate
RELEASE_SHA: ${GITHUB_SHA}
with:
quay_login: ${{ secrets.QUAY_LOGIN }}
quay_token: ${{ secrets.QUAY_TOKEN }}
go-version: ${{ env.go-version }}

- name: Push catalog index changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.REPOSITORY_PUSH_TOKEN }}
branch: olm-catalog

- name: Publish Package
uses: ./.github/package-operator-publish
env:
IMAGE_BASE: ${{ secrets.IMAGE_BASE }}
VERSION: ${{ steps.version.outputs.version }}
with:
quay_login: ${{ secrets.QUAY_LOGIN }}
quay_token: ${{ secrets.QUAY_TOKEN }}
go-version: ${{ env.go-version }}
2 changes: 1 addition & 1 deletion .versionrc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
}
],
"scripts": {
"postbump": "make bundle && git add bundle deploy/olm/kustomization.yaml deploy/operator/kustomization.yaml"
"postbump": "make bundle && git add bundle deploy/package-operator/operator/kustomization.yaml deploy/olm/kustomization.yaml deploy/operator/kustomization.yaml"
}
}

0 comments on commit 56f9e2c

Please sign in to comment.