-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (39 loc) · 1.49 KB
/
publish.yaml
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
name: Publish
on:
push:
tags:
- v**
jobs:
publish-ecr:
runs-on: self-hosted
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::558830342743:role/PublishCleanerController
role-session-name: github-actions-from-cleaner-controller
aws-region: us-east-1
- name: Login to Amazon ECR Public
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@v2
with:
registry-type: public
- uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Build, tag, and push docker image to Amazon ECR Public
uses: int128/kaniko-action@v1
with:
push: true
tags: ${{ steps.login-ecr-public.outputs.registry }}/f8y0w2c4/cleaner-controller:${{ github.ref_name }}
- name: Publish helm chart
run: |
make helm VERSION=manager-${{ github.ref_name }}
# latest v3.13.0 helm is bugged https://github.com/helm/helm/issues/12423
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash -s -- --version v3.12.3
helm package ./cleaner-controller --app-version ${{ github.ref_name }} --version ${{ github.ref_name }}
helm push ./cleaner-controller-${{ github.ref_name }}.tgz oci://public.ecr.aws/f8y0w2c4