forked from CrowdDotDev/crowd.dev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yaml
34 lines (28 loc) · 1.04 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
name: Crowd service deployer
description: Deploys to crowd.dev kubernetes cloud environments
inputs:
service:
description: Which cloud service to deploy
required: true
image:
description: Which docker image to deploy (full docker registry name with tag)
required: true
cluster:
description: To which cloud cluster to deploy
required: true
runs:
using: composite
steps:
- name: Initialize kubernetes kubectl context
shell: bash
run: aws eks update-kubeconfig --name ${{ inputs.cluster }} --role-arn ${{ env.CROWD_ROLE_ARN }}
env:
AWS_ACCESS_KEY_ID: ${{ env.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ env.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ env.AWS_REGION }}
- name: Deploy image
shell: bash
run: kubectl set image deployments/${{ inputs.service }}-dpl ${{ inputs.service }}=${{ inputs.image }}
- uses: ./.github/actions/slack-notify
with:
message: 'Service *${{ inputs.service }}* was just deployed using docker image `${{ inputs.image }}`'