name: Push Dev on: push: branches-ignore: - master jobs: authorizer-docker: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2.1.0 - name: Setup Dotnet uses: actions/setup-dotnet@v1 with: dotnet-version: '3.1.100' - name: Install Packages working-directory: authorizer run: | dotnet add package StackExchange.Redis --version 2.1.39 --source https://www.myget.org/F/stackoverflow/api/v3/index.json # AWS SDK dotnet add package AWSSDK.Core --version 3.5.0-beta dotnet add package AWSSDK.ECS --version 3.5.0-beta - name: Build working-directory: authorizer run: | dotnet build --configuration Release - name: Push Tag to GitHub Package uses: opspresso/action-docker@master with: args: --docker env: USERNAME: ${{ github.actor }} PASSWORD: ${{ secrets.GITHUB_TOKEN }} REGISTRY: "docker.pkg.github.com" BUILD_PATH: "authorizer" DOCKERFILE: "authorizer/Dockerfile" IMAGE_NAME: "authorizer" TAG_NAME: dev:${{ github.actor }} LATEST: "false" cloudformation: runs-on: ubuntu-latest steps: - name: Checkout Repo uses: actions/checkout@v2.1.0 with: submodules: 'true' - name: Ship to S3 uses: jakejarvis/s3-sync-action@master with: args: --follow-symlinks --delete env: SOURCE_DIR: infrastructure/cloudformation AWS_REGION: "us-east-2" DEST_DIR: develop/cloudformation AWS_S3_BUCKET: dt-deployment-bucket AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - 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 - name: Deploy to AWS CloudFormation uses: aws-actions/aws-cloudformation-github-deploy@v1 with: name: dt-infrastructure-dev-${{ github.actor }} template: infrastructure/cloudformation/dt/top.yaml capabilities: "CAPABILITY_NAMED_IAM,CAPABILITY_IAM" parameter-overrides: VpcId=${{ secrets.VPC_ID }},SubDomain=${{ github.actor }}.dev,Domain=${{ secrets.DOMAIN }},environment=${{ github.actor }},DockerTag=stage,release=develop,PublicSubnets=${{ secrets.SUBNET_IDS }}