-
Notifications
You must be signed in to change notification settings - Fork 3
/
action.yml
67 lines (61 loc) · 1.72 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
64
65
66
67
name: VTEX Toolbelt Action
description: Deploy patched VTEX toolbelt, cache for faster deployment, and do login.
author: VTEX
inputs:
authenticate:
description: "Do authentication after deploy"
required: false
default: "true"
account:
description: "Account to use on login"
required: false
appKey:
description: "VTEX App Key to login"
required: false
appToken:
description: "VTEX App Token to login"
required: false
jsonFile:
description: "File on the OS with json tokens"
required: false
workspace:
description: "Workspace to start after login, default master"
required: false
default: master
version:
description: "Version of VTEX Toolbelt to be installed"
required: false
default: 4.1.0
runs:
using: "composite"
steps:
- name: "Create a dummy yarn.lock to simplify cache"
run: echo ${{ inputs.version }} >> yarn.lock
shell: bash
- name: "Set up Node.js"
uses: actions/setup-node@v4
with:
cache: yarn
node-version: 20
- name: "Install VTEX Toolbelt"
run: |
echo "::group::Global installation"
yarn global add vtex@${{ inputs.version }}
echo "::endgroup::"
echo "::group::Check version"
vtex version
echo "::endgroup::"
shell: bash
- name: "Authentication"
run: bash $GITHUB_ACTION_PATH/entrypoint.sh
env:
VTEX_AUTHENTICATE: ${{ inputs.authenticate }}
VTEX_ACCOUNT: ${{ inputs.account }}
VTEX_APP_KEY: ${{ inputs.appKey }}
VTEX_APP_TOKEN: ${{ inputs.appToken }}
VTEX_WORKSPACE: ${{ inputs.workspace }}
SECRETS_JSON: ${{ inputs.jsonFile }}
shell: bash
branding:
icon: terminal
color: red