-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,12 +7,22 @@ on: | |
description: 'The new chart version' | ||
required: true | ||
type: string | ||
skip-version-validation: | ||
description: 'Should skip chart version validation' | ||
required: true | ||
default: false | ||
type: boolean | ||
workflow_call: | ||
inputs: | ||
chart-version: | ||
description: 'The new chart version' | ||
required: true | ||
type: string | ||
skip-version-validation: | ||
description: 'Should skip chart version validation' | ||
required: true | ||
default: false | ||
type: boolean | ||
secrets: | ||
token: | ||
description: 'The github token to use to create the PR' | ||
|
@@ -23,6 +33,17 @@ jobs: | |
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: azure/[email protected] | ||
with: | ||
version: v3.12.1 | ||
|
||
- name: Validate version | ||
if: ${{ !inputs.skip-version-validation }} | ||
run: | | ||
if [[ $(helm search repo spot/ocean-kubernetes-controller --version ${{ inputs.chart-version }}) == "No results found" ]]; then | ||
echo "Chart version ${{ inputs.chart-version }} not found in the repository" | ||
exit 1 | ||
fi | ||
- name: Update version | ||
uses: actions/github-script@v7 | ||
|