-
Notifications
You must be signed in to change notification settings - Fork 64
105 lines (94 loc) · 3.61 KB
/
nuget_slack_notifications.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Check for new core technologies
on:
schedule:
- cron: '0 10 * * *'
workflow_dispatch:
inputs:
daysToSearch:
description: "Days of NuGet history to search for package updates"
default: "1"
type: string
testMode:
description: "If checked, no notification message will be sent to the team channel, nor will any Github issues be created."
type: boolean
default: false
env:
DOTNET_NOLOGO: true
permissions:
contents: read
jobs:
nuget-slack-notifications:
name: Check for core technology package updates
runs-on: ubuntu-latest
permissions:
issues: write
continue-on-error: false
env:
scan-tool-path: ${{ github.workspace }}/.github/workflows/scripts/nugetSlackNotifications
scan-tool-publish-path: ${{ github.workspace }}/publish
steps:
- name: Harden Runner
uses: step-security/harden-runner@17d0e2bd7d51742c71671bd19fa12bdc9d40a3d6 # v2.8.1
with:
egress-policy: audit # Leave it audit mode
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: Add agent via nuget and then build the tool
run: |
cd ${{ env.scan-tool-path }}
dotnet add nugetSlackNotifications.csproj package NewRelic.Agent
dotnet publish -o ${{ env.scan-tool-publish-path }}
- name: Check for updates to core technology packages
run: |
if [ ${{ inputs.daysToSearch }} != "" ]; then
export DOTTY_DAYS_TO_SEARCH=${{ inputs.daysToSearch }}
fi
if [ "${{ inputs.testMode }}" == "true" ]; then
export DOTTY_TEST_MODE="True"
fi
cd ${{ env.scan-tool-publish-path }}
dotnet ./nugetSlackNotifications.dll ${{ env.nugets }}
shell: bash
env:
DOTTY_WEBHOOK: ${{ secrets.SLACK_NUGET_NOTIFICATIONS_WEBHOOK }}
DOTTY_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CORECLR_ENABLE_PROFILING: 1
CORECLR_NEWRELIC_HOME: ${{ env.scan-tool-publish-path }}/newrelic
CORECLR_PROFILER: "{36032161-FFC0-4B61-B559-F6C5D41BAE5A}"
CORECLR_PROFILER_PATH: ${{ env.scan-tool-publish-path }}/newrelic/libNewRelicProfiler.so
NEW_RELIC_APP_NAME: Dotty
NEW_RELIC_HOST: staging-collector.newrelic.com
NEW_RELIC_LICENSE_KEY: ${{ secrets.STAGING_LICENSE_KEY }}
nugets:
"amazon.lambda.apigatewayevents
amazon.lambda.applicationloadbalancerevents
amazon.lambda.cloudwatchevents
amazon.lambda.dynamodbevents
amazon.lambda.kinesisevents
amazon.lambda.kinesisfirehoseevents
amazon.lambda.s3events
amazon.lambda.simpleemailevents
amazon.lambda.snsevents
amazon.lambda.sqsevents
elasticsearch.net
elastic.clients.elasticsearch
log4net
microsoft.extensions.logging
microsoft.data.sqlclient
microsoft.net.http
mongodb.driver
mysql.data
mysqlconnector
nest
nlog
rabbitmq.client
restsharp
serilog
serilog.extensions.logging
serilog.aspnetcore
serilog.sinks.file
serilog.sinks.console
stackexchange.redis
system.data.sqlclient"