-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yaml
62 lines (58 loc) · 1.95 KB
/
action.yaml
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
54
55
56
57
58
59
60
61
62
name: 'Build and push to ECR'
description: 'Build and push a Docker image to ERC, written for CA repositories.'
inputs:
release_name:
description: 'The name of the release, also used as the namespace name'
required: true
role_arn:
description: 'ARN of the role to assume'
required: true
chart_repository:
description: 'The name of the chart repository. Defaults to the current repository.'
required: false
default: ${{ github.repository }}
chart_path:
description: 'The path within the repository to the chart. Defaults to `chart`'
required: false
default: chart
chart_pull_token:
description: 'A token to pull the chart repository'
required: true
chart_pull_path:
description: 'The path within the runner to pull to the chart into. Defaults to `.`'
required: false
default: .
cluster:
description: 'The cluster to deploy to. Defaults to `dev-eks-platform`'
required: false
default: dev-eks-platform
helm_args:
description: 'Extra arguments to pass to helm'
required: false
default: ''
runs:
using: 'composite'
steps:
- name: Checkout Chart Repository
uses: actions/checkout@v4
with:
repository: ${{ inputs.chart_repository }}
token: ${{ inputs.chart_pull_token }}
path: ${{ inputs.chart_pull_path }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ inputs.role_arn }}
role-session-name: ${{ inputs.release_name }}-deployment-actions-workflow
aws-region: eu-west-1
- name: Update Kube Config
shell: bash
run: aws eks update-kubeconfig --name=${{ inputs.cluster }}
- name: Deploy chart
shell: bash
run: |
helm upgrade --install \
--namespace ${{ inputs.release_name }} \
${{ inputs.helm_args }} \
${{ inputs.release_name }} \
${{ inputs.chart_pull_path }}/${{ inputs.chart_path }}