-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace needs conditionals with action triggers
- Loading branch information
1 parent
baa1528
commit f98b3ad
Showing
1 changed file
with
20 additions
and
11 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 |
---|---|---|
|
@@ -200,18 +200,27 @@ runs: | |
echo -e "\nRoute verification failed" | ||
exit 1 | ||
- name: Post-Deployment | ||
if: inputs.post_rollout != '' && steps.vars.outputs.triggered == 'true' | ||
shell: bash | ||
run: | | ||
# Run post deployment command (optional) | ||
${{ inputs.post_rollout }} | ||
- uses: bcgov/[email protected] | ||
if: inputs.post_rollout != '' | ||
with: | ||
oc_namespace: ${{ inputs.oc_namespace }} | ||
oc_token: ${{ inputs.oc_token }} | ||
oc_server: ${{ inputs.oc_server }} | ||
triggers: ${{ inputs.triggers }} | ||
commands: | | ||
# Run post deployment command (optional) | ||
${{ inputs.post_rollout }} | ||
- if: inputs.delete_completed == 'true' && steps.vars.outputs.triggered == 'true' | ||
shell: bash | ||
run: | | ||
# Cleanup completed pods | ||
oc delete po --field-selector=status.phase==Succeeded | ||
- uses: bcgov/[email protected] | ||
if: inputs.delete_completed == 'true' | ||
with: | ||
oc_namespace: ${{ inputs.oc_namespace }} | ||
oc_token: ${{ inputs.oc_token }} | ||
oc_server: ${{ inputs.oc_server }} | ||
triggers: ${{ inputs.triggers }} | ||
commands: | | ||
# Cleanup completed pods | ||
oc delete po --field-selector=status.phase==Succeeded | ||
# Action repo needs to be present for cleanup/tests | ||
- name: Checkout local repo to make sure action.yml is present | ||
|