Add specific check/crates.sh script

This commit is contained in:
Fabrice Reix 2022-08-05 11:15:22 +02:00
parent 5cd214593d
commit 5c5862bbd6
No known key found for this signature in database
GPG Key ID: BF5213154B2E7155
4 changed files with 8 additions and 3 deletions

View File

@ -54,11 +54,11 @@ jobs:
- name: Check XML/HTML files
run: bin/check/xmllint.sh
update_crates:
crates:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Run crates update
run: bin/check/update_crates.sh --check
run: bin/check/crates.sh

View File

@ -25,7 +25,7 @@ jobs:
run: |
UPDATE_CRATES_OUTPUT="/tmp/update.output"
echo "UPDATE_CRATES_OUTPUT=${UPDATE_CRATES_OUTPUT}" | tee -a "${GITHUB_ENV}"
bin/check/update_crates.sh 2>&1 > "${UPDATE_CRATES_OUTPUT}" && crates_update_exit_code=0 || crates_update_exit_code=$?
bin/update_crates.sh 2>&1 > "${UPDATE_CRATES_OUTPUT}" && crates_update_exit_code=0 || crates_update_exit_code=$?
if [ ${crates_update_exit_code} -eq 0 ] ; then
UPDATED_CRATES_COUNT=$(grep -v "crates.io index" "${UPDATE_CRATES_OUTPUT}" | (grep -cE "updated to |.*Updating.*->.*" || true) )
echo "UPDATED_CRATES_COUNT=${UPDATED_CRATES_COUNT}" | tee -a "${GITHUB_ENV}"

5
bin/check/crates.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
set -e
bin/update_crates.sh --check