-
Notifications
You must be signed in to change notification settings - Fork 2
53 lines (51 loc) · 1.44 KB
/
release-flow.yml
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: reusable-workflow
on:
workflow_call:
inputs:
module:
required: true
type: string
jobs:
Production-Release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Create Release
uses: actions/create-release@v1
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
Deploy-To-Prod:
runs-on: ubuntu-latest
needs: Production-Release
environment: prod
permissions:
id-token: write
issues: read
checks: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: azure/[email protected]
- uses: mikefarah/yq@master
- uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
role-session-name: git-actions-pipeline
aws-region: us-east-1
- name: Clone Common Repo
run: |
eval `ssh-agent -s`
ssh-add - <<< "${{ secrets.SSH_KEY }}"
git clone [email protected]:ksgnextuple/common-deploy-scripts.git
- name: Deploy to EKS
run: ./common-deploy-scripts/scripts/deploy.sh
env:
ECR_REGISTRY: ${{ secrets.ECR_REGISTRY }}
COMMIT_HASH: ${{ github.sha }}
ENVIRONMENT: "prod"
PROJECT: ${{ inputs.module }}