Skip to content

Commit 45523cd

Browse files
authored
CLOUDP-366563: Fix helm syncer supporting PR title quotes (#3042)
* Allow workflow_dispatch to run the syncer * Fix support for commit titles with quotes
1 parent 242af30 commit 45523cd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.github/workflows/sync-helm-charts.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99

1010
jobs:
1111
verify-helm-changes:
12-
if: github.event.pull_request.merged == true && !startsWith(github.event.pull_request.title, 'dependabot')
12+
if: github.event.pull_request.merged == true && !startsWith(github.event.pull_request.title, 'dependabot') || github.event_name == 'workflow_dispatch'
1313
name: Verify if AKO helm charts need updates
1414
runs-on: ubuntu-latest
1515
environment: release
@@ -86,13 +86,14 @@ jobs:
8686
- name: Create PR for helm-charts repo
8787
env:
8888
GH_TOKEN: ${{ steps.generate_token.outputs.token }}
89-
run: |
89+
PR_TITLE: ${{ github.event.pull_request.title }}
90+
run: |
9091
cd ./helm-charts-cloned
9192
9293
if [[ -n $(git status --porcelain) ]]; then
9394
jobname=${{ github.run_id }}
94-
if [[ -n "${{ github.event.pull_request.title }}" ]]; then
95-
jobname=$(echo "${{ github.event.pull_request.title }}" | tr -c '[:alnum:]-_' '_')
95+
if [[ -n "${PR_TITLE}" ]]; then
96+
jobname=$(echo "${PR_TITLE}" | tr -c '[:alnum:]-_' '_')
9697
fi
9798
9899
export BRANCH=ako-helm-update-"${jobname}"

0 commit comments

Comments
 (0)