Skip to content

Commit 94063ae

Browse files
committed
Improve README content
1 parent bc10db4 commit 94063ae

File tree

4 files changed

+23
-12
lines changed

4 files changed

+23
-12
lines changed

README.md

+23-4
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,41 @@ This action will Setup WSO2 API-CTL in a Lunux environment. Since there are no u
88

99
**Optional** The version of the APICTL to setup. Default `"4.1.0"`.
1010

11-
The version will be picked from the Github releases : https://github.com/wso2/product-apim-tooling/releases. Ex: 4.1.0
11+
The version will be picked from the Github releases : https://github.com/wso2/product-apim-tooling/releases. Ex: 4.1.0 or v4.1.0
1212

1313
## `tarball_location`
1414

1515
**Optional** A location to an APICTL Tarball if it needs to be downloaded from custom location. No Default
1616

1717
## Example usage
1818

19-
```
19+
```yaml
2020
uses: yasassri/setup-wso2-apictl@v1.0
2121
with:
2222
version: '4.1.0'
2323
```
2424
25-
```
25+
```yaml
2626
uses: yasassri/setup-wso2-apictl@v1.0
2727
with:
2828
tarball_location: 'https://github.com/wso2/product-apim-tooling/releases/download/v4.1.0/apictl-4.1.0-linux-x64.tar.gz'
29-
```
29+
```
30+
31+
### Full workflow
32+
33+
```yaml
34+
name: WSO2_APIM
35+
on: [push, pull_request_target, issues]
36+
37+
jobs:
38+
wso2:
39+
runs-on: ubuntu-latest
40+
permissions:
41+
issues: write
42+
pull-requests: write
43+
steps:
44+
- uses: yasassri/setup-wso2-apictl@v1.0
45+
with:
46+
version: 'v3.2.5'
47+
- run: apictl version
48+
```

dist/index.js

-4
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@ async function setup() {
1515
var version = core.getInput('version');
1616
var url = core.getInput('tarball_location');
1717

18-
19-
console.log("version:::: " +version)
20-
console.log("URL:::: " +url)
2118
// If a URL not set, generate the URL based on the version
2219
if(url == null || url.trim() == '') {
2320
url = getDownloadURL(version)
@@ -52,7 +49,6 @@ if (require.main === require.cache[eval('__filename')]) {
5249
function getDownloadURL(version) {
5350

5451
// If the version is provided like v4.1.0 strippingout the 'v'
55-
console.log("DEBUG:::: " + version.toLowerCase().includes("v"));
5652
if(version.toLowerCase().includes("v")) {
5753
version = version.substring(version.toLowerCase().indexOf('v') + 1);
5854
}

index.js

-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ async function setup() {
99
var version = core.getInput('version');
1010
var url = core.getInput('tarball_location');
1111

12-
13-
console.log("version:::: " +version)
14-
console.log("URL:::: " +url)
1512
// If a URL not set, generate the URL based on the version
1613
if(url == null || url.trim() == '') {
1714
url = getDownloadURL(version)

lib/utils.js

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
function getDownloadURL(version) {
77

88
// If the version is provided like v4.1.0 strippingout the 'v'
9-
console.log("DEBUG:::: " + version.toLowerCase().includes("v"));
109
if(version.toLowerCase().includes("v")) {
1110
version = version.substring(version.toLowerCase().indexOf('v') + 1);
1211
}

0 commit comments

Comments
 (0)