Update workflow. #4
Workflow file for this run
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
name: End to end verification | |
on: | |
push: | |
branches: | |
- main | |
- feat_workflow | |
jobs: | |
validation: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-region: ${{ secrets.PIPELINE_AWS_REGION }} | |
role-to-assume: arn:aws:iam::${{ secrets.PIPELINE_AWS_ACCOUNT_ID }}:role/${{ secrets.PIPELINE_ROLE }} | |
role-session-name: github-action | |
- name: Validate | |
run: | | |
executionId=$(aws codepipeline start-pipeline-execution --name ${{ secrets.PIPELINE_NAME }} --region ${{ secrets.PIPELINE_AWS_REGION }} --query "pipelineExecutionId" --output text) | |
sleep 60 | |
while true; do | |
status=$(aws codepipeline get-pipeline-execution --pipeline-name ${{ secrets.PIPELINE_NAME }} --region ${{ secrets.PIPELINE_AWS_REGION }} --pipeline-execution-id $executionId --query "pipelineExecution.status" --output text) | |
echo "Pipeline status: $status" | |
if [[ "$status" == "Failed" ]]; then | |
echo "Pipeline failed." | |
exit 1 | |
fi | |
if [[ "$status" != "InProgress" ]]; then | |
break | |
fi | |
sleep 30 | |
done |