mirror of
https://github.com/himanshu8443/providers.git
synced 2026-06-17 21:27:43 +00:00
Show URL checker output directly in Actions logs
This commit is contained in:
@@ -27,21 +27,27 @@ jobs:
|
|||||||
|
|
||||||
- name: Run URL checker
|
- name: Run URL checker
|
||||||
id: url_checker
|
id: url_checker
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
# Run the URL checker and save output
|
set -o pipefail
|
||||||
node .github/scripts/url-checker.js > checker_output.log 2>&1
|
# 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
|
# Check if there are updated providers
|
||||||
if grep -q "### UPDATED_PROVIDERS_START ###" checker_output.log; then
|
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
|
# 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
|
grep -v "###" > updated_providers.txt
|
||||||
else
|
else
|
||||||
echo "CHANGES_DETECTED=false" >> $GITHUB_ENV
|
echo "CHANGES_DETECTED=false" >> "$GITHUB_ENV"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "--- checker_output.log ---"
|
||||||
|
cat checker_output.log
|
||||||
|
echo "--- end checker_output.log ---"
|
||||||
|
|
||||||
- name: Commit changes if any
|
- name: Commit changes if any
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "GitHub Actions"
|
git config --global user.name "GitHub Actions"
|
||||||
|
|||||||
Reference in New Issue
Block a user