Skip to content

Commit 6aeb601

Browse files
committed
validate inputs, remove comments, add extra step for commit
1 parent 2978da9 commit 6aeb601

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/release-source.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ jobs:
3333
release-repository:
3434
runs-on: ubuntu-22.04
3535
steps:
36+
- name: Validate required inputs
37+
run: |
38+
[[ "${{ inputs.release_version }}" ]] || { echo "release_version input is empty" ; exit 1; }
39+
3640
- name: check branch
3741
if: ${{ github.ref_name != 'develop' }}
3842
run: |
@@ -56,15 +60,9 @@ jobs:
5660
dv_devops: ${{ vars.DV_DEVOPS }}
5761
actor: ${{ github.actor }}
5862
qms_are_allowed: "false"
59-
#- name: get release version from package.json
60-
# id: get-release-version
61-
# if: ${{ inputs.release_version == null }}
62-
# run: |
63-
# release_version="$(jq -r '.version' package.json | cut -d '-' -f 1)"
64-
# echo "RELEASE_VERSION=$release_version" >> "$GITHUB_ENV"
63+
6564
- name: get release version from input
6665
id: get-release-version-from-input
67-
if: ${{ inputs.release_version != null }}
6866
run: |
6967
input_release_version="${{ inputs.release_version }}"
7068
if echo "$input_release_version" | grep -q '^[0-9.]*$'; then
@@ -204,6 +202,8 @@ jobs:
204202
cd deploy/helm
205203
helm-docs --document-dependency-values
206204
git add .
205+
- name: Commit changes
206+
run: |
207207
git commit -m "Update version to $RELEASE_VERSION"
208208
- name: push all changes
209209
run: |

0 commit comments

Comments
 (0)