4
4
tags :
5
5
- ' v*'
6
6
7
+ env :
8
+ CONTROLLER : ${{ github.event.repository.name }}
9
+
7
10
jobs :
8
11
build-push :
9
12
runs-on : ubuntu-latest
49
52
file : ./Dockerfile
50
53
platforms : linux/amd64,linux/arm/v7,linux/arm64
51
54
tags : |
52
- ghcr.io/fluxcd/helm-controller :${{ steps.prep.outputs.VERSION }}
53
- docker.io/fluxcd/helm-controller :${{ steps.prep.outputs.VERSION }}
55
+ ghcr.io/fluxcd/${{ env.CONTROLLER }} :${{ steps.prep.outputs.VERSION }}
56
+ docker.io/fluxcd/${{ env.CONTROLLER }} :${{ steps.prep.outputs.VERSION }}
54
57
labels : |
55
58
org.opencontainers.image.title=${{ github.event.repository.name }}
56
59
org.opencontainers.image.description=${{ github.event.repository.description }}
@@ -60,39 +63,21 @@ jobs:
60
63
org.opencontainers.image.created=${{ steps.prep.outputs.BUILD_DATE }}
61
64
- name : Check images
62
65
run : |
63
- docker buildx imagetools inspect docker.io/fluxcd/helm-controller:${{ steps.prep.outputs.VERSION }}
64
- docker buildx imagetools inspect ghcr.io/fluxcd/helm-controller:${{ steps.prep.outputs.VERSION }}
65
- docker pull docker.io/fluxcd/helm-controller:${{ steps.prep.outputs.VERSION }}
66
- docker pull ghcr.io/fluxcd/helm-controller:${{ steps.prep.outputs.VERSION }}
67
- - name : Generate release asset
68
- if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
66
+ docker buildx imagetools inspect docker.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
67
+ docker buildx imagetools inspect ghcr.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
68
+ docker pull docker.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
69
+ docker pull ghcr.io/fluxcd/${{ env.CONTROLLER }}:${{ steps.prep.outputs.VERSION }}
70
+ - name : Generate release manifests
69
71
run : |
70
72
mkdir -p config/release
71
- cp config/default/* config/release
72
- cd config/release
73
- kustomize edit set image fluxcd/helm-controller=fluxcd/helm-controller:${{ steps.get_version.outputs.VERSION }}
74
- kustomize build . > helm-controller.yaml
73
+ kustomize build ./config/crd > ./config/release/${{ env.CONTROLLER }}.crds.yaml
74
+ kustomize build ./config/manager > ./config/release/${{ env.CONTROLLER }}.deployment.yaml
75
75
- name : Create release
76
- if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
77
- id : create_release
78
- uses : actions/create-release@latest
79
- env :
80
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
76
+ uses : ncipollo/release-action@v1
81
77
with :
82
- tag_name : ${{ github.ref }}
83
- release_name : ${{ github.ref }}
84
- draft : false
85
78
prerelease : true
79
+ artifacts : " config/release/*.yaml"
80
+ artifactContentType : " text/plain"
86
81
body : |
87
- [CHANGELOG](https://github.com/fluxcd/helm-controller/blob/main/CHANGELOG.md)
88
- - name : Upload artifacts
89
- if : github.event_name == 'push' && contains(github.ref, 'refs/tags/')
90
- id : upload-release-asset
91
- uses : actions/upload-release-asset@v1
92
- env :
93
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
94
- with :
95
- upload_url : ${{ steps.create_release.outputs.upload_url }}
96
- asset_path : ./config/release/helm-controller.yaml
97
- asset_name : helm-controller.yaml
98
- asset_content_type : text/plain
82
+ [CHANGELOG](https://github.com/fluxcd/${{ env.CONTROLLER }}/blob/main/CHANGELOG.md)
83
+ token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments