-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (37 loc) · 1.32 KB
/
build-push-charts.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
# Adapted from https://github.com/stackhpc/azimuth/blob/master/.github/workflows/build-push-artifacts.yaml
name: Publish Helm charts
on:
workflow_call:
inputs:
ref:
type: string
description: The ref to build.
required: true
outputs:
chart-version:
description: The chart version that was published
value: ${{ jobs.build_push_chart.outputs.chart-version }}
jobs:
build_push_charts:
name: Build and push Helm charts
runs-on: ubuntu-latest
# Only build and push the chart if the images built successfully
outputs:
chart-version: ${{ steps.semver.outputs.version }}
steps:
- name: Check out the repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
# This is important for the semver action to work correctly
# when determining the number of commits since the last tag
fetch-depth: 0
- name: Get SemVer version for current commit
id: semver
uses: azimuth-cloud/github-actions/semver@master
- name: Publish Helm charts
uses: azimuth-cloud/github-actions/helm-publish@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ steps.semver.outputs.version }}
app-version: ${{ steps.semver.outputs.short-sha }}