Skip to content

Commit 56f9e2c

Browse files
authored
fix: broken release candidate workflow (#306)
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: [email protected]
1 parent d0d4c74 commit 56f9e2c

File tree

3 files changed

+59
-41
lines changed

3 files changed

+59
-41
lines changed

.github/workflows/olm-candidate.yaml

-40
This file was deleted.

.github/workflows/release.yaml

+58
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
with:
6161
quay_login: ${{ secrets.QUAY_LOGIN }}
6262
quay_token: ${{ secrets.QUAY_TOKEN }}
63+
go-version: ${{ env.go-version }}
6364

6465
- name: Push catalog index changes
6566
uses: ad-m/github-push-action@master
@@ -127,3 +128,60 @@ jobs:
127128
bodyFile: RELEASE_BODY.md
128129
# NOTE: We always generate pre-releases and mark them as releases manually
129130
prerelease: true
131+
132+
publish-olm-candidate:
133+
needs:
134+
- create-github-prerelease
135+
runs-on: ubuntu-latest
136+
environment: quay
137+
steps:
138+
- name: Checkout
139+
uses: actions/checkout@v3
140+
with:
141+
fetch-depth: 0
142+
token: ${{ secrets.REPOSITORY_PUSH_TOKEN }}
143+
144+
- name: Import common environment variables
145+
run: cat ".github/env" >> "$GITHUB_ENV"
146+
147+
- name: Setup Go environment
148+
uses: actions/setup-go@v3
149+
with:
150+
go-version: ${{ env.go-version }}
151+
check-latest: true
152+
cache: true
153+
154+
- name: Set version
155+
id: version
156+
run: |
157+
version="$(cat VERSION)-rc"
158+
echo "version=$version" >> "$GITHUB_OUTPUT"
159+
160+
- name: publish catalog
161+
uses: ./.github/olm-publish
162+
env:
163+
IMAGE_BASE: ${{ secrets.IMAGE_BASE }}
164+
VERSION: ${{ steps.version.outputs.version }}
165+
CHANNELS: candidate,development
166+
DEFAULT_CHANNEL: candidate
167+
RELEASE_SHA: ${GITHUB_SHA}
168+
with:
169+
quay_login: ${{ secrets.QUAY_LOGIN }}
170+
quay_token: ${{ secrets.QUAY_TOKEN }}
171+
go-version: ${{ env.go-version }}
172+
173+
- name: Push catalog index changes
174+
uses: ad-m/github-push-action@master
175+
with:
176+
github_token: ${{ secrets.REPOSITORY_PUSH_TOKEN }}
177+
branch: olm-catalog
178+
179+
- name: Publish Package
180+
uses: ./.github/package-operator-publish
181+
env:
182+
IMAGE_BASE: ${{ secrets.IMAGE_BASE }}
183+
VERSION: ${{ steps.version.outputs.version }}
184+
with:
185+
quay_login: ${{ secrets.QUAY_LOGIN }}
186+
quay_token: ${{ secrets.QUAY_TOKEN }}
187+
go-version: ${{ env.go-version }}

.versionrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@
99
}
1010
],
1111
"scripts": {
12-
"postbump": "make bundle && git add bundle deploy/olm/kustomization.yaml deploy/operator/kustomization.yaml"
12+
"postbump": "make bundle && git add bundle deploy/package-operator/operator/kustomization.yaml deploy/olm/kustomization.yaml deploy/operator/kustomization.yaml"
1313
}
1414
}

0 commit comments

Comments
 (0)