Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set output inside a devcontainer #289

Open
ffMathy opened this issue Apr 22, 2024 · 3 comments
Open

Unable to set output inside a devcontainer #289

ffMathy opened this issue Apr 22, 2024 · 3 comments

Comments

@ffMathy
Copy link

ffMathy commented Apr 22, 2024

When using the new non-deprecated way of setting outputs in GitHub Actions ( https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ ), it is not working. I assume it is because $GITHUB_OUTPUT refers to some file or pipe which is not set in the devcontainer.

    - name: Execute DevContainer commands
      uses: devcontainers/[email protected]
      with:
        runCmd: |
          echo "foo=bar" >> $GITHUB_OUTPUT

Now, I would expect the output foo to be available and usable in other steps or jobs, but it is not.

@samruddhikhandale
Copy link
Member

@gauravsaini04 / @prathameshzarkar9 Can either of you help with investigating this? Thanks!

@Kaniska244
Copy link

Kaniska244 commented Nov 15, 2024

Hello @ffMathy ,

Kindly check if the below sample workflow works for your scenario in reading the variable set in the GITHUB_OUTPUT in different steps under the same job or in a different job altogether. Please let us know if this doesn’t work out for you and provide further details of your specific scenario.

Thanks and Regards,
Kaniska

https://github.com/Kaniska244/checkactionfur/blob/main/.github/workflows/testoutput.yml

@Kaniska244
Copy link

Hi @ffMathy ,

I am closing this issue as I received no further response from your end. Kindly create another issue if the issue still persists for the same.

Thanks and Regards,
Kaniska Sengupta

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants