Created
May 22, 2022 23:45
-
-
Save danecando/cd1e179d54a7cb55873f239f438fe6e3 to your computer and use it in GitHub Desktop.
GitHub Action: Deploy AWS Fargate app with AWS Copilot
This file contains hidden or 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
deploy: | |
name: π Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Cancel Previous Runs | |
uses: styfle/[email protected] | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@v3 | |
- 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: π§ββοΈ Setup AWS Copilot | |
uses: Tipser/setup-aws-copilot@v2 | |
- name: π Deploy Staging | |
if: ${{ github.ref == 'refs/heads/staging' } | |
run: copilot svc deploy -n [app-name] --env staging | |
- name: πͺ Deploy Proudction | |
if: ${{ github.ref == 'refs/heads/main' }} | |
run: copilot svc deploy -n [app-name] --env production |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is pretty cool. I ended up stealing this for my repo.
However, I am stuck with an authentication error as the copilot command returns
AccessDeniedException: User: arn:aws:iam::***:user/autobot-test is not authorized to perform: ssm:GetParameter on resource:
Any idea what could be the issue ? I've tested with an admin IAM user and still no dice.