Skip to content

Commit 9d7c7e0

Browse files
committed
Adjust a new deployment workflows
1 parent 74a5746 commit 9d7c7e0

File tree

4 files changed

+38
-146
lines changed

4 files changed

+38
-146
lines changed

.github/workflows/manually-trigger-deploy.yml

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,21 @@ permissions:
2121
contents: read
2222

2323
jobs:
24-
trigger-deploy:
25-
uses: ./.github/workflows/put-ssm-version-deploy.yml
26-
if: ${{ inputs.version != '' && inputs.environment != '' }}
27-
with:
28-
version: ${{ inputs.version }}
29-
environment: ${{ inputs.environment }}
30-
ecr-repository: filplus-provider-benchmark
31-
secrets: inherit
24+
trigger-production-deploy:
25+
strategy:
26+
matrix:
27+
repository:
28+
- filplus-provider-benchmark
29+
- filplus-provider-benchmark-worker
30+
runs-on: ubuntu-latest
31+
if: ${{ github.ref_name == 'main' && inputs.version != '' && inputs.environment == 'production' }}
32+
steps:
33+
- name: Trigger ${{ matrix.repository }} production deploy
34+
uses: neti-filplus-infra/filplus-deploy-action@main
35+
with:
36+
version: ${{ inputs.version }}
37+
environment: production
38+
ecr-repository: ${{ matrix.repository }}
39+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_IMAGE_DEPLOYER }}
40+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_IMAGE_DEPLOYER }}
41+
aws-region: us-east-1

.github/workflows/publish-new-build.yml

Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,11 @@ on:
1313
description: "Enter the version number"
1414
required: true
1515
default: "latest"
16-
deploy:
16+
deploy-to-production:
1717
description: "Deploy the new version?"
1818
required: false
1919
type: boolean
2020
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
2821

2922
permissions:
3023
contents: write
@@ -101,19 +94,22 @@ jobs:
10194
TAG_NAME="v${{ inputs.version }}"
10295
git tag $TAG_NAME
10396
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

.github/workflows/put-ssm-version-deploy.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

ci/scripts/check-and-change-image.js

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)