I have a reusable workflow which I use to build and push images. I’m trying to create a certificate file in the first relevant step (which works), however the file isn’t accessible in the next step for some reason.
- name: Create temp certificate file
working-directory: ${{ inputs.working-directory }}
if: ${{ inputs.temp-ca-cert }}
run: |
mkdir -p ./certs
cat > $GITHUB_WORKSPACE/certs/temp-ca.crt <<< "${{ vars.temp_CA }}"
pwd
ls ./certs
- name: Build image
id: build-image
working-directory: ${{ inputs.working-directory }}
env:
DOCKER_IMAGE: ${{ inputs.image-repository }}
IMAGE_TAG: ${{ inputs.image-tag || steps.generate-image-tag.outputs.image-tag }}
run: |
pwd
ls
ls certs/
${{ inputs.build-command }}
echo "image-tag=$IMAGE_TAG" >> $GITHUB_OUTPUT
Output in first step:
/home/runner/work/repo/repo # pwd
temp-ca.crt # ls ./certs
Output in second step:
/home/runner/work/repo/repo # pwd
Makefile # ls
README.md
docker
pyproject.toml
requirements-dev.lock
requirements.lock
repo
ls: cannot access 'certs/': No such file or directory
Any inputs would be much appreciated! Thank you.
I’ve tried viewing the files in the relevant directories in an attempt to debug, but wasn’t successful.
tonystark1234 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.