Skip to content

Merge pull request #745 from aiven/rriski-release-v0.20.0 #13

Merge pull request #745 from aiven/rriski-release-v0.20.0

Merge pull request #745 from aiven/rriski-release-v0.20.0 #13

Workflow file for this run

name: release
on:
push:
tags:
- v*
jobs:
build_default_release_manifest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: action_vars
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- shell: bash
run: |
echo "resources: [manager.yaml]
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
images:
- name: controller
newName: aivenoy/aiven-operator
newTag: ${{ steps.action_vars.outputs.tag }}
" > config/manager/kustomization.yaml
- uses: karancode/kustomize-github-action@master
with:
kustomize_version: 4.5.7
kustomize_build_dir: config/default
kustomize_output_file: deployment.yaml
# TODO: remove token once https://github.com/karancode/kustomize-github-action/issues/46 is resolved
token: ${{ github.token }}
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_ACCESS_TOKEN }}
- uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: deployment.yaml
asset_name: deployment.yaml
tag: ${{ github.ref }}
build_and_push_docker_image:
runs-on: ubuntu-latest
steps:
- id: action_vars
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- id: docker_build
uses: docker/build-push-action@v5
with:
push: true
platforms: linux/amd64,linux/arm64
tags: aivenoy/aiven-operator:${{ steps.action_vars.outputs.tag }}
build-args: |
VERSION=${{ steps.action_vars.outputs.tag }}
sync-charts:
needs:
- build_default_release_manifest
- build_and_push_docker_image
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: BetaHuhn/repo-file-sync-action@v1
with:
GH_PAT: ${{ secrets.AIVEN_CI_PAT__VALID_WHILE_TIMO_IS_EMPLOYED }}
COMMIT_PREFIX: "chore:"