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

Support YAML anchors #162

Closed
umarcor opened this issue Oct 6, 2019 · 3 comments
Closed

Support YAML anchors #162

umarcor opened this issue Oct 6, 2019 · 3 comments

Comments

@umarcor
Copy link

umarcor commented Oct 6, 2019

With new workflow syntax features (https://github.blog/changelog/2019-10-01-github-actions-new-workflow-syntax-features/) it is possible to define environment variables per workflow, per job or per step. However, there is no mechanism to set some environment variables for some steps only. In some contexts, it is desirable to make some secrets available to the last step in each job, but not to all other intermediate steps. See, for example, the usage of DOCKER_USER and DOCKER_PASS in https://github.com/dbhi/docker/blob/master/.github/workflows/push.yml.

Supporting YAML anchors would allow to define the envvars once only:

  - env: &docker_cred
      DOCKER_USER: ${{ secrets.DOCKER_USER }}
      DOCKER_PASS: ${{ secrets.DOCKER_PASS }}

and

  - env:
      <<: *docker_cred
@ethomson
Copy link
Contributor

ethomson commented Oct 6, 2019

Hi @umarcor - thanks for bringing this up. Indeed we do not support YAML anchors at the moment, but this is something that we're tracking and will consider adding support for.

I'm going to close this issue here - this repository contains the starter workflows that we suggest during new workflow creation, and not the runner which would actually parse YAML. So this isn't a good repository to track this issue.

If you have more feedback for us, please let us know.

@ethomson ethomson closed this as completed Oct 6, 2019
weitjong added a commit to urho3d/urho3d that referenced this issue Mar 8, 2020
See actions/starter-workflows#162. Hopefully it is not considered as "premium" feature. [ci skip]
@superarts
Copy link

Are YAML anchors still not supported? I added anchors in my workflow and got:

Workflow does not exist or does not have a workflow_dispatch trigger in this branch.
Learn more about manual workflows

rezaaa1359 referenced this issue Dec 1, 2020
Noticed that this version of setup-ruby causes problems with the `set-env` deprecation. This just bumps it up to the latest commit on https://github.com/ruby/setup-ruby/
@umarcor
Copy link
Author

umarcor commented Dec 1, 2020

@ethomson since your last comment, repo actions/runner was created. Do you mind, please, reopening this issue and transferring it there?

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