trigger deployment #17
Workflow file for this run
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 API | |
on: push | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
deploy-api: | |
environment: deployment | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8 | |
cache: true | |
cache-dependency-path: Mortein/packages.lock.json | |
- run: dotnet restore Mortein/ | |
- run: dotnet tool restore | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: npm | |
- run: npm clean-install | |
- uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
audience: sts.amazon.com | |
aws-region: ${{ vars.AWS_DEFAULT_REGION }} | |
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT_ID }}:role/github-actions | |
- env: | |
PARAMS_TEMP_FILE: /tmp/template-params | |
run: | | |
echo '${{ toJson(secrets) }}' \ | |
| jq -r '[to_entries[] | "\(.key)=\(.value)"] | join(";")'' > ${{ env.PARAMS_TEMP_FILE }} | |
dotnet lambda deploy-serverless \ | |
--s3-bucket mortein-api \ | |
--stack-name MorteinApiStack | |
--template-parameters "$(< ${{ env.PARAMS_TEMP_FILE }})" | |
working-directory: Mortein/ |