I'm having trouble when I try to use the dir
attribute of a step in my workflow. I have a directory like the following:
myproject/
folder/
subfolder/
And this is how my workflow looks like:
steps:
- uses: docker://alpine:3.12
dir: folder/subfolder
args: [pwd]
The above is stored in a wf.yml
file, and I run it by doing:
cd myproject/
popper run -f wf.yml
But I'm getting the error:
ERROR: Schema validation failed:
- Key 'dir' was not defined. Path: '/steps/1'.
I am using Popper 2.6.0, and Docker 19.03.8
The dir
feature in Popper is available in version 2.7.0+, so you will need to update to a newer version. In addition, as specified in the documentation, the path given to the dir
attribute of a step has to be an absolute path. In the given example, since the folder being referenced is within the myproject/
folder, which is the one getting bind-mounted to /workspace
inside the container, the workflow would look like:
steps:
- uses: docker://alpine:3.12
dir: /workspace/folder/subfolder
args: [pwd]
and the above should print /workspace/folder/subfolder
.