Skip to content

Can't Pull Docker Image: #26023

Answered by BrightRan
dschinkel asked this question in Actions
Discussion options

You must be logged in to vote

@dschinkel ,

In a job, the environment variable you set via the ‘set-env’ command in a step will be only available to the subsequent steps in the same job. The steps in other jobs can’t access this environment variable. More details, see “Setting an environment variable”.

If you want to access this value in the subsequent job, you can set it as an output of the previous job.
In your case, you can do like as this:

jobs:
  build_docker_image_from_artifact:
    outputs:
      IMAGE_NAME: ${{ steps.get-image-name.outputs.IMAGE_NAME }}
    . . .
    steps:
      . . .
      - name: get image name
        id: get-image-name
        run: echo "::set-output name=IMAGE_NAME::$(docker images latest…

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Actions Build, test, and automate your deployment pipeline with world-class CI/CD Product Feedback
2 participants