Here we have a failure due to the Coq image being updated between jobs. We can figure out the tag either with https://github.com/coq-community/docker-coq-action/pull/89 or by parsing docker images --format "{{.Repository}}:{{.Tag}}". We can then emit output with something like echo "::set-output name=coq_image_tag::$coq_image_tag" and something like
name: Example Workflow
on: [push]
jobs:
set-output-job:
runs-on: ubuntu-latest
outputs:
coq_image_tag: ${{ steps.set-output-step.outputs.coq_image_tag }}
steps:
- name: Set coq_image_tag Output
id: set-output-step
run: |
# Simulate obtaining some value; in this case, we use a hard-coded string
echo "COQ_IMAGE_TAG=dev" > result.txt
# Extract the value and set it as output for the job
coq_image_tag=$(cat result.txt | cut -d= -f2)
echo "::set-output name=coq_image_tag::$coq_image_tag"
fetch-output-job:
needs: set-output-job
runs-on: ubuntu-latest
steps:
- name: Fetch coq_image_tag from Previous Job
run: echo "COQ_IMAGE_TAG is ${{ needs.set-output-job.outputs.coq_image_tag }}"
Here we have a failure due to the Coq image being updated between jobs. We can figure out the tag either with https://github.com/coq-community/docker-coq-action/pull/89 or by parsing
docker images --format "{{.Repository}}:{{.Tag}}"
. We can then emit output with something likeecho "::set-output name=coq_image_tag::$coq_image_tag"
and something like