Skip to content

Commit

Permalink
Test post approval
Browse files Browse the repository at this point in the history
  • Loading branch information
shakirshakiel authored Jun 3, 2024
1 parent fa6fb63 commit 704e41b
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,36 +31,35 @@ jobs:
if: ${{ always() }}
run: |
echo "Executing plan for ${{ inputs.module }} in ${{ inputs.environment }}"
sleep 60
echo ${{ env.SAMPLE_KEY }}
echo "result=0" >> "$GITHUB_OUTPUT"
plan2:
approval:
runs-on: ubuntu-latest
needs: [ plan ]
environment: ${{ inputs.environment }}
concurrency: ${{ inputs.environment }}
if: needs.plan.outputs.result == '1'

permissions:
contents: read

steps:
- name: Terragrunt - ${{ inputs.environment }}/${{ inputs.module }}/plan
- name: Approval - ${{ inputs.environment }}/${{ inputs.module }}/plan
continue-on-error: false
run: |
echo "Result = ${{ needs.plan.outputs.result }}"
echo "Test condition ${{ needs.plan.outputs.result == 0 }}"
echo "Executing approval for ${{ inputs.module }} in ${{ inputs.environment }}"
approval:
postapproval:
runs-on: ubuntu-latest
needs: [ plan ]
environment: ${{ inputs.environment }}
concurrency: ${{ inputs.environment }}
if: needs.plan.outputs.result == '1'
needs: [ approval ]

permissions:
contents: read

steps:
- name: Approval - ${{ inputs.environment }}/${{ inputs.module }}/plan
- name: Post Approval - ${{ inputs.environment }}/${{ inputs.module }}/plan
continue-on-error: false
run: |
echo "Executing approval for ${{ inputs.module }} in ${{ inputs.environment }}"
echo "Post approval for ${{ inputs.module }} in ${{ inputs.environment }}"

0 comments on commit 704e41b

Please sign in to comment.