Skip to content

Commit

Permalink
feat(action-aws): update rest api mode
Browse files Browse the repository at this point in the history
  • Loading branch information
JoffreyPlouvier committed Jun 12, 2023
1 parent 05c0fc3 commit 01f194c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions actions/aws/update-and-deploy-rest-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
APIGW_REST_API_ID: ${{ secrets.APIGW_ID }}
APIGW_STAGE_NAME: stage_v1
APIGW_VERSION: api_version_to_deploy
apigw_put_mode: merge # default value
```
Beware of using a `@ref` (`@main` in the example above) which suits your stability requirements in your workflow:
Expand Down
6 changes: 5 additions & 1 deletion actions/aws/update-and-deploy-rest-api/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ inputs:
APIGW_VERSION:
description: "Version of the API Gateway to deploy"
required: true
apigw_put_mode:
description: update mode of put-rest-api call (merge|overwrite)
default: merge
required: false

runs:
using: "composite"
Expand All @@ -45,7 +49,7 @@ runs:
- name: Update Api
shell: bash
run: |
aws apigateway put-rest-api --rest-api-id ${{ inputs.APIGW_REST_API_ID }} --mode merge --body 'fileb://${{ inputs.ARTIFACT_FILE_NAME }}'
aws apigateway put-rest-api --rest-api-id ${{ inputs.APIGW_REST_API_ID }} --mode ${{ inputs.apigw_put_mode }} --body 'fileb://${{ inputs.ARTIFACT_FILE_NAME }}'
- name: Deploy Api
shell: bash
Expand Down

0 comments on commit 01f194c

Please sign in to comment.