v0.5.3 #91
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: Release SAPBTP Operator | |
on: | |
release: | |
types: [published] | |
jobs: | |
release: | |
name: Release SAPBTP Operator | |
runs-on: ubuntu-latest | |
env: | |
TAG_NAME: ${{ github.event.release.tag_name }} | |
CHART_URL: https://github.com/SAP/sap-btp-service-operator/releases/download/${{ github.event.release.tag_name }}/sap-btp-operator-${{ github.event.release.tag_name }}.tgz | |
CHART_TGZ_NAME: sap-btp-operator-${{ github.event.release.tag_name }}.tgz | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
repository: sap/sap-btp-service-operator/controller | |
username: ${{ secrets.OPERATOR_USER }} | |
password: ${{ secrets.OPERATOR_PAT }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: ghcr.io/sap/sap-btp-service-operator/controller:${{ github.event.release.tag_name }} | |
- name: Install kustomize | |
uses: imranismail/setup-kustomize@v1 | |
with: | |
kustomize-version: 3.1.0 | |
- name: Prepare SAPBTP Operator charts | |
run: make helm-charts | |
- name: Install helm | |
uses: azure/setup-helm@v1 | |
with: | |
version: v3.4.0 | |
- name: Run chart-releaser | |
run: | | |
sed -i -e 's/tag: master/tag: '${TAG_NAME:-master}'/g' ./sapbtp-operator-charts/values.yaml | sh | |
mkdir out | |
helm package --app-version ${TAG_NAME} --version ${TAG_NAME} -d ./out sapbtp-operator-charts | |
wget https://sap.github.io/sap-btp-service-operator/index.yaml | |
helm repo index ./out --merge index.yaml | |
sed -i "s|${CHART_TGZ_NAME}|${CHART_URL}|g" ./out/index.yaml | sh | |
mv ./hack/kubectl-sapbtp ./out/kubectl-sapbtp | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: out/* | |
tag: ${{ github.event.release.tag_name }} | |
overwrite: true | |
file_glob: true | |