|
13 | 13 | description: "Enter the version number" |
14 | 14 | required: true |
15 | 15 | default: "latest" |
16 | | - deploy: |
| 16 | + deploy-to-production: |
17 | 17 | description: "Deploy the new version?" |
18 | 18 | required: false |
19 | 19 | type: boolean |
20 | 20 | default: false |
21 | | - environment: |
22 | | - required: false |
23 | | - description: "Select the environment to deploy to" |
24 | | - type: choice |
25 | | - options: |
26 | | - - production |
27 | | - default: production |
28 | 21 |
|
29 | 22 | permissions: |
30 | 23 | contents: write |
@@ -101,19 +94,22 @@ jobs: |
101 | 94 | TAG_NAME="v${{ inputs.version }}" |
102 | 95 | git tag $TAG_NAME |
103 | 96 | git push origin $TAG_NAME |
104 | | - trigger-deploy: |
105 | | - needs: |
106 | | - - code-check |
107 | | - - bump-version |
108 | | - - git-tag |
109 | | - uses: ./.github/workflows/put-ssm-version-deploy.yml |
110 | | - if: | |
111 | | - ${{ inputs.version != '' && inputs.deploy == true && inputs.environment != ''}} && |
112 | | - always() && |
113 | | - !contains(needs.*.result, 'failure') && |
114 | | - !contains(needs.*.result, 'cancelled') |
115 | | - with: |
116 | | - version: ${{ inputs.version }} |
117 | | - environment: ${{ inputs.environment }} |
118 | | - ecr-repository: filplus-provider-benchmark |
119 | | - secrets: inherit |
| 97 | +
|
| 98 | + trigger-production-deploy: |
| 99 | + strategy: |
| 100 | + matrix: |
| 101 | + repository: |
| 102 | + - filplus-provider-benchmark |
| 103 | + - filplus-provider-benchmark-worker |
| 104 | + runs-on: ubuntu-latest |
| 105 | + if: ${{ github.ref_name == 'main' && inputs.version != '' && inputs.deploy-to-production == true }} |
| 106 | + steps: |
| 107 | + - name: Trigger ${{ matrix.repository }} production deploy |
| 108 | + uses: neti-filplus-infra/filplus-deploy-action@main |
| 109 | + with: |
| 110 | + version: ${{ inputs.version }} |
| 111 | + environment: production |
| 112 | + ecr-repository: ${{ matrix.repository }} |
| 113 | + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_IMAGE_DEPLOYER }} |
| 114 | + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_IMAGE_DEPLOYER }} |
| 115 | + aws-region: us-east-1 |
0 commit comments