-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (56 loc) · 1.79 KB
/
deploy.yml
File metadata and controls
65 lines (56 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Deploy
on:
workflow_call:
secrets:
role:
description: Role to use when performing the deployment.
required: true
discord-webhook:
description: Webhook to notify of deployment failures.
required: true
inputs:
environment:
description: Environment to use for this deployment.
type: string
required: true
env:
DOTNET_NOLOGO: "true"
CONFIGURATION: Release
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT: "true"
DOTNET_SYSTEM_GLOBALIZATION_PREDEFINED_CULTURES_ONLY: "false"
jobs:
deploy:
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
concurrency: ${{ inputs.environment }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.role }}
aws-region: us-east-1
- name: Setup .NET Core
uses: actions/setup-dotnet@v2
- name: Display .NET Info
run: dotnet --info
- name: Deploy
run: |
dotnet run \
--project cicd/Cicd.DeployDriver/Cicd.DeployDriver.csproj
- name: Notify Deployment Failure
uses: Ilshidur/action-discord@master
if: failure()
env:
DISCORD_WEBHOOK: ${{ secrets.discord-webhook }}
DISCORD_EMBEDS: |
[
{
"title": "[${{ github.repository }}] ${{ inputs.environment }} Deployment Failure",
"url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}",
"description": "${{ github.repository }} failed to deploy to ${{ inputs.environment }}.",
"color": 12720135
}
]