Workflow to install LINQPad and run remaining scripts #2
Workflow file for this run
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: RunScripts | |
on: | |
workflow_dispatch: | |
pull_request: | |
env: | |
DOTNET_NOLOGO: true | |
DOTNET_ROLL_FORWARD: Major | |
jobs: | |
run-scripts: | |
name: Run scripts | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install LINQPad | |
run: choco install linqpad | |
- name: Add LINQPad to PATH | |
run: | | |
echo "C:\Program Files\LinqPad8" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
Get-ChildItems "C:\Program Files (x86)" | |
Get-ChildItems "C:\Program Files" | |
- name: Update Core Dependencies | |
run: lprun8 tools\coreDependencies.linq | |
- name: Update 3rd-Party Licenses | |
run: lprun8 tools\3rd-party-licenses.linq | |
- name: Git Status | |
run: git Status | |
- name: Stage Changes | |
run: git add --all | |
- name: Git Status | |
run: git Status | |
# - name: Notify Slack on failure | |
# if: ${{ failure() }} | |
# shell: pwsh | |
# run: | | |
# $headers = @{ | |
# 'Authorization' = "Bearer ${{ secrets.SLACK_TOKEN }}" | |
# } | |
# $body = @{ | |
# channel = 'docs' | |
# text = "Failed to run scripts in Docs repo: https://github.com/Particular/docs.particular.net/actions/workflows/run-scripts.yml?query=branch%3Amaster" | |
# username = 'Run Scripts' | |
# icon_emoji = 'github_actions' | |
# unfurl_links = false | |
# unfurl_media = false | |
# } | ConvertTo-Json | |
# $result = Invoke-RestMethod -Method POST -Uri https://slack.com/api/chat.postMessage -ContentType "application/json; charset=utf-8" -Headers $headers -Body $body | |
# Write-Output $result | |
# exit $(If ($result.ok) { 0 } Else { 1 }) |