Skip to content

Bump AWSSDK.S3 from 3.7.104.30 to 3.7.203.4 #460

Bump AWSSDK.S3 from 3.7.104.30 to 3.7.203.4

Bump AWSSDK.S3 from 3.7.104.30 to 3.7.203.4 #460

Workflow file for this run

name: .NET
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Run Unit Tests
run: |
dotnet restore
dotnet build
dotnet test tests/NosCoreBot.Tests -v m
- name: Configure AWS Credentials
if: github.ref == 'refs/heads/master'
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-west-2
- name: Login to Amazon ECR
if: github.ref == 'refs/heads/master'
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Build, tag, and push image to Amazon ECR
if: github.ref == 'refs/heads/master'
id: build-image
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: noscorebot
IMAGE_TAG: latest
run: |
docker build -f ./src/NosCoreBot/dockerfile -t noscorebot:$IMAGE_TAG --no-cache .
docker tag noscorebot:$IMAGE_TAG $ECR_REGISTRY/noscorebot:$IMAGE_TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG"
- name: Deploy to Amazon ECS
if: github.ref == 'refs/heads/master'
uses: donaldpiret/ecs-deploy@master
with:
cluster: discordbot-cluster
target: noscorebot
tag: latest