Closed arielelkin closed 3 years ago
jobs:
process-files:
name: Process files
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
list-files: json
filters: |
changed:
- '**'
- name: Process changed files
run: |
python process.py '${{ steps.filter.outputs.changed_files }}'
And then in process.py:
new_files = list(json.loads(sys.argv[1]))
I have a Python script which should process each file that has been changed in a PR. Here's my yml file:
In the
run
step, the firstecho
correctly prints all the changed files. However, when I try to print them from withinprocess.py
:I get a
sh: 1: Bad substitution error
Any ideas?