mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-10-31 01:32:11 +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:
1 parent
67803ec4ea
commit
12b100fd39
1 file changed
+2
-3
@@ -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 != '' }}
|
||||
|
||||
Reference in new issue
Block a user