Skip to content

Commit

Permalink
feat(gha-conductor): add example of using /slash command (#31)
Browse files Browse the repository at this point in the history
* feat(gha-conductor): add example of using /slash command
* fix(gha): use existing pipeline ref name
  • Loading branch information
mdolinin authored Apr 28, 2024
1 parent 8ddfdc3 commit 404e2ca
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions namespaces/domain-a/projects/example-b/.gha.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,15 @@ onBranchMerge:
destinationBranchMatchesAny:
- 'main'
fileChangesMatchAny: *defaultFileChangeTrigger

onSlashCommand:
- name: validate-before-merge
pipelineRef:
name: common-job
pipelineRunValues:
params:
COMMAND: make ${command} ${args} # ${command} and ${args} will be replaced with values from the comment slash command
triggerConditions:
slashCommands:
- "validate"
fileChangesMatchAny: *defaultFileChangeTrigger
2 changes: 2 additions & 0 deletions namespaces/domain-a/projects/example-b/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ test:
./tests/test.sh
clean:
echo "Cleaning example-b"
validate:
echo "Validating example-b $(param)"

0 comments on commit 404e2ca

Please sign in to comment.