I am running a github actions workflow, and I would like to understand why is the sed
command unable to inject the GITHUB_RUN_ID in the second command below?
- name: Set ${GITHUB_RUN_ID}
run: echo "${GITHUB_RUN_ID}" > .github/workflows/run_id
- name: Wait for ${GITHUB_RUN_ID}
run: wait
- name: Update k8s manifest with new image
run: |
cd base/base
sed -i 's/image *= (.)/image: gitauwairimu/javamvn:${GITHUB_RUN_ID}/g' deployment.yaml
cat deployment.yaml
The step: name: Set ${GITHUB_RUN_ID}
echos the variable but the second doesn't catch on? Why and what can be done about it?