-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
58 lines (58 loc) · 2.16 KB
/
action.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
54
55
56
57
58
name: 'ECS Deploy Runner Invoker'
description: 'Invoke the ECS Deploy Runner from a GitHub Actions workflow'
inputs:
gruntwork-installer-version:
description: 'gruntwork-installer version'
required: true
default: 'v0.0.34'
terraform-aws-ci-version:
description: 'terraform-aws-ci version'
required: true
default: 'v0.29.10'
terraform-aws-security-version:
description: 'terraform-aws-security version'
required: true
default: 'v0.44.10'
main-branch-name:
description: 'Name of the main branch of the repository'
required: true
default: 'main'
command:
description: 'Command to run (plan/apply/docker-image-build)'
required: true
context:
description: 'Context directory in which the deploy runner command will be invoked'
required: true
build_args:
description: 'Build time arguments to use when building Docker images'
required: false
default: ''
runs:
using: "composite"
steps:
# Set the version tag to be used on the image built by the docker-image-builder. It is set to the release tag on
# GitHub release events, and to the commit SHA on push events.
- id: set-version
run: |
if [[ ${{ github.event_name }} == 'release' ]]; then
echo VERSION=${{ github.event.release.tag_name }} >> $GITHUB_ENV
else
echo VERSION=${{ github.sha }} >> $GITHUB_ENV
fi
shell: bash
- id: set-build-args
run: echo BUILD_ARGS=${{ inputs.build_args }} >> $GITHUB_ENV
shell: bash
- id: set-context
run: echo CONTEXT=${{ inputs.context }} >> $GITHUB_ENV
shell: bash
# The infrastructure-deployer CLI needs the AWS_REGION env var to be set to the region that hosts the ECS Deploy Runner
- id: set-aws-region
run: echo AWS_REGION=$ECS_DEPLOY_RUNNER_REGION >> $GITHUB_ENV
shell: bash
- id: install-helpers
run: ${{ github.action_path }}/helpers/install.sh ${{ inputs.gruntwork-installer-version }} ${{ inputs.terraform-aws-ci-version }} ${{ inputs.terraform-aws-security-version }}
shell: bash
- id: run-command
run: ${{ github.action_path }}/helpers/deploy.sh ${{ inputs.command }}
shell: bash