From 8e082ccf91ab2518fbf6efd194e6749d2962f662 Mon Sep 17 00:00:00 2001 From: Lessley Dennington Date: Mon, 24 Apr 2023 14:43:48 -0600 Subject: [PATCH] workflows: update checkout actions Remove fetch-depth from checkout actions, since that was required by Nerdbank.GitVersioning. Also take this opportunity to use consistent version and naming for checkout actions. --- .github/workflows/codeql-analysis.yml | 5 +-- .github/workflows/continuous-integration.yml | 4 +- .github/workflows/lint-docs.yml | 4 +- .github/workflows/release.yml | 44 +++++-------------- .../validate-install-from-source.yml | 10 ++--- 5 files changed, 20 insertions(+), 47 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 329fc29bcc..06a331d98a 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -22,10 +22,7 @@ jobs: language: [ 'csharp' ] steps: - - name: Checkout repository - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - with: - fetch-depth: 0 # patch around Nerdbank.GitVersioning failure + - uses: actions/checkout@v3 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 1c098e5014..277234c272 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -17,9 +17,7 @@ jobs: os: [ubuntu-latest, windows-latest, macos-latest] steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - with: - fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works. + - uses: actions/checkout@v3 - name: Setup .NET uses: actions/setup-dotnet@v3.0.3 diff --git a/.github/workflows/lint-docs.yml b/.github/workflows/lint-docs.yml index a745d7e652..a088ec70a7 100644 --- a/.github/workflows/lint-docs.yml +++ b/.github/workflows/lint-docs.yml @@ -18,7 +18,7 @@ jobs: name: Lint markdown files runs-on: ubuntu-latest steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: actions/checkout@v3 - uses: DavidAnson/markdownlint-cli2-action@cdfad95cc96588c74b62ad2d3f2e1772090099ac with: @@ -30,7 +30,7 @@ jobs: name: Check for broken links runs-on: ubuntu-latest steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: actions/checkout@v3 - name: Run link checker # For any troubleshooting, see: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 24d41e3374..5c9685f8ca 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,9 +14,7 @@ jobs: matrix: runtime: [ osx-x64, osx-arm64 ] steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - with: - fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works. + - uses: actions/checkout@v3 - name: Set up dotnet uses: actions/setup-dotnet@v3.0.3 @@ -77,8 +75,7 @@ jobs: runtime: [ osx-x64, osx-arm64 ] needs: osx-build steps: - - name: Check out repository - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: actions/checkout@v3 - name: Download payload uses: actions/download-artifact@v3 @@ -137,10 +134,7 @@ jobs: runtime: [ osx-x64, osx-arm64 ] needs: osx-payload-sign steps: - - name: Check out repository - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - with: - fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works. + - uses: actions/checkout@v3 - name: Set version environment variable run: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV @@ -183,8 +177,7 @@ jobs: runtime: [ osx-x64, osx-arm64 ] needs: osx-pack steps: - - name: Check out repository - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: actions/checkout@v3 - name: Download unsigned package uses: actions/download-artifact@v3 @@ -250,9 +243,7 @@ jobs: name: Build and Sign Windows runs-on: windows-latest steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - with: - fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works. + - uses: actions/checkout@v3 - name: Set up dotnet uses: actions/setup-dotnet@v3.0.3 @@ -353,9 +344,7 @@ jobs: name: Build Linux runs-on: ubuntu-latest steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - with: - fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works. + - uses: actions/checkout@v3 - name: Setup .NET uses: actions/setup-dotnet@v3.0.3 @@ -387,7 +376,7 @@ jobs: # ESRP service requires signing to run on Windows runs-on: windows-latest steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: actions/checkout@v3 - name: Download artifacts uses: actions/download-artifact@v3 @@ -442,8 +431,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - with: - fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works. - name: Setup .NET uses: actions/setup-dotnet@v3.0.3 @@ -467,8 +454,7 @@ jobs: runs-on: windows-latest needs: dotnet-tool-build steps: - - name: Check out repository - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: actions/checkout@v3 - name: Download payload uses: actions/download-artifact@v3 @@ -531,8 +517,6 @@ jobs: run: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV - uses: actions/checkout@v3 - with: - fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works. - name: Download signed payload uses: actions/download-artifact@v3 @@ -563,8 +547,7 @@ jobs: runs-on: windows-latest needs: dotnet-tool-pack steps: - - name: Check out repository - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: actions/checkout@v3 - name: Download unsigned package uses: actions/download-artifact@v3 @@ -648,9 +631,7 @@ jobs: runs-on: ${{ matrix.component.os }} needs: [ osx-sign, win-sign, linux-sign, dotnet-tool-sign ] steps: - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - with: - fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works. + - uses: actions/checkout@v3 - name: Set version environment variable run: | @@ -716,10 +697,7 @@ jobs: runs-on: ubuntu-latest needs: [ validate ] steps: - - name: Check out repository - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - with: - fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works. + - uses: actions/checkout@v3 - name: Set version environment variable run: | diff --git a/.github/workflows/validate-install-from-source.yml b/.github/workflows/validate-install-from-source.yml index 554bb605a6..95ebdb17cb 100644 --- a/.github/workflows/validate-install-from-source.yml +++ b/.github/workflows/validate-install-from-source.yml @@ -34,10 +34,10 @@ jobs: zypper -n install tar gzip elif [[ ${{matrix.vector.image}} == *"centos"* ]]; then dnf install which -y - fi - - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 - with: - fetch-depth: 0 # Indicate full history so Nerdbank.GitVersioning works. + fi + + - uses: actions/checkout@v3 + - run: | sh "${GITHUB_WORKSPACE}/src/linux/Packaging.Linux/install-from-source.sh" -y - git-credential-manager --help || exit 1 \ No newline at end of file + git-credential-manager --help || exit 1