-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (49 loc) · 1.85 KB
/
manually-trigger-deploy.yml
File metadata and controls
53 lines (49 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Manually trigger deploy to staging or production
run-name: "Manually deploy ${{ github.ref_name }} triggered by ${{ github.actor }}; version: ${{ inputs.version }}"
on:
workflow_dispatch:
inputs:
version:
description: "Enter the version number"
required: true
default: "main"
environment:
required: false
description: "Select the environment to deploy to"
type: choice
options:
- production
- staging
default: staging
permissions:
id-token: write
contents: read
jobs:
trigger-staging-deploy:
runs-on: ubuntu-latest
environment: production-fidl # only one environment available, using for both: staging and production
if: ${{ inputs.version != '' && inputs.environment == 'staging' }}
steps:
- name: Trigger staging deploy
uses: neti-filplus-infra/filplus-deploy-action@main
with:
version: ${{ inputs.version }}
environment: staging
ecr-repository: provider-sample-url-finder
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_IMAGE_DEPLOYER }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_IMAGE_DEPLOYER }}
aws-region: us-east-1
trigger-production-deploy:
runs-on: ubuntu-latest
environment: production-fidl
if: ${{ github.ref_name == 'main' && inputs.version != '' && inputs.environment == 'production' }}
steps:
- name: Trigger production deploy
uses: neti-filplus-infra/filplus-deploy-action@main
with:
version: ${{ inputs.version }}
environment: production
ecr-repository: provider-sample-url-finder
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_IMAGE_DEPLOYER }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_IMAGE_DEPLOYER }}
aws-region: us-east-1