@@ -20,73 +20,46 @@ inputs:
20
20
description : ' Workspace to start after login, default master'
21
21
required : false
22
22
default : master
23
- bin :
24
- description : ' Name to call this version of toolbelt '
23
+ version :
24
+ description : ' Version of VTEX Toolbelt to be installed '
25
25
required : false
26
- default : vtex-e2e
27
- git :
28
- description : ' Source repository to clone (org/repo)'
29
- required : false
30
- default : vtex/toolbelt
31
- branch :
32
- description : ' Which branch to use on git'
33
- required : false
34
- default : toolbelt-action
26
+ default : 3.0.0-beta-ci.2
35
27
36
28
runs :
37
29
using : ' composite'
38
30
steps :
39
-
40
- - name : Checkout VTEX Toolbelt
41
- uses : actions/checkout@v3
42
- with :
43
- repository : ${{ inputs.git }}
44
- ref : ${{ inputs.branch }}
45
- path : /home/runner/work/toolbelt
46
-
47
31
- name : ' Set up Node.js'
48
32
uses : actions/setup-node@v3
49
33
with :
50
34
node-version : 16
51
- cache : yarn
52
- cache-dependency- path : toolbelt/yarn.lock
53
- continue-on-error : true
54
-
35
+ - name : Get yarn cache path
36
+ id : cache-path
37
+ run : echo "::set-output name=dir::$(yarn cache dir)"
38
+ shell : bash
55
39
- name : Cache VTEX Toolbelt
56
40
id : cache-toolbelt
57
41
uses : actions/cache@v3
58
42
with :
59
- path : |
60
- toolbelt
61
- /usr/local/bin/${{ inputs.bin }}
62
- key : ${{ runner.os }}-${{ inputs.git }}-${{ inputs.branch }}-${{ inputs.bin }}
63
-
64
-
43
+ path : ${{ steps.cache-path.outputs.dir }}
44
+ key : ${{ runner.os }}-yarn-${{ inputs.version }}
45
+ restore-keys : |
46
+ ${{ runner.os }}-yarn
65
47
- name : Install VTEX Toolbelt
66
- if : steps.cache-toolbelt.outputs.cache-hit != 'true'
48
+ # if: steps.cache-toolbelt.outputs.cache-hit != 'true'
67
49
run : |
68
- yarn install --frozen-lockfile
69
- yarn build
70
- cp bin/run bin/${{ inputs.bin }}
71
- ln -s $(pwd)/bin/${{ inputs.bin }} /usr/local/bin/
72
- ${{ inputs.bin }} whoami || echo "First call to warm it up"
73
- VERSION=$(${{ inputs.bin }} version)
50
+ yarn global add vtex@${{ inputs.version }}
51
+ VERSION=$(vtex version)
74
52
echo ::notice title=VTEX Toolbelt version::$VERSION
75
- working-directory : /home/runner/work/toolbelt
76
53
shell : bash
77
-
78
54
- run : |
79
55
bash $GITHUB_ACTION_PATH/entrypoint.sh
80
- shell: bash
81
56
env:
82
- VTEX_BIN: ${{ inputs.bin }}
83
57
VTEX_ACCOUNT: ${{ inputs.account }}
84
58
VTEX_APP_KEY: ${{ inputs.appKey }}
85
59
VTEX_APP_TOKEN: ${{ inputs.appToken }}
86
60
VTEX_AUTHENTICATE: ${{ inputs.authenticate }}
87
61
VTEX_WORKSPACE: ${{ inputs.workspace }}
88
- VTEX_TOOLBELT_GIT: ${{ inputs.git }}
89
- VTEX_TOOLBELT_BRANCH: ${{ inputs.branch }}
62
+ shell: bash
90
63
91
64
branding :
92
65
icon : terminal
0 commit comments