Skip to content

Commit 3bd04a7

Browse files
authored
Adding Resource Group As Optional Param (#283)
* Adding Resource Group As Optional Param * changed the appservice web client version
1 parent 1217efd commit 3bd04a7

File tree

7 files changed

+20
-13
lines changed

7 files changed

+20
-13
lines changed

action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ inputs:
2525
startup-command:
2626
description: 'Enter the start up command. For ex. dotnet run or dotnet run'
2727
required: false
28+
resource-group-name:
29+
description: 'Enter the resource group name of the web app'
30+
required: false
31+
2832
outputs:
2933
webapp-url:
3034
description: 'URL to work with your webapp'

lib/ActionInputValidator/ValidatorFactory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class ValidatorFactory {
6565
}
6666
static getResourceDetails(params) {
6767
return __awaiter(this, void 0, void 0, function* () {
68-
let appDetails = yield AzureResourceFilterUtility_1.AzureResourceFilterUtility.getAppDetails(params.endpoint, params.appName);
68+
let appDetails = yield AzureResourceFilterUtility_1.AzureResourceFilterUtility.getAppDetails(params.endpoint, params.appName, params.resourceGroupName);
6969
params.resourceGroupName = appDetails["resourceGroupName"];
7070
params.realKind = appDetails["kind"];
7171
params.kind = actionparameters_1.appKindMap.get(params.realKind);

lib/actionparameters.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ exports.appKindMap = new Map([
2121
['app', WebAppKind.Windows],
2222
['app,linux', WebAppKind.Linux],
2323
['app,container,windows', WebAppKind.WindowsContainer],
24-
['app,linux,container', WebAppKind.LinuxContainer]
24+
['app,linux,container', WebAppKind.LinuxContainer],
25+
['api', WebAppKind.Windows],
2526
]);
2627
class ActionParameters {
2728
constructor(endpoint) {
@@ -32,6 +33,7 @@ class ActionParameters {
3233
this._images = core.getInput('images');
3334
this._multiContainerConfigFile = core.getInput('configuration-file');
3435
this._startupCommand = core.getInput('startup-command');
36+
this._resourceGroupName = core.getInput('resource-group-name');
3537
/**
3638
* Trimming the commit message because it is used as a param in uri of deployment api. And sometimes, it exceeds the max length of http URI.
3739
*/

package-lock.json

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@actions/core": "^1.10.0",
3535
"@actions/github": "^4.0.0",
3636
"actions-secret-parser": "^1.0.4",
37-
"azure-actions-appservice-rest": "^1.3.3",
37+
"azure-actions-appservice-rest": "^1.3.6",
3838
"azure-actions-utility": "^1.0.3",
3939
"azure-actions-webclient": "^1.1.0"
4040
}

src/ActionInputValidator/ValidatorFactory.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export class ValidatorFactory {
5252
}
5353

5454
private static async getResourceDetails(params: ActionParameters) {
55-
let appDetails = await AzureResourceFilterUtility.getAppDetails(params.endpoint, params.appName);
55+
let appDetails = await AzureResourceFilterUtility.getAppDetails(params.endpoint, params.appName, params.resourceGroupName);
5656
params.resourceGroupName = appDetails["resourceGroupName"];
5757
params.realKind = appDetails["kind"];
5858
params.kind = appKindMap.get(params.realKind);

src/actionparameters.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ export class ActionParameters {
4444
this._images = core.getInput('images');
4545
this._multiContainerConfigFile = core.getInput('configuration-file');
4646
this._startupCommand = core.getInput('startup-command');
47+
this._resourceGroupName = core.getInput('resource-group-name');
4748
/**
4849
* Trimming the commit message because it is used as a param in uri of deployment api. And sometimes, it exceeds the max length of http URI.
4950
*/

0 commit comments

Comments
 (0)