This repository has been archived by the owner on Aug 29, 2024. It is now read-only.
omitempty #105
Workflow file for this run
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
name: publish-production | |
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
- 'v[0-9]+.[0-9]+.[0-9]+\-build\.[0-9]+' | |
jobs: | |
package-and-publish-operator: | |
runs-on: ubuntu-latest | |
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: Login to registry | |
uses: docker/login-action@v3 | |
with: | |
registry: registry.replicated.com | |
username: ${{secrets.KOTS_HELM_USER_PROD}} | |
password: ${{secrets.KOTS_HELM_PASS_PROD}} | |
- name: Docker Image | |
uses: docker/build-push-action@v6 | |
with: | |
push: true | |
tags: | | |
registry.replicated.com/library/embedded-cluster-operator-image:${{steps.tag.outputs.tag}} | |
package-and-publish-helmchart: | |
runs-on: 'ubuntu-20.04' | |
needs: 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 | |
uses: azure/setup-helm@v4 | |
with: | |
version: v3.8.1 | |
- name: Run Package and Publish | |
working-directory: charts/embedded-cluster-operator | |
env: | |
HELM_USER: ${{secrets.KOTS_HELM_USER_PROD}} | |
HELM_PASS: ${{secrets.KOTS_HELM_PASS_PROD}} | |
CHART_VERSION: ${{steps.tag.outputs.tag}} | |
run: | | |
export OPERATOR_VERSION=${CHART_VERSION%-*} | |
export OPERATOR_TAG=${OPERATOR_VERSION} | |
export OPERATOR_REGISTRY=registry.replicated.com | |
envsubst < Chart.yaml.tmpl > Chart.yaml | |
envsubst < values.yaml.tmpl > values.yaml | |
rm -f *.tmpl | |
export CHART_NAME=`helm package . | rev | cut -d/ -f1 | rev` | |
echo pushing ${CHART_NAME} to production | |
helm registry login registry.replicated.com --username $HELM_USER --password $HELM_PASS | |
helm push $CHART_NAME oci://registry.replicated.com/library | |
releaser: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version-file: go.mod | |
- name: Build linux-amd64 | |
run: | | |
make build | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
bin/manager |