mirror of
https://github.com/ysoftdevs/imagepullsecret-injector.git
synced 2026-01-15 16:23:45 +01:00
Fix chart-releaser condition
This commit is contained in:
14
.github/workflows/release-chart.yaml
vendored
14
.github/workflows/release-chart.yaml
vendored
@@ -4,8 +4,9 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'helm/**'
|
||||
# TODO: add this back
|
||||
# paths:
|
||||
# - 'helm/**'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
@@ -27,10 +28,14 @@ jobs:
|
||||
version: v3.4.0
|
||||
|
||||
- name: Helm version checker
|
||||
id: helm-version-checker
|
||||
id: helm_version_checker
|
||||
continue-on-error: true
|
||||
run: |
|
||||
newVersion="$(helm show chart helm/imagepullsecret-injector | grep version: | awk '{print $2}')"
|
||||
|
||||
helm repo add imagepullsecret-injector https://ysoftdevs.github.io/imagepullsecret-injector
|
||||
helm repo update
|
||||
|
||||
uploadedVersions="$(helm search repo imagepullsecret-injector/imagepullsecret-injector -l | tail -n +2 | awk '{print $2}')"
|
||||
for uploadedVersion in $uploadedVersions; do
|
||||
if [ "$newVersion" == "$uploadedVersion" ]; then
|
||||
@@ -38,9 +43,8 @@ jobs:
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
- name: Run chart-releaser
|
||||
if: ${{ step.helm-version-checker.outcome == 'success' }}
|
||||
if: steps.helm_version_checker.outcome == 'success'
|
||||
uses: helm/chart-releaser-action@master
|
||||
with:
|
||||
charts_dir: 'helm'
|
||||
|
||||
Reference in New Issue
Block a user