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 27, 2023
1 parent 691b0fd commit 09a3a74
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 46 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/[email protected]
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/lint-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
name: Lint markdown files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- name: Check out repository
uses: actions/checkout@v3

- uses: DavidAnson/markdownlint-cli2-action@5b7c9f74fec47e6b15667b2cc23c63dff11e449e
with:
Expand All @@ -30,7 +31,8 @@ jobs:
name: Check for broken links
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- name: Check out repository
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/[email protected]
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 @@ -188,8 +182,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 @@ -255,9 +248,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/[email protected]
Expand Down Expand Up @@ -363,9 +354,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/[email protected]
Expand Down Expand Up @@ -397,7 +386,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 @@ -452,8 +441,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/[email protected]
Expand Down Expand Up @@ -481,8 +468,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 @@ -545,8 +531,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 @@ -581,8 +565,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 @@ -666,9 +649,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: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
Expand Down Expand Up @@ -736,10 +717,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: echo "VERSION=$(cat VERSION)" >> $GITHUB_ENV
Expand Down
8 changes: 4 additions & 4 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

0 comments on commit 09a3a74

Please sign in to comment.