-
Notifications
You must be signed in to change notification settings - Fork 40
67 lines (67 loc) · 2.24 KB
/
packaging.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
name: Package and publish the chart
on:
pull_request_target:
types: [closed]
workflow_dispatch:
inputs:
manual-package-invocation:
description: 'Package (y/n)?'
required: true
default: 'y'
version-bump:
description: 'Version bump: major, minor, patch'
required: true
branch-name:
description: 'Branch name to package'
required: true
jobs:
package-from-pr:
if: github.event.pull_request.merged == true
name: Package and push from PR
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: cloudve/helm-ci@master
with:
chart-name: galaxy
charts-repo: cloudve/helm-charts
github-token: ${{ secrets.CHARTS_TOKEN }}
charts-token: ${{ secrets.CHARTS_TOKEN }}
github-labels: ${{ join(github.event.pull_request.labels.*.name, ', ') }}
git-branch: ${{ github.event.pull_request.base.ref }}
package-from-manual:
if: github.event.inputs.manual-package-invocation == 'y'
name: Package and push manual invocation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- uses: cloudve/helm-ci@master
with:
chart-name: galaxy
charts-repo: cloudve/helm-charts
github-token: ${{ secrets.CHARTS_TOKEN }}
charts-token: ${{ secrets.CHARTS_TOKEN }}
github-labels: ${{ github.event.inputs.version-bump }}
git-branch: ${{ github.event.inputs.branch-name }}
tag-and-release:
needs: [ package-from-pr, package-from-manual ]
name: Create a tag and GitHub release for this version.
runs-on: ubuntu-latest
if: |
always()
&& contains(needs.*.result, 'success')
&& !contains(needs.*.result, 'failure')
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Tag and release
run: |
version=v$(cat galaxy/Chart.yaml | grep ^version: | awk '{print $2}')
git tag -a $version -m "Automatic release of $version"
git push origin $version
gh release create $version --generate-notes --latest