mirror of
https://github.com/Stone-Red-Code/docs-desktop.git
synced 2026-09-04 00:56:03 +02:00
Update workflows (#1112)
* Update build-validation.yml * Create live-protection.yml * Create docs-verifier.yml * Delete docs-verifier.yml
This commit is contained in:
@@ -18,13 +18,14 @@ on:
|
||||
- "**.vbproj"
|
||||
- "**.fsproj"
|
||||
- "**.vcxproj"
|
||||
- "**.sln"
|
||||
- "**global.json"
|
||||
- "**snippets.5000.json"
|
||||
branches: '*'
|
||||
|
||||
env:
|
||||
DOTNET_INSTALLER_CHANNEL: 'release/5.0.1xx'
|
||||
DOTNET_DO_INSTALL: 'false'
|
||||
DOTNET_INSTALLER_CHANNEL: '6.0'
|
||||
DOTNET_DO_INSTALL: 'true'
|
||||
EnableNuGetPackageRestore: 'True'
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
@@ -40,7 +41,7 @@ jobs:
|
||||
- uses: actions/checkout@a81bbbf8298c0fa03ea29cdc473d45769f953675 #@v2
|
||||
|
||||
# Get the latest preview SDK (or sdk not installed by the runner)
|
||||
- name: Setup .NET Core SDK Preview
|
||||
- name: Setup .NET SDK
|
||||
if: ${{ env.DOTNET_DO_INSTALL == 'true' }}
|
||||
run: |
|
||||
echo "Downloading dotnet-install.ps1"
|
||||
@@ -48,6 +49,11 @@ jobs:
|
||||
echo "Installing dotnet version ${{ env.DOTNET_INSTALLER_CHANNEL }}"
|
||||
.\dotnet-install.ps1 -InstallDir "c:\program files\dotnet" -Channel "${{ env.DOTNET_INSTALLER_CHANNEL }}"
|
||||
|
||||
# Print dotnet info
|
||||
- name: Display .NET info
|
||||
run: |
|
||||
dotnet --info
|
||||
|
||||
# Install locate projs global tool
|
||||
- name: Install LocateProjects tool
|
||||
run: |
|
||||
@@ -72,6 +78,3 @@ jobs:
|
||||
- name: Report status
|
||||
run: |
|
||||
./.github/workflows/dependencies/Out-GithubActionStatus.ps1
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
on: [pull_request_target]
|
||||
|
||||
jobs:
|
||||
comment:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v4
|
||||
env:
|
||||
SHOULD_COMMENT: ${{ github.base_ref == 'refs/heads/live' && !(github.event.issue.user.login == 'cxwtool' || github.head_ref == 'refs/heads/main') }}
|
||||
with:
|
||||
script: |
|
||||
if (process.env.SHOULD_COMMENT == 'true') {
|
||||
github.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: 'It looks like this pull request may have been opened on the `live` branch by mistake. In general, PRs should target the `main` branch.'
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user