[FEATURE]: Comment on PRs with webhook URL for feature branch #45
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
on: | |
pull_request: | |
branches: | |
- master | |
types: | |
- synchronize | |
concurrency: | |
group: environment-stg-feature-${{ github.ref }} | |
cancel-in-progress: true | |
name: Update Feature Branch Infrastructure | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: '18.x' | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-2 | |
- uses: actions/checkout@v2 | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
webhooks: | |
- 'api/v2/**' | |
- 'cdk-infra/lib/constructs/api/**' | |
- 'cdk-infra/utils/**' | |
worker: | |
- 'src/**' | |
- 'cdk-infra/lib/constructs/worker/**' | |
- 'Dockerfile.enhanced' | |
- 'modules/**' | |
- name: Update Webhook Stack | |
if: steps.filter.outputs.webhooks == 'true' | |
run: | | |
npm ci | |
cd cdk-infra/ | |
npm ci | |
npm run deploy:feature:stack -- -c env=stg -c customFeatureName=enhancedApp-stg-${{github.head_ref}} \ | |
auto-builder-stack-enhancedApp-stg-${{github.head_ref}}-webhook | |
- name: Update Worker Stack | |
if: steps.filter.outputs.worker == 'true' | |
run: | | |
npm ci | |
cd cdk-infra/ | |
npm ci | |
npm run deploy:feature:stack -- -c env=stg -c customFeatureName=enhancedApp-stg-${{github.head_ref}} \ | |
auto-builder-stack-enhancedApp-stg-${{github.head_ref}}-worker |