File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 steps :
1212 - name : Checkout
1313 uses : actions/checkout@v4
14-
15- - name : Test MultiTool Action
16- uses : " wack/multitool-action@${{ env.GITHUB_SHA }}"
14+
15+ # Test whether the Action installs correctly.
16+ - name : Install MultiTool via Action
17+ uses : " ./"
18+ with :
19+ install-only : true
20+ version : " v0.3.0"
21+
22+ - name : " Test CLI is installed"
23+ run : " which multi"
24+
25+ - name : " Test CLI help works"
26+ run : " multi -h"
27+
28+ - name : " Test CLI version matches"
29+ run : |
30+ if [ $(multi version) = "v0.3.0" ]; then
31+ echo "Version is correct."
32+ else
33+ echo "Version is incorrect."
34+ exit 1
35+ fi
36+
37+ # Test whether the Action logs in correctly.
38+ - name : Login
39+ uses : " ./"
1740 with :
18- input-string : " test input"
41+ email : ${{ secrets.MULTITOOL_QA_EMAIL }}
42+ password : ${{ secrets.MULTITOOL_QA_PASSWORD }}
43+ dry-run : true
44+ cache-binary : false
Original file line number Diff line number Diff line change 11name : ' MultiTool'
2+ # TODO: Add an action description.
3+ # TODO: Run Taplo YAML checker over this file.
4+ # TODO: Change single quotes to double quotes
25description : ' '
36
47inputs :
5- input-string :
6- description : ' Input string'
7- required : true
8+ version :
9+ description : ' Version string (e.g. v0.3.0). If none provided, defaults to latest'
10+ required : false
11+ default : " latest"
12+
13+ install-only :
14+ description : " Whether to install the CLI and then exit"
15+ required : false
16+ default : false
17+
18+ dry-run :
19+ description : " Skips running `multi run`. Useful for testing login credentials."
20+ required : false
21+ default : false
22+
23+ email :
24+ description : " An email address to use when logging in."
25+ required : false
26+
27+ password :
28+ description : " The password to use when logging in. NB: Pass this as an environment secret."
29+ required : false
30+
31+ cache-binary :
32+ description : " When enabled (default), the `multi` binary will be added to the Actions cache and reused between runs"
33+ required : false
34+ default : true
835
936outputs :
1037 output-string :
@@ -14,8 +41,20 @@ outputs:
1441runs :
1542 using : ' composite'
1643 steps :
17- - name : ' MultiTool Step'
18- id : multitool-step
44+ - name : Install the MultiTool CLI
45+ uses : jaxxstorm/action-install-gh-release@v2.1.0
46+ with : # Grab the latest version
47+ repo : wack/multitool
48+ tag : ${{ inputs.version }}
49+ cache : ${{ inputs.cache-binary && 'enable' }}
50+
51+ - name : Login
52+ shell : bash
53+ if : ${{ !inputs.install-only }}
54+ run : " multi login --enable-colors=always --email=${{ inputs.email }} --password=${{ inputs.password }}"
55+
56+ - name : Multi Run
1957 shell : bash
20- run : |
21- echo "result=${{ inputs.input-string }}" >> $GITHUB_OUTPUT
58+ if : ${{ !(inputs.install-only || inputs.dry-run) }}
59+ run : " multi run --enable-colors=always"
60+
You can’t perform that action at this time.
0 commit comments