Deploy commit c7afc99e5ec828194bb92f8ccd9734f7e41283b0 by @a-techie #19
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: Deploy Quiet Riot Dev | |
run-name: Deploy commit ${{ github.sha }} by @${{ github.actor }} | |
# get start | |
on: | |
push: | |
branches: | |
- 'dev' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
cloudformation_deploy: | |
permissions: | |
id-token: write | |
contents: read | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
aws-region: us-east-1 | |
role-to-assume: arn:aws:iam::201012399609:role/github-actions-role | |
role-session-name: quiet-riot-commit-${{ github.sha }} | |
- name: STS Get Caller Identity | |
run: aws sts get-caller-identity | |
# - name: Quiet Riot Dev API Container Build and Push | |
# working-directory: infra/ | |
# run: | | |
# aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws | |
# docker build -t quiet-riot-api-dev . | |
# docker tag quiet-riot-api-dev:latest public.ecr.aws/x1p4o1n7/quiet-riot-api-dev:latest | |
# docker push public.ecr.aws/x1p4o1n7/quiet-riot-api-dev:latest | |
- name: Install AWS CLI | |
run: sudo apt-get install -y awscli | |
- name: Package Lambda Function Code | |
working-directory: infra/child_accounts | |
run: | | |
aws cloudformation package \ | |
--template-file aws_cfn_infrastructure.yaml \ | |
--s3-bucket quiet-riot-global-bucket \ | |
--output-template-file packaged-template.yaml \ | |
--region us-east-1 | |
- name: Deploy Quiet Riot Dev CloudFormation Stack | |
working-directory: infra/child_accounts | |
run: | | |
aws cloudformation deploy \ | |
--template-file packaged-template.yaml \ | |
--stack-name QuietRiotDev \ | |
--capabilities CAPABILITY_NAMED_IAM \ | |
--region us-east-1 | |
- name: Get Quiet Riot Stack Output Information | |
run: aws cloudformation describe-stacks --stack-name QuietRiotDev --query "Stacks[0].Outputs" --output text | |