Skip to content

Commit

Permalink
Ensure Cargo.lock has been checked in (paritytech#85)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshOrndorff authored Oct 26, 2020
1 parent 6329018 commit 8baab89
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -421,3 +421,21 @@ jobs:
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'

check-cargo-toml:
runs-on: ubuntu-latest
needs: build
steps:
# We determine whether there are unmodified Cargo.lock files by:
# 1. Asking git for a list of all modified files
# 2. Using grep to reduce the list to only Cargo.lock files
# 3. Counting the number of lines of output
- run: |
FILECOUNT=$(git diff-index --name-only HEAD | grep Cargo.lock | wc -l)
if [[ $FILECOUNT -eq 0 ]]; then
echo "All lock files are valid"
else
echo "The following Cargo.lock files have uncommitted changes"
git diff-index --name-only HEAD | grep Cargo.lock
false
fi

0 comments on commit 8baab89

Please sign in to comment.