-
Notifications
You must be signed in to change notification settings - Fork 35
/
action.yml
63 lines (62 loc) · 2.04 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
59
60
61
62
63
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
bindir:
description: Bin directory full path, defaults to /usr/local/bin
required: false
default: /usr/local/bin
installrootdir:
description: Install directory full path, defaults to /usr/local
required: false
default: /usr/local
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 "BINDIR=${{ inputs.bindir }}" >> $GITHUB_ENV
echo "INSTALLROOTDIR=${{ inputs.installrootdir }}" >> $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