From 90c97cb99a3094d30ee7e13377cea5c8f4085dc3 Mon Sep 17 00:00:00 2001 From: Mark Ridgwell Date: Thu, 26 Oct 2023 10:19:59 +0000 Subject: [PATCH] [Dependencies] - Update .github/workflows/pr-lint.yml to match the template repo --- .github/workflows/pr-lint.yml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/pr-lint.yml b/.github/workflows/pr-lint.yml index 0b0640e8..f7045a09 100644 --- a/.github/workflows/pr-lint.yml +++ b/.github/workflows/pr-lint.yml @@ -17,7 +17,7 @@ env: BASE_REF: ${{github.base_ref}} jobs: info: - if: ${{endsWith(github.repository, '-template')}} + if: endsWith(github.repository, '-template') runs-on: ubuntu-latest steps: - name: "Initialise Workspace" @@ -43,9 +43,9 @@ jobs: # with: # fetch-depth: 0 # - if: |- -# ${{!endsWith(github.repository, '-template') +# !endsWith(github.repository, '-template') # && !startsWith(github.head_ref, 'release/') -# && !startsWith(github.head_ref, 'hotfix/')}} +# && !startsWith(github.head_ref, 'hotfix/') # uses: seferov/pr-lint-action@v1.2.0 # with: # title-regex: '^\[FF\-\d*?\](:)?(\ )' @@ -58,14 +58,14 @@ jobs: - name: "Initialise Workspace" shell: bash run: sudo chown -R "$USER:$USER" "$GITHUB_WORKSPACE" - - if: ${{(github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))}} + - 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'))}} + - 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'}} + - if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) && env.CHANGES == '0' uses: actions/github-script@v6.4.1 with: script: | @@ -84,13 +84,13 @@ jobs: with: fetch-depth: 0 - name: "Get version from global.json" - if: ${{(github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))}} + if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) uses: credfeto/action-dotnet-version-detect@v1.3.0 with: file: src/global.json fallback: 7.0.* - name: "Install dotnet" - if: ${{(github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))}} + if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) uses: actions/setup-dotnet@v3.2.0 env: GITHUB_TOKEN: ${{secrets.SOURCE_PUSH_TOKEN}} @@ -108,7 +108,7 @@ jobs: 7.0.* ${{env.DOTNET_VERSION}} - name: "Enable dotnet tools" - if: ${{(github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))}} + if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) shell: bash run: dotnet new tool-manifest env: @@ -121,7 +121,7 @@ jobs: DOTNET_TC_QuickJitForLoops: "1" DOTNET_TieredPGO: "1" - name: "Install Changelog tool" - if: ${{(github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))}} + if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) shell: bash run: dotnet tool install --local Credfeto.ChangeLog.Cmd env: @@ -134,7 +134,7 @@ jobs: DOTNET_TC_QuickJitForLoops: "1" DOTNET_TieredPGO: "1" - name: "Check Changelog" - if: ${{(github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template'))}} + if: (github.actor != 'dependabot[bot]' && !endsWith(github.repository , '-template')) shell: bash run: dotnet changelog --changelog CHANGELOG.md --check-insert "origin/${{github.base_ref}}" env: @@ -227,12 +227,12 @@ jobs: # optional parameter defaults to the current user token: ${{github.token}} - name: "Checkout Source" - if: ${{steps.visibility.outputs.is_public == 'true'}} + if: steps.visibility.outputs.is_public == 'true' uses: actions/checkout@v4 with: fetch-depth: 0 - name: 'Dependency Review' - if: ${{steps.visibility.outputs.is_public == 'true'}} + if: steps.visibility.outputs.is_public == 'true' uses: actions/dependency-review-action@v3.1.0 no-merge-commits: @@ -251,7 +251,9 @@ jobs: uses: greenled/no-merge-commits-check@v1.0.1 lint-code: - if: ${{github.event.pull_request.draft == false && ( !startsWith(github.head_ref, 'release/') && !startsWith(github.head_ref, 'hotfix/') )}} + if: |- + github.event.pull_request.draft == false && + ( !startsWith(github.head_ref, 'release/') && !startsWith(github.head_ref, 'hotfix/') ) runs-on: ubuntu-latest steps: - name: "Initialise Workspace"