I am trying to run packer file on a specific sub-directory (packer/beta):
- name: packer
run: |
ls -la
&& echo "starting docker"
&& docker run hashicorp/packer build -debug packer.json
working-directory: 'packer/beta'
I can see the file packer.json
when I do ls -la
.
I got the same error with this version:
- name: packer
uses: docker://hashicorp/packer:1.4.3
with:
args: build packer.json
I can use a relative path, for instance, packer/beta/packer.json
instead of just packer.json
, and it works, but that will affect the packer process because I have relative paths inside of it:
"provisioners": [
{
"type": "file",
"source": "root",
"destination": "/tmp/root"
},
}
I would need to change the "source": "root"
to "source": "packer/beta/root"
, and that's not what I want.
Also, I have tried:
defaults:
run:
working-directory: packer/beta
But still no luck.
Any idea on how can I achieve this?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…