feat: add breed #28
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: Backend workflow | |
on: | |
push: | |
paths: | |
- backend/** | |
- .github/workflows/backend.yml | |
env: | |
AWS_REGION: "eu-west-1" # Select this to suit where you'd like to deploy your workload | |
REPO: ${{github.event.repository.name}} | |
OIDC_ROLE: arn:aws:iam::675385716628:role/GithubActionsToAssume # CHANGE THIS and configure according to these instructions: https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-amazon-web-services | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
jobs: | |
BuildDeployCFN: | |
defaults: | |
run: | |
working-directory: ./backend | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout the repo | |
uses: actions/checkout@v3 | |
- name: configure aws credentials | |
uses: aws-actions/configure-aws-credentials@v3 | |
with: | |
role-to-assume: ${{env.OIDC_ROLE}} | |
aws-region: ${{env.AWS_REGION}} | |
- name: sam build | |
run: | | |
sam build --use-container | |
sam deploy --stack-name ${{env.REPO}}-backend \ | |
--parameter-overrides GithubRepoName=${{env.REPO}} \ | |
--resolve-s3 \ | |
--region ${{env.AWS_REGION}} \ | |
--no-fail-on-empty-changeset \ | |
--tags project=${{env.REPO}} \ | |
--capabilities CAPABILITY_IAM |