Skip to content

Commit

Permalink
testing cron and greps
Browse files Browse the repository at this point in the history
  • Loading branch information
charlottekostelic committed Apr 11, 2024
1 parent 5e9cac4 commit ff32bc9
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/monthly-check.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: monthly lcsh check
on: [push]
# on:
# schedule:
# - cron: '* 9 15 * *'
on:
schedule:
- cron: '55 20 11 * *'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_REPO: ${{ github.repository }}
Expand Down Expand Up @@ -48,13 +47,13 @@ jobs:
echo "PR_BODY<<EOF"
echo "### Changed:"
echo " + lcsh.log updated with data from workflow run on $(date '+%D')"
echo "$(grep -q 'DEBUG' lcsh.log && echo '### Added:' && echo ' + New infile is: data/acc_in.csv' && echo ' + Old infile is: data/acc_in_$DATE' || echo '')"
echo "$(grep -q 'DEBUG' lcsh.log && echo '### Added:' && echo ' + New infile is: data/acc_in.csv' && echo ' + Old infile is: data/acc_in_${{ env.DATE }}' || echo '')"
echo EOF
} >> $GITHUB_ENV
{
echo "ISSUE_BODY<<EOF"
echo "$(grep -q 'DEBUG - Revised' lcsh.log && echo '### Changed:' && echo '$(grep "DEBUG - Revised" lcsh.log | grep -Eo "\[.+]$")' || '$(grep -q "DEBUG - Revised" lcsh.log)')"
echo "$(grep -q 'DEBUG - Deprecated' lcsh.log && echo '### Deprecated:' && echo '$(grep "DEBUG - Deprecated" lcsh.log | grep -Eo "\[.+]$")' || '$(grep -q "DEBUG - Deprecated" lcsh.log)')"
echo "$(grep -q 'DEBUG - Revised' lcsh.log && echo '### Changed:' && '$(grep "DEBUG - Revised" lcsh.log | grep -Eo "\[.+]$")' || '$(grep -q "DEBUG - Revised" lcsh.log)')"
echo "$(grep -q 'DEBUG - Deprecated' lcsh.log && echo '### Deprecated:' && '$(grep "DEBUG - Deprecated" lcsh.log | grep -Eo "\[.+]$")' || '$(grep -q "DEBUG - Deprecated" lcsh.log)')"
echo EOF
} >> $GITHUB_ENV
Expand Down

0 comments on commit ff32bc9

Please sign in to comment.