Skip to content

Merge pull request #79 from DopplerHQ/nic/fix-helm-push #42

Merge pull request #79 from DopplerHQ/nic/fix-helm-push

Merge pull request #79 from DopplerHQ/nic/fix-helm-push #42

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
jobs:
release:
runs-on: ubuntu-latest
environment: "production"
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- name: Extract Version
id: extract
run: echo "version=${GITHUB_REF#refs/*/v}" >> $GITHUB_OUTPUT
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
push: true
platforms: linux/amd64,linux/arm64
tags: |
dopplerhq/kubernetes-operator:${{ steps.extract.outputs.version }}
dopplerhq/kubernetes-operator:latest
build-args: |
CONTROLLER_VERSION=${{ steps.extract.outputs.version }}
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
- uses: actions/setup-go@v2
with:
go-version: "1.22"
- name: Generate Helm Chart and Recommended YAML
run: make dist charts
env:
VERSION: ${{ steps.extract.outputs.version }}
- name: Upload Recommended YAML
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/recommended.yaml
tag: ${{ github.ref }}
- name: Generate a token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.GH_APP_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}
repositories: helm-charts
- name: Publish Helm Chart
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
gh auth setup-git
./hack/helm/deploy-pages.sh