Skip to content

chore(release): v0.18.0 (#695) #8

chore(release): v0.18.0 (#695)

chore(release): v0.18.0 (#695) #8

Workflow file for this run

name: release
on:
push:
tags:
- v*
jobs:
bump_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- run: |
sed -i "s/const operatorVersion = \".*\"/const operatorVersion = \"${GITHUB_REF_NAME#v}\"/" main.go
- uses: Amraneze/[email protected]
with:
repository: ${{ github.repository }}
branch_name: main
github_token: ${{ secrets.AIVEN_CI_PAT__VALID_WHILE_ALEKS_IS_EMPLOYED }}
commit_message: "chore(version): bump operator version"
files_to_commit: main.go
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
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_ALEKS_IS_EMPLOYED }}
COMMIT_PREFIX: "chore:"