-
Notifications
You must be signed in to change notification settings - Fork 5
91 lines (81 loc) · 3.1 KB
/
helm-publish-new-package-version.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: Publish helm package
on:
workflow_call:
inputs:
next-version:
description: "Next final version to be release"
type: string
required: true
chart-dir:
description: "Path to the directory holding Chart.yml file"
type: string
required: false
helm-charts-repo:
description: "The name of the repository where the package will be added"
type: string
required: true
helm-charts-repo-branch:
description: "The name of the branch where the package will be added"
type: string
required: true
helm-charts-repo-subfolder:
description: "The name of the subfolder inside the charts repository where the package should be added"
type: string
required: false
helm-charts-repo-base-url:
description: "Helm chart repo base url"
type: string
required: false
helm-docs-version:
description: 'Version of helm-docs'
type: string
required: false
outputs:
version:
description: "The version of the new published package"
value: ${{ jobs.publish.outputs.version }}
jobs:
publish:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.next-release.outputs.next-prerelease }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- id: next-release
name: Calculate next internal release
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
next-version: ${{ inputs.next-version }}
- name: Set version env variable
env:
VERSION: ${{ steps.next-release.outputs.next-prerelease }}
run: |
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Update chart version
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
new-version: ${{env.VERSION}}
chart-dir: ${{ inputs.chart-dir }}
helm-docs-version: ${{ inputs.helm-docs-version }}
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
username: ${{ secrets.BOT_GITHUB_USERNAME }}
add-options: -u
commit-message: "release $VERSION"
- name: Create local tag
run: git tag -a $VERSION -m "Release version $VERSION"
- name: Package Helm Chart
id: package-helm-chart
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
chart-dir: ${{ inputs.chart-dir }}
- name: Push tag
run: git push origin $VERSION
- name: Publish Helm chart
uses: Alfresco/alfresco-build-tools/.github/actions/[email protected]
with:
helm-charts-repo: ${{ inputs.helm-charts-repo }}
helm-charts-repo-branch: ${{ inputs.helm-charts-repo-branch }}
chart-package: ${{ steps.package-helm-chart.outputs.package-file-path }}
token: ${{ secrets.BOT_GITHUB_TOKEN }}
git-username: ${{ secrets.BOT_GITHUB_USERNAME }}