|
1 |
| -# This is a basic workflow to help you get started with Actions |
2 | 1 | name: 'Snippets 5000'
|
3 | 2 |
|
4 | 3 | # Controls when the action will run. Triggers the workflow on push or pull request
|
|
10 | 9 | workflow_dispatch:
|
11 | 10 | inputs:
|
12 | 11 | reason:
|
13 |
| - description: 'The reason for running the workflow' |
| 12 | + description: 'Run Snippets 5000 to compile code' |
14 | 13 | required: true
|
15 | 14 | default: 'Manual run'
|
16 | 15 |
|
17 | 16 | env:
|
18 |
| - DOTNET_INSTALLER_CHANNEL: '8.0' |
19 |
| - DOTNET_DO_INSTALL: 'false' # True to install preview versions, False to use the pre-installed (released) SDK |
| 17 | + DOTNET_VERSION: '9.0.*' |
| 18 | + DOTNET_QUALITY: 'preview' |
| 19 | + DOTNET_DO_INSTALL: 'true' # To install a version of .NET not provided by the runner, set to true |
20 | 20 | EnableNuGetPackageRestore: 'True'
|
21 |
| - repo: 'dotnet-api-docs' |
22 | 21 |
|
23 |
| -# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
24 | 22 | jobs:
|
25 |
| - # This workflow contains a single job called "snippets-build" |
26 | 23 | snippets-build:
|
27 |
| - # The type of runner that the job will run on |
28 | 24 | runs-on: windows-2022
|
29 | 25 | permissions:
|
30 | 26 | statuses: write
|
31 | 27 |
|
32 |
| - # Steps represent a sequence of tasks that will be executed as part of the job |
33 | 28 | steps:
|
34 |
| - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
35 |
| - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 #@v3.1.0 |
| 29 | + # Check out the repository for the PR |
| 30 | + - name: Check out repository |
| 31 | + uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b #@v4.1.5 |
36 | 32 |
|
37 | 33 | # Get the latest preview SDK (or sdk not installed by the runner)
|
38 |
| - - name: Setup .NET SDK |
| 34 | + - name: Set up .NET SDK |
39 | 35 | if: ${{ env.DOTNET_DO_INSTALL == 'true' }}
|
40 |
| - run: | |
41 |
| - echo "Downloading dotnet-install.ps1" |
42 |
| - Invoke-WebRequest https://raw.githubusercontent.com/dotnet/install-scripts/master/src/dotnet-install.ps1 -OutFile dotnet-install.ps1 |
43 |
| - echo "Installing dotnet version ${{ env.DOTNET_INSTALLER_CHANNEL }}" |
44 |
| - .\dotnet-install.ps1 -InstallDir "c:\program files\dotnet" -Channel "${{ env.DOTNET_INSTALLER_CHANNEL }}" -Quality preview |
| 36 | + uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 #@4.0.0 |
| 37 | + with: |
| 38 | + dotnet-version: ${{ env.DOTNET_VERSION }} |
| 39 | + dotnet-quality: ${{ env.DOTNET_QUALITY }} |
45 | 40 |
|
46 | 41 | # Print dotnet info
|
47 | 42 | - name: Display .NET info
|
48 | 43 | run: |
|
49 | 44 | dotnet --info
|
50 | 45 |
|
51 |
| - # Clone docs tools repo |
| 46 | + # Clone docs-tools repo |
52 | 47 | - name: Clone docs-tools repository
|
53 | 48 | run: |
|
54 | 49 | git clone https://github.com/dotnet/docs-tools
|
|
58 | 53 | env:
|
59 | 54 | GitHubKey: ${{ secrets.GITHUB_TOKEN }}
|
60 | 55 | run: |
|
61 |
| - dotnet run --project docs-tools\snippets5000\Snippets5000\Snippets5000.csproj -- --sourcepath "${{ github.workspace }}" --pullrequest ${{ github.event.number }} --owner ${{ github.repository_owner }} --repo ${{ github.event.repository.name }} |
62 |
| -
|
63 |
| - # Update build output json file |
64 |
| - - name: Upload build results |
65 |
| - uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce #@v3.1.2 |
66 |
| - with: |
67 |
| - name: build |
68 |
| - path: ./output.json |
| 56 | + dotnet run --project docs-tools/snippets5000/Snippets5000/Snippets5000.csproj -- --sourcepath "${{ github.workspace }}" --pullrequest ${{ github.event.number }} --owner ${{ github.repository_owner }} --repo ${{ github.event.repository.name }} |
0 commit comments