Skip to content

Commit 0ebe029

Browse files
committed
fix(actions): Use the tag number directly when releasing a Helm chart version
1 parent 520b176 commit 0ebe029

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed

.github/workflows/helm.yml

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
name: Build and Release Helm Chart
22
on:
3-
pull_request:
4-
branches:
5-
- 'release-*'
6-
types:
7-
# action should run when the pull request is closed
8-
# (regardless of whether it was merged or just closed)
9-
- closed
10-
# Make sure the action runs every time new commits are
11-
# pushed to the pull request's branch
12-
- synchronize
13-
3+
push:
4+
tags:
5+
- '[0-9]+.[0-9]+.[0-9]+' # 1.2.3 (exact match) - release candidates are excluded
6+
147
jobs:
158
helm:
169
runs-on: ubuntu-latest
17-
if: github.event.pull_request.merged == true
1810
steps:
1911
- name: Set IMAGE_NAME
2012
run: |
@@ -23,20 +15,20 @@ jobs:
2315
# Checkout code
2416
# https://github.com/actions/checkout
2517
- name: Checkout code
26-
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
18+
uses: actions/[email protected]
2719

2820
# Extract metadata (tags, labels) to use in Helm chart
2921
# https://github.com/docker/metadata-action
3022
- name: Extract Docker metadata
3123
id: meta
32-
uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 # v5.0.0
24+
uses: docker/[email protected]
3325
with:
3426
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
3527

3628
# Set version from DOCKER_METADATA_OUTPUT_VERSION as environment variable
3729
- name: Set Version
3830
run: |
39-
echo "VERSION=${DOCKER_METADATA_OUTPUT_VERSION:8}.0" >> $GITHUB_ENV # Eventually will build this into Keyfactor bootstrap
31+
echo "VERSION=${{ github.ref_name }}" >> $GITHUB_ENV # Eventually will build this into Keyfactor bootstrap
4032
4133
# Change version and appVersion in Chart.yaml to the tag in the closed PR
4234
- name: Update Helm App/Chart Version
@@ -48,7 +40,7 @@ jobs:
4840
# Setup Helm
4941
# https://github.com/Azure/setup-helm
5042
- name: Install Helm
51-
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
43+
uses: azure/[email protected]
5244
with:
5345
token: ${{ secrets.GITHUB_TOKEN }}
5446

@@ -61,7 +53,7 @@ jobs:
6153
# Build and release Helm chart to GitHub Pages
6254
# https://github.com/helm/chart-releaser-action
6355
- name: Run chart-releaser
64-
uses: helm/chart-releaser-action@be16258da8010256c6e82849661221415f031968 # v1.5.0
56+
uses: helm/[email protected]
6557
env:
6658
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
6759
with:

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
- Removed documentation for using ambient credentials with Google Kubernetes Engine. As of writing, Google is not a supported identity provider in Keyfactor Command.
99
- Migrated from using [keyfactor-go-client](https://github.com/Keyfactor/keyfactor-go-client) to [keyfactor-go-client-sdk](https://github.com/keyfactor/keyfactor-go-client-sdk).
1010

11+
## Fixes
12+
- Fix the Helm chart releaser job to not run into issues with overlapping Helm chart versions.
13+
1114
# v2.1.1
1215

1316
## Fixes

0 commit comments

Comments
 (0)