This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
42 additions
and
78 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,47 +7,30 @@ on: | |
|
||
jobs: | ||
|
||
build: | ||
get-tag: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
tag: ${{ steps.tag.outputs.tag }} | ||
steps: | ||
- name: Get tag | ||
id: tag | ||
uses: dawidd6/action-get-tag@v1 | ||
with: | ||
strip_v: true | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
- name: Build | ||
run: | | ||
export VERSION=${{steps.tag.outputs.tag}} | ||
make build | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: manager | ||
path: ./bin/manager | ||
|
||
package-and-publish-operator: | ||
runs-on: ubuntu-latest | ||
needs: [get-tag] | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Get tag | ||
id: tag | ||
uses: dawidd6/action-get-tag@v1 | ||
with: | ||
strip_v: true | ||
- name: Build melange package | ||
run: | | ||
export VERSION=${{steps.tag.outputs.tag}} | ||
export VERSION=${{needs.get-tag.outputs.tag}} | ||
make melange | ||
- name: Publish apko image | ||
run: | | ||
export VERSION=${{steps.tag.outputs.tag}} | ||
export VERSION=${{needs.get-tag.outputs.tag}} | ||
export IMAGE=registry.replicated.com/library/embedded-cluster-operator-image:${VERSION} | ||
make apko-login \ | ||
REGISTRY=registry.replicated.com \ | ||
|
@@ -58,13 +41,8 @@ jobs: | |
package-and-publish-helmchart: | ||
runs-on: 'ubuntu-20.04' | ||
needs: [package-and-publish-operator] | ||
needs: [get-tag, package-and-publish-operator] | ||
steps: | ||
- name: Get tag | ||
id: tag | ||
uses: dawidd6/action-get-tag@v1 | ||
with: | ||
strip_v: true | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Install Helm | ||
|
@@ -77,7 +55,7 @@ jobs: | |
HELM_USER: ${{secrets.KOTS_HELM_USER_PROD}} | ||
HELM_PASS: ${{secrets.KOTS_HELM_PASS_PROD}} | ||
HELM_REGISTRY: registry.replicated.com | ||
CHART_VERSION: ${{steps.tag.outputs.tag}} | ||
CHART_VERSION: ${{needs.get-tag.outputs.tag}} | ||
run: | | ||
export OPERATOR_IMAGE_NAME=registry.replicated.com/library/embedded-cluster-operator-image | ||
export OPERATOR_IMAGE_TAG=${CHART_VERSION} | ||
|
@@ -87,13 +65,15 @@ jobs: | |
releaser: | ||
runs-on: ubuntu-latest | ||
needs: [build, package-and-publish-helmchart] | ||
needs: [get-tag, package-and-publish-helmchart] | ||
steps: | ||
- uses: imjasonh/[email protected] | ||
- name: Download artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: manager | ||
path: bin/ | ||
run: | | ||
mkdir -p bin | ||
crane export --platform linux/amd64 registry.replicated.com/library/embedded-cluster-operator-image:${{needs.get-tag.outputs.tag}} \ | ||
| tar -Oxf - manager > bin/manager | ||
chmod +x migrations/schemahero | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
|
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
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