1

I made a simple python script, that accepts the path text file as input arguments and appends them to each other, and create the single file.

My question is how to address those files in GitHub action without using predefined environmental parameters?
Is there any way the action scripts browse (tree) those files and fed them to the python script?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250

1 Answers1

0

First, your GitHub Action can define and take a parameter, as see in actions/cat-for-github-actions: that does not use an environment variable.

Second, you can use a path filter in order to trigger your GitHub Action on any txt file change.

But if you want to list files, you need to use the predefined environment variable ${{ github.workspace }}, as in here.
You can then call a python script, which will list/filter files from the checkedout Git repository commit.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250