-
Notifications
You must be signed in to change notification settings - Fork 20
73 lines (71 loc) · 2.32 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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@v6
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:"