mirror of
https://github.com/himanshu8443/providers.git
synced 2026-06-02 22:08:17 +00:00
Show URL checker output directly in Actions logs
This commit is contained in:
@@ -27,21 +27,27 @@ jobs:
|
||||
|
||||
- name: Run URL checker
|
||||
id: url_checker
|
||||
shell: bash
|
||||
run: |
|
||||
# Run the URL checker and save output
|
||||
node .github/scripts/url-checker.js > checker_output.log 2>&1
|
||||
set -o pipefail
|
||||
# Run the URL checker and show output in the job logs while also saving it
|
||||
node .github/scripts/url-checker.js 2>&1 | tee checker_output.log
|
||||
|
||||
# Check if there are updated providers
|
||||
if grep -q "### UPDATED_PROVIDERS_START ###" checker_output.log; then
|
||||
echo "CHANGES_DETECTED=true" >> $GITHUB_ENV
|
||||
echo "CHANGES_DETECTED=true" >> "$GITHUB_ENV"
|
||||
|
||||
# Extract only the updated provider lines between the markers
|
||||
sed -n '/### UPDATED_PROVIDERS_START ###/,/### UPDATED_PROVIDERS_END ###/p' checker_output.log |
|
||||
sed -n '/### UPDATED_PROVIDERS_START ###/,/### UPDATED_PROVIDERS_END ###/p' checker_output.log | \
|
||||
grep -v "###" > updated_providers.txt
|
||||
else
|
||||
echo "CHANGES_DETECTED=false" >> $GITHUB_ENV
|
||||
echo "CHANGES_DETECTED=false" >> "$GITHUB_ENV"
|
||||
fi
|
||||
|
||||
echo "--- checker_output.log ---"
|
||||
cat checker_output.log
|
||||
echo "--- end checker_output.log ---"
|
||||
|
||||
- name: Commit changes if any
|
||||
run: |
|
||||
git config --global user.name "GitHub Actions"
|
||||
|
||||
Reference in New Issue
Block a user