What is the right way for running multiple commands in one action?
For example:
I want to run a python script as action. Before running this script I need to install the requirements.txt.
I can think of several options:
- Create a
Dockerfilewith the commandRUN pip install -r requirements.txtin it. - Use the
python:3image, and run thepip install -r requirements.txtin theentrypoint.shfile before running the arguments fromargsinmain.workflow. - use both
pip installandpython myscript.pyasargs
Another example:
I want to run a script that exists in my repository, then compare 2 files (its output and a file that already exists).
This is a process that includes two commands, whereas in the first example, the pip install command can be considered a building command rather than a test command.