fix dockerfile copy paths and add python version to github actions step #8
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 to Amazon ECS | |
on: | |
push: | |
branches: | |
- main | |
env: | |
applicationfolder: ./ | |
AWS_REGION: sa-east-1 | |
ECR_REPOSITORY: 186912366203.dkr.ecr.sa-east-1.amazonaws.com/my-first-ecr-repo # set this to your Amazon ECR repository name | |
ECS_SERVICE: my-first-service | |
ECS_CLUSTER: my-cluster # set this to your Amazon ECS cluster name | |
ECS_TASK_DEFINITION: my-first-task # set this to the path to your Amazon ECS task definition e.g. .aws/task-definition.json | |
CONTAINER_NAME: spotify-liked-songs-clustering-docker-image # set this | |
S3_BUCKET: spotify-liekd-songs-cluster-webappdeploymentbucket-uigxxoklltki | |
jobs: | |
build-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.12.1 | |
- uses: aws-actions/setup-sam@v1 | |
with: | |
version: 1.23.0 | |
- 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: $AWS_REGION | |
# sam build | |
- run: sam build --use-container | |
# Run Unit tests- Specify unit tests here | |
# sam deploy | |
- run: sam deploy --no-confirm-changeset --no-fail-on-empty-changeset --stack-name sam-hello-world --s3-bucket $S3_BUCKET--capabilities CAPABILITY_IAM --region $AWS_REGION |