Skip to content

Commit 748bd1b

Browse files
authored
fix: flatten workflow.argument for pull-requests
The `workflow.arguments` variable can be a list of lists and simply checking if the string `KAYOBE_AUTOMATION_PR_TYPE` is contained will not work without flattening the list
1 parent 777cf7b commit 748bd1b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

roles/github/templates/generic.yml.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ jobs:
66
permissions:
77
contents: write
88
packages: %% 'read' if github_registry_url == 'ghcr.io' else 'none' %%
9-
pull-requests: %% 'write' if 'KAYOBE_AUTOMATION_PR_TYPE' in workflow.arguments else 'none' %%
9+
pull-requests: %% 'write' if 'KAYOBE_AUTOMATION_PR_TYPE' in workflow.arguments | flatten else 'none' %%
1010
container:
1111
image: %% github_registry_url %%/%% github_image_name %%:%% github_image_tag %%
1212
credentials:

0 commit comments

Comments
 (0)