setting up pipeline #1
This file contains hidden or 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: Build Pipeline | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build-image: | |
| name: Build the DBT Image | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Build and push Docker image | |
| uses: docker/build-push-action@v6 | |
| with: | |
| push: ${{ github.event_name != 'pull_request' }} | |
| deploy-cloudformation: | |
| name: Deploy CloudFormation Stack | |
| runs-on: ubuntu-latest | |
| needs: build-image | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: aws-actions/setup-sam@v2 | |
| with: | |
| use-installer: true | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v2 | |
| with: | |
| aws-region: us-east-1 | |
| role-to-assume: 'arn:aws:iam::144406111952:role/Deployer' | |
| role-session-name: Deploy | |
| - name: Deploy stack | |
| run: sam deploy |