Skip to content

Commit

Permalink
testing vars
Browse files Browse the repository at this point in the history
  • Loading branch information
charlottekostelic committed Apr 11, 2024
1 parent 807894d commit 90b4769
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/monthly-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,13 @@ jobs:
echo "DEPRECATED=$(grep -q 'DEBUG - Deprecated' lcsh.log && echo 'true' || echo 'false')" >> $GITHUB_ENV
echo "REVISED=$(grep -q 'DEBUG - Revised' lcsh.log && echo 'true' || echo 'false')" >> $GITHUB_ENV
echo "REVISED_LIST=$(grep -q 'DEBUG - Revised' lcsh.log && grep 'DEBUG - Revised' lcsh.log | grep -Eo "\[.+]$" || echo 'false')" >> $GITHUB_ENV
echo "DEPRECATED_LIST=$(grep -q 'DEBUG - Deprecated' lcsh.log && grep 'DEBUG - Deprecated' lcsh.log | grep -Eo "\[.+]$" || echo 'false')" >> $GITHUB_ENV
- name: Create PR text (no changes)
run: |
{
echo "PR_BODY<<EOF"
echo "### Changed:"
echo " + lcsh.log updated with data from workflow run on $(date '+%D')"
echo "${{ env.CHANGED == 'true' && '### Added:' && ' + New infile is: data/acc_in.csv' && ' + Old infile is: data/acc_in_$DATE' || '' }}"
echo "${{ [env.REVISED == 'true' || env.DEPRECATED == 'true'] && '### Added:' && ' + New infile is: data/acc_in.csv' && ' + Old infile is: data/acc_in_$DATE' || '' }}"
echo EOF
} >> $GITHUB_ENV
Expand All @@ -57,7 +54,7 @@ jobs:
run: |
{
echo "ISSUE_BODY<<EOF"
echo "${{ env.REVISED_LIST != 'false' && '### Changed:' && '${{ env.REVISED_LIST }}' || '$(grep -q "DEBUG - Revised" lcsh.log)' }}"
echo "${{ env.REVISED == 'true' && '### Changed:' && '$(grep "DEBUG - Revised" lcsh.log | grep -Eo "\[.+]$")' || '$(grep -q "DEBUG - Revised" lcsh.log)' }}"
echo "${{ env.DEPRECATED == 'true' && '### Deprecated:' && '$(grep "DEBUG - Deprecated" lcsh.log | grep -Eo "\[.+]$")' || '$(grep -q "DEBUG - Deprecated" lcsh.log)'}}"
echo EOF
} >> $GITHUB_ENV
Expand Down

0 comments on commit 90b4769

Please sign in to comment.