Repository navigation
49 lines (43 loc) · 1.77 KB
/
Copy pathversion-sweep.yml
File metadata and controls
49 lines (43 loc) · 1.77 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
name: "target supported version"
on:
# Triggers the workflow on push or pull request events but only for the default branch
schedule:
- cron: "0 0 1 * *"
workflow_dispatch:
inputs:
reason:
description: "The reason for running the workflow"
required: true
default: "Manual run"
type: string
support:
description: "The support level to target (STS, LTS, or Preview)."
required: true
default: "STS"
type: string
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
permissions:
contents: read
jobs:
# This workflow contains a single job called "build"
version-sweep:
if: ${{ github.event_name == 'workflow_dispatch' || !github.event.repository.fork }}
# The type of runner that the job will run on
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Start the .NET version updater action
# A composite of the .NET Version Sweeper and the .NET Upgrade Assistant
- name: Harden Runner
uses: step-security/harden-runner@aebdcf6156ab6691adf63218240e476564a1ed4c # v2.23.0
with:
egress-policy: audit
- name: .NET version updater
id: dotnet-version-updater
uses: dotnet/docs-actions/dotnet-version-updater@e92e67a4b93ea5976eea3d65af4b2082818c7045 # main
with:
support: ${{ github.event.inputs.support }}
token: ${{ secrets.GITHUB_TOKEN }}