Skip to content

Commit

Permalink
workflows: update checkout actions
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ldennington committed Apr 29, 2023
1 parent 4419d81 commit 8e082cc
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 47 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
44 changes: 11 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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: |
Expand Down Expand Up @@ -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: |
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/validate-install-from-source.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
git-credential-manager --help || exit 1

0 comments on commit 8e082cc

Please sign in to comment.