Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/aws-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ on:
environment:
required: true
type: string
default: "dev"
secrets-location:
type: string
default: "local"
Expand All @@ -38,8 +37,6 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ inputs.environment }}
- name: Install AWS CLI
run: sudo snap install aws-cli --classic
- name: Install AWS CDK CLI
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/deploy-prod.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
name: deploy-prod

on:
workflow_run:
workflows:
- check
types:
- completed
branches:
- prod
push:
branches: ['prod']

jobs:
test:
uses: ./.github/workflows/test.yaml
with:
environment: prod
aws-deploy:
uses: "./.github/workflows/aws-deploy.yaml"
with:
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/deploy-stage.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
name: deploy-stage

on:
workflow_run:
workflows:
- check
types:
- completed
branches:
- stage
push:
branches: ['stage']

jobs:
test:
uses: ./.github/workflows/test.yaml
with:
environment: stage
aws-deploy:
uses: "./.github/workflows/aws-deploy.yaml"
with:
Expand Down
11 changes: 11 additions & 0 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: pr-check

on:
pull_request:
branches: ['*']

jobs:
test:
uses: ./.github/workflows/test.yaml
with:
environment: dev
15 changes: 9 additions & 6 deletions .github/workflows/check.yml → .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: check
name: test

on:
pull_request:
branches: ['*']
push:
branches: ['*']

workflow_call:
inputs:
environment:
required: true
type: string
jobs:
unit-tests:
runs-on: ubuntu-latest
Expand All @@ -25,6 +25,9 @@ jobs:
run: pip install -r requirements.txt -r requirements-dev.txt
- name: Generate cloudformation
uses: youyo/aws-cdk-github-actions@v2
env:
ENV: ${{ inputs.environment }}
secrets-location: "ssm"
with:
cdk_subcommand: 'synth'
actions_comment: false
Expand Down