We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I have a Python script which should process each file that has been changed in a PR. Here's my yml file:
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: | echo "${{ steps.filter.outputs.changed_files }}" python process.py
In the run step, the first echo correctly prints all the changed files. However, when I try to print them from within process.py:
run
echo
process.py
import os os.system("echo \" ${{ steps.filter.outputs.changed_files }} \" ")
I get a sh: 1: Bad substitution error
sh: 1: Bad substitution error
Any ideas?
The text was updated successfully, but these errors were encountered:
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]))
Sorry, something went wrong.
No branches or pull requests
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?
The text was updated successfully, but these errors were encountered: