mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2025-04-19 10:27:38 +03:00
Gurantee exit 0 AND fix the echo
* GH Workflows run under "/bin/bash -e", which means if anything in it fails it all exits immediately. So append " || true" to the egrep. * The echo to magically set the env var back in the workflow needs to use "" not '' else the in-shell variable won't interpolate.
This commit is contained in:
parent
40dc913367
commit
24cf445254
@ -26,9 +26,8 @@ jobs:
|
||||
run: |
|
||||
# Will exit with non-zero if no filenames ending in ".py" are in
|
||||
# the diff.
|
||||
PYFILES=$(git diff --name-only "refs/remotes/origin/${BASE_REF}" -- | egrep '.py$')
|
||||
echo '::set-env name=PYFILES::${PYFILES}'
|
||||
exit 0
|
||||
PYFILES=$(git diff --name-only "refs/remotes/origin/${BASE_REF}" -- | egrep '.py$' || true)
|
||||
echo "::set-env name=PYFILES::${PYFILES}"
|
||||
|
||||
- name: Set up Python 3.7
|
||||
if: ${{ env.PYFILES != '' }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user