Skip to content

Commit b4849e4

Browse files
authored
Security fixes (#7)
* #4 #5 * added deploy script * dep
1 parent a786d17 commit b4849e4

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy to Azure
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
appenv:
7+
type: choice
8+
description: Choose the target environment
9+
options:
10+
- dev
11+
- test
12+
- prod
13+
14+
jobs:
15+
deploy:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
19+
pages: write
20+
id-token: write
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@main
25+
26+
- name: Log in to Azure
27+
uses: azure/[email protected]
28+
with:
29+
client-id: ${{ secrets.AZURE_CLIENT_ID }}
30+
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
31+
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
32+
enable-AzPSSession: true
33+
34+
- name: Deploy ARM Template
35+
uses: azure/arm-deploy@v1
36+
with:
37+
subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
38+
resourceGroupName: ${{ secrets.AZURE_RG }}
39+
template: ./src/InfrastructureAsCode/main.bicep
40+
deployment-name: arm-deployment
41+
parameters: environment=${{ github.event.inputs.appenv }}

src/Application/src/RazorPagesTestSample/Data/Message.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class Message
99

1010
[Required]
1111
[DataType(DataType.Text)]
12-
[StringLength(250, ErrorMessage = "There's a 200 character limit on messages. Please shorten your message.")]
12+
[StringLength(250, ErrorMessage = "There's a 250 character limit on messages. Please shorten your message.")]
1313
public string Text { get; set; }
1414
}
1515
#endregion

0 commit comments

Comments
 (0)