forked from unfor19/install-aws-cli-action
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
53 lines (52 loc) · 1.66 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
name: "install-aws-cli-action"
description: "Install AWS CLI on a Linux host"
branding:
icon: "download-cloud"
color: "orange"
inputs:
version:
description: "1=latest version of v1, 2=latest version of v2, #.#.#=specific version"
required: false
default: 2
verbose:
description: "Prints ls commands to see changes in the filesystem"
required: false
default: false
lightsailctl:
description: "Install lightsailctl plugin"
required: false
default: false
arch:
description: Allowed values are - amd64, arm64
required: false
default: amd64
rootdir:
description: Root directory full path, defaults to PWD
required: false
default: "" # PWD
workdir:
description: Working directory full path, all files are downloaded and extracted in this directory
required: false
default: "" # PWD/unfor19-awscli
outputs:
version:
description: "The AWS CLI version that was installed"
value: ${{ steps.set-output.outputs.version }}
runs:
using: "composite"
steps:
- id: set-env-vars
run: |
echo "AWS_CLI_VERSION=${{ inputs.version }}" >> $GITHUB_ENV
echo "AWS_CLI_ARCH=${{ inputs.arch }}" >> $GITHUB_ENV
echo "VERBOSE=${{ inputs.verbose }}" >> $GITHUB_ENV
echo "LIGHTSAILCTL=${{ inputs.lightsailctl }}" >> $GITHUB_ENV
echo "ROOTDIR=${{ inputs.rootdir }}" >> $GITHUB_ENV
echo "WORKDIR=${{ inputs.workdir }}" >> $GITHUB_ENV
shell: bash
- id: install-aws-cli
run: sudo --preserve-env ${{ github.action_path }}/entrypoint.sh
shell: bash
- id: set-output
run: echo "version=$(aws --version)" >> $GITHUB_OUTPUT
shell: bash