From 5c5862bbd6cf6486e5a41524e18419b4a786524c Mon Sep 17 00:00:00 2001 From: Fabrice Reix Date: Fri, 5 Aug 2022 11:15:22 +0200 Subject: [PATCH] Add specific check/crates.sh script --- .github/workflows/check.yml | 4 ++-- .github/workflows/update-crates.yml | 2 +- bin/check/crates.sh | 5 +++++ bin/{check => }/update_crates.sh | 0 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100755 bin/check/crates.sh rename bin/{check => }/update_crates.sh (100%) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 2886b9fe2..3804404b0 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -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 diff --git a/.github/workflows/update-crates.yml b/.github/workflows/update-crates.yml index 9687fccbb..cc9160c5e 100644 --- a/.github/workflows/update-crates.yml +++ b/.github/workflows/update-crates.yml @@ -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}" diff --git a/bin/check/crates.sh b/bin/check/crates.sh new file mode 100755 index 000000000..a1ed764ab --- /dev/null +++ b/bin/check/crates.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e +bin/update_crates.sh --check + + diff --git a/bin/check/update_crates.sh b/bin/update_crates.sh similarity index 100% rename from bin/check/update_crates.sh rename to bin/update_crates.sh