Skip to content

Commit

Permalink
[Dependencies] - Update .github/workflows/pr-lint.yml to match the te…
Browse files Browse the repository at this point in the history
…mplate repo
  • Loading branch information
credfeto committed Oct 9, 2023
1 parent 2cb502a commit 5a1cb8b
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"
Expand All @@ -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
Expand All @@ -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]
Expand All @@ -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
Expand Down Expand Up @@ -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}}"
Expand All @@ -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}}"
Expand All @@ -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}}"
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 5a1cb8b

Please sign in to comment.