File tree Expand file tree Collapse file tree 5 files changed +105
-112
lines changed
Expand file tree Collapse file tree 5 files changed +105
-112
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : BuildImage
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+ workflow_dispatch : { }
8+
9+ jobs :
10+ build-push-image :
11+ runs-on : ubuntu-latest
12+ permissions :
13+ contents : read
14+ packages : write
15+ steps :
16+ - name : Checkout
17+ uses : actions/checkout@v3
18+ - name : Docker meta
19+ id : meta
20+ uses : docker/metadata-action@v4
21+ with :
22+ images : |
23+ oamdev/terraform-controller
24+ ghcr.io/kubevela/oamdev/terraform-controller
25+ tags : |
26+ type=ref,event=tag
27+ type=raw,value=latest,enable={{is_default_branch}}
28+ - name : Login docker.io
29+ uses : docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
30+ with :
31+ registry : docker.io
32+ username : ${{ secrets.DOCKER_USER }}
33+ password : ${{ secrets.DOCKER_PASSWORD }}
34+ - name : Login to GitHub Container Registry
35+ uses : docker/login-action@v2
36+ with :
37+ registry : ghcr.io
38+ username : ${{ github.repository_owner }}
39+ password : ${{ secrets.GITHUB_TOKEN }}
40+
41+ - name : Set up Docker Buildx
42+ uses : docker/setup-buildx-action@v2
43+
44+ - name : Build and push
45+ uses : docker/build-push-action@v4
46+ with :
47+ context : .
48+ platforms : linux/amd64,linux/arm64
49+ file : ./Dockerfile
50+ push : true
51+ tags : ${{ steps.meta.outputs.tags }}
52+ labels : ${{ steps.meta.outputs.labels }}
53+ cache-from : type=gha
54+ cache-to : type=gha,mode=max
Original file line number Diff line number Diff line change 1+ name : HelmChart
2+ on :
3+ push :
4+ tags :
5+ - " v*"
6+ workflow_dispatch : {}
7+
8+ jobs :
9+ publish-charts :
10+ env :
11+ HELM_CHART : chart/
12+ runs-on : ubuntu-latest
13+ steps :
14+ - uses : actions/checkout@master
15+ - name : Install Helm
16+ uses : azure/setup-helm@v1
17+ with :
18+ version : v3.4.0
19+ - name : Get the version
20+ id : get_version
21+ run : |
22+ VERSION=${GITHUB_REF#refs/tags/}
23+ echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT
24+ - name : Tag helm chart image
25+ run : |
26+ image_tag=${{ steps.get_version.outputs.VERSION }}
27+ chart_version=${{ steps.get_version.outputs.VERSION }}
28+ sed -i "s/latest/${image_tag}/g" $HELM_CHART/values.yaml
29+ chart_semver=${chart_version#"v"}
30+ sed -i "s/0.1.0/$chart_semver/g" $HELM_CHART/Chart.yaml
31+ - uses : jnwng/github-app-installation-token-action@v2
32+ id : get_app_token
33+ with :
34+ appId : 340472
35+ installationId : 38064967
36+ privateKey : ${{ secrets.GH_KUBEVELA_APP_PRIVATE_KEY }}
37+ - name : Sync Chart Repo
38+ run : |
39+ git config --global user.email "135009839+kubevela[bot]@users.noreply.github.com"
40+ git config --global user.name "kubevela[bot]"
41+ git clone https://x-access-token:${{ steps.get_app_token.outputs.token }}@github.com/kubevela/charts.git kubevela-charts
42+ helm package $HELM_CHART --destination ./kubevela-charts/docs/
43+ helm repo index --url https://kubevela.github.io/charts ./kubevela-charts/docs/
44+ cd kubevela-charts/
45+ git add docs/
46+ chart_version=${GITHUB_REF#refs/tags/}
47+ git commit -m "update terraform-controller chart ${chart_version}"
48+ git push https://x-access-token:${{ steps.get_app_token.outputs.token }}@github.com/kubevela/charts.git
Original file line number Diff line number Diff line change 11apiVersion : v1
22name : terraform-controller
3- version : 0.2.8
3+ version : 0.1.0
44description : A Kubernetes Terraform controller
55home : https://github.com/oam-dev/terraform-controller
6- appVersion : " 0.3.3 "
6+ appVersion : 0.1.0
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ replicaCount: 1
22
33image :
44 repository : oamdev/terraform-controller
5- tag : 0.2.8
5+ tag : latest
66 pullPolicy : Always
77
88gitImage : alpine/git:latest
You can’t perform that action at this time.
0 commit comments