Skip to content

Job failed due to docker image not being in lowercase #26761

Discussion options

You must be logged in to vote

The env context is only available in steps, even though it can be set at workflow, job, and step level (also see How to use env context?). There is another way to set a variable of sorts that should do the trick: Setting a job output and then refer to it with ${{ jobs.<job_id>.outputs.<output> }} in another job.

jobs:
  set-output:
    runs-on: ubuntu-latest
    outputs:
      image: ${{ steps.set.outputs.image }}
    steps:
      - name: Set output
        id: set
        shell: bash
        run: |
          name="Alpine"
          echo "::set-output name=image::${name,,}"
  use-output:
    runs-on: ubuntu-latest
    needs: set-output
    container:
      image: ${{ needs.set-output.outp…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected
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
Packages Host your dependencies, libraries, and production-ready code, right from your repository Product Feedback
2 participants