-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Dependencies] - Update .github/workflows/pr-lint.yml to match the te…
…mplate repo
- Loading branch information
Showing
1 changed file
with
24 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,12 @@ jobs: | |
if: ${{endsWith(github.repository, '-template')}} | ||
runs-on: [self-hosted, linux] | ||
steps: | ||
- run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" | ||
- run: | | ||
- name: "Initialise Workspace" | ||
shell: bash | ||
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" | ||
- name: "Info" | ||
shell: bash | ||
run: | | ||
echo "Branch: ${{env.HEAD_REF}}" | ||
echo "Base Branch: ${{env.BASE_REF}}" | ||
echo "Repo: ${{github.repository}}" | ||
|
@@ -32,6 +36,7 @@ jobs: | |
# runs-on: [self-hosted, linux] | ||
# steps: | ||
# - name: "Initialise Workspace" | ||
# shell: bash | ||
# run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" | ||
# - name: "Checkout Source" | ||
# uses: actions/checkout@v4 | ||
|
@@ -51,12 +56,14 @@ jobs: | |
runs-on: [self-hosted, linux] | ||
steps: | ||
- name: "Initialise Workspace" | ||
shell: bash | ||
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" | ||
- if: ${{(github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))}} | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- if: ${{(github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))}} | ||
shell: bash | ||
run: echo "CHANGES=$(git diff --exit-code --no-patch --merge-base origin/main CHANGELOG.md 2> /dev/null && echo 0 || echo $?)" >> "$GITHUB_ENV" | ||
- if: ${{(github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) && env.CHANGES == '0'}} | ||
uses: actions/[email protected] | ||
|
@@ -70,6 +77,7 @@ jobs: | |
runs-on: [self-hosted, linux] | ||
steps: | ||
- name: "Initialise Workspace" | ||
shell: bash | ||
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" | ||
- name: "Checkout Source" | ||
uses: actions/checkout@v4 | ||
|
@@ -101,6 +109,7 @@ jobs: | |
${{env.DOTNET_VERSION}} | ||
- name: "Enable dotnet tools" | ||
if: ${{(github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))}} | ||
shell: bash | ||
run: dotnet new tool-manifest | ||
env: | ||
DDOTNET_ROOT: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}" | ||
|
@@ -113,6 +122,7 @@ jobs: | |
DOTNET_TieredPGO: "1" | ||
- name: "Install Changelog tool" | ||
if: ${{(github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))}} | ||
shell: bash | ||
run: dotnet tool install --local Credfeto.ChangeLog.Cmd | ||
env: | ||
DDOTNET_ROOT: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}" | ||
|
@@ -125,6 +135,7 @@ jobs: | |
DOTNET_TieredPGO: "1" | ||
- name: "Check Changelog" | ||
if: ${{(github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))}} | ||
shell: bash | ||
run: dotnet changelog --changelog CHANGELOG.md --check-insert "origin/${{github.base_ref}}" | ||
env: | ||
DDOTNET_ROOT: "${{github.workspace}}/.dotnet/${{github.sha}}-${{github.run_id}}-${{github.run_number}}-${{github.run_attempt}}" | ||
|
@@ -141,6 +152,7 @@ jobs: | |
runs-on: [self-hosted, linux] | ||
steps: | ||
- name: "Initialise Workspace" | ||
shell: bash | ||
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" | ||
- name: "Checkout Source" | ||
uses: actions/checkout@v4 | ||
|
@@ -162,6 +174,7 @@ jobs: | |
runs-on: [self-hosted, linux] | ||
steps: | ||
- name: "Initialise Workspace" | ||
shell: bash | ||
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" | ||
- name: "Checkout Source" | ||
uses: actions/checkout@v4 | ||
|
@@ -175,6 +188,7 @@ jobs: | |
runs-on: [self-hosted, linux] | ||
steps: | ||
- name: "Initialise Workspace" | ||
shell: bash | ||
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" | ||
- name: "Checkout Source" | ||
uses: actions/checkout@v4 | ||
|
@@ -188,6 +202,7 @@ jobs: | |
runs-on: [self-hosted, linux] | ||
steps: | ||
- name: "Initialise Workspace" | ||
shell: bash | ||
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" | ||
- name: "Checkout Source" | ||
uses: actions/checkout@v4 | ||
|
@@ -202,6 +217,7 @@ jobs: | |
runs-on: [self-hosted, linux] | ||
steps: | ||
- name: "Initialise Workspace" | ||
shell: bash | ||
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" | ||
- uses: credfeto/[email protected] | ||
id: visibility | ||
|
@@ -210,7 +226,7 @@ jobs: | |
repository: ${{github.repository}} | ||
# optional parameter defaults to the current user | ||
token: ${{github.token}} | ||
- name: 'Checkout Repository' | ||
- name: "Checkout Source" | ||
if: ${{steps.visibility.outputs.is_public == 'true'}} | ||
uses: actions/checkout@v4 | ||
with: | ||
|
@@ -224,7 +240,9 @@ jobs: | |
if: github.event.pull_request.draft == false | ||
runs-on: [self-hosted, linux] | ||
steps: | ||
- run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" | ||
- name: "Initialise Workspace" | ||
shell: bash | ||
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" | ||
- name: "Checkout Source" | ||
uses: actions/checkout@v4 | ||
with: | ||
|
@@ -237,8 +255,9 @@ jobs: | |
runs-on: [self-hosted, linux] | ||
steps: | ||
- name: "Initialise Workspace" | ||
shell: bash | ||
run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" | ||
- name: 'Checkout Repository' | ||
- name: "Checkout Source" | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|