Skip to content

Commit

Permalink
Replace needs conditionals with action triggers
Browse files Browse the repository at this point in the history
  • Loading branch information
DerekRoberts committed Jan 28, 2025
1 parent 88050bb commit 3b6b7b0
Showing 1 changed file with 20 additions and 11 deletions.
31 changes: 20 additions & 11 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3b6b7b0

Please sign in to comment.