Skip to content

Merge pull request #9 from Real-Life-IaC/add-alarms #19

Merge pull request #9 from Real-Life-IaC/add-alarms

Merge pull request #9 from Real-Life-IaC/add-alarms #19

Workflow file for this run

---
name: Deploy
on:
push:
branches:
- main
pull_request:
types:
- labeled
- synchronize
permissions:
id-token: write
jobs:
deploy-sandbox:
name: Sandbox Deploy
if: |
(github.event.action == 'labeled' && github.event.label.name == ':test_tube: sandbox deploy') ||
(github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, ':test_tube: sandbox deploy')) ||
(github.event_name == 'push' && github.ref_name == 'main')
environment: sandbox
concurrency: sandbox
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy Stack
uses: ./.github/actions/deploy
with:
role-to-assume: ${{ vars.ROLE_TO_ASSUME }}
aws-region: ${{ vars.AWS_REGION }}
stack-name: Api-sandbox
deploy-staging:
if: github.ref_name == 'main'
name: Staging Deploy
environment: staging
concurrency: staging
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy Stack
uses: ./.github/actions/deploy
with:
role-to-assume: ${{ vars.ROLE_TO_ASSUME }}
aws-region: ${{ vars.AWS_REGION }}
stack-name: Api-staging
deploy-production:
if: github.ref_name == 'main'
name: Production Deploy
environment: production
concurrency: production
runs-on: ubuntu-latest
needs:
- deploy-sandbox
- deploy-staging
steps:
- uses: actions/checkout@v4
- name: Deploy Stack
uses: ./.github/actions/deploy
with:
role-to-assume: ${{ vars.ROLE_TO_ASSUME }}
aws-region: ${{ vars.AWS_REGION }}
stack-name: Api-production