diff --git a/actions/aws/update-and-deploy-rest-api/README.md b/actions/aws/update-and-deploy-rest-api/README.md index 1ae06d2..25af961 100644 --- a/actions/aws/update-and-deploy-rest-api/README.md +++ b/actions/aws/update-and-deploy-rest-api/README.md @@ -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: diff --git a/actions/aws/update-and-deploy-rest-api/action.yml b/actions/aws/update-and-deploy-rest-api/action.yml index 45befcf..8910f90 100644 --- a/actions/aws/update-and-deploy-rest-api/action.yml +++ b/actions/aws/update-and-deploy-rest-api/action.yml @@ -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" @@ -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