Skip to content

Commit

Permalink
authenticate to aws before other steps
Browse files Browse the repository at this point in the history
  • Loading branch information
alyssadai committed Sep 12, 2024
1 parent baad596 commit 7ed8f1b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,13 @@ jobs:
curl "https://s3.us-west-2.amazonaws.com/lightsailctl/latest/linux-amd64/lightsailctl" -o "/usr/local/bin/lightsailctl"
sudo chmod +x /usr/local/bin/lightsailctl
- name: Authenticate with AWS
run: |
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws configure set default.region ${{ vars.AWS_REGION }}
- name: Push Docker image to AWS Lightsail service
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
aws lightsail push-container-image \
--region ${{ vars.AWS_REGION }} \
Expand All @@ -65,6 +68,8 @@ jobs:
- name: Create new Lightsail deployment
run: |
echo $LIGHTSAIL_IMAGE_TAG
aws lightsail create-container-service-deployment \
--service-name ${{ vars.SERVICE_NAME }} \
--containers "{
Expand Down

0 comments on commit 7ed8f1b

Please sign in to comment.