diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 7e1f8f8..00ff1a7 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -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 }}" +