Check for new core technologies #351
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@cba0d00b1fc9a034e1e642ea0f1103c282990604 # v2.5.0 | |
with: | |
egress-policy: audit # Leave it audit mode | |
- name: Checkout | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
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 build | |
- name: Check for updates to core technology packages | |
run: | | |
if [ ${{ github.event.inputs.daysToSearch }} != "" ]; then | |
export DOTTY_DAYS_TO_SEARCH=${{ github.event.inputs.daysToSearch }} | |
fi | |
if [ "${{ github.event.inputs.testMode }}" == "true" ]; then | |
export DOTTY_TEST_MODE="True" | |
fi | |
cd ${{ env.scan-tool-path }}/bin/Debug/net6.0 | |
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-path }}/bin/Debug/net6.0/newrelic | |
CORECLR_PROFILER: "{36032161-FFC0-4B61-B559-F6C5D41BAE5A}" | |
CORECLR_PROFILER_PATH: ${{ env.scan-tool-path }}/bin/Debug/net6.0/newrelic/libNewRelicProfiler.so | |
NEW_RELIC_APP_NAME: Dotty | |
NEW_RELIC_HOST: staging-collector.newrelic.com | |
NEW_RELIC_LICENSE_KEY: ${{ secrets.STAGING_LICENSE_KEY }} | |
nugets: | |
"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 | |
stackexchange.redis | |
system.data.sqlclient" | |