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

Fix output variable name for composite action example (random-id vs random-number) #17460

Merged
merged 3 commits into from
May 11, 2022

Conversation

parroty
Copy link
Contributor

@parroty parroty commented Apr 29, 2022

Why:

Hi 👋 . There seems to be an inconsistency in variable names (between random-id and random-number) after the following PR was merged.

The above change did not update the random-id in the outputs section, which results in an empty random value output (the example is not working as expected).

Corresponding Code Snippet

name: 'Hello World'
description: 'Greet someone'
inputs:
  who-to-greet:  # id of input
    description: 'Who to greet'
    required: true
    default: 'World'
outputs:
  random-number:
    description: "Random number"
    value: ${{ steps.random-number-generator.outputs.random-id }}
runs:
  using: "composite"
  steps:
    - run: echo Hello ${{ inputs.who-to-greet }}.
      shell: bash
    - id: random-number-generator
      run: echo "::set-output name=random-number::$(echo $RANDOM)"
      shell: bash
    - run: echo "${{ github.action_path }}" >> $GITHUB_PATH
      shell: bash          
    - run: goodbye.sh
      shell: bash

What's being changed:

This PR intends to update the random-id with random-number in the outputs section.
(Another option would be to revert the #17059, but this PR is for moving forward with unifying the variable name).

The followings are the testing results from my private repository.

Before Change

before_change

After Change

after_change

Check off the following:

  • I have reviewed my changes in staging (look for "Automatically generated comment" and click Modified to view your latest changes).
  • For content changes, I have completed the self-review checklist.

Writer impact (This section is for GitHub staff members only):

  • This pull request impacts the contribution experience
    • I have added the 'writer impact' label
    • I have added a description and/or a video demo of the changes below (e.g. a "before and after video")

@welcome
Copy link

welcome bot commented Apr 29, 2022

Thanks for opening this pull request! A GitHub docs team member should be by to give feedback soon. In the meantime, please check out the contributing guidelines.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Apr 29, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Apr 29, 2022

Automatically generated comment ℹ️

This comment is automatically generated and will be overwritten every time changes are committed to this branch.

The table contains an overview of files in the content directory that have been changed in this pull request. It's provided to make it easy to review your changes on the staging site. Please note that changes to the data directory will not show up in this table.


Content directory changes

You may find it useful to copy this table into the pull request summary. There you can edit it to share links to important articles or changes and to give a high-level overview of how the changes in your pull request support the overall goals of the pull request.

Source Preview Production What Changed
actions/creating-actions/creating-a-composite-action.md fpt
ghes@ 3.4 3.3 3.2 3.1
ghae
ghec
fpt
ghes@ 3.4 3.3 3.2 3.1
ghae
ghec

@ramyaparimi ramyaparimi added content This issue or pull request belongs to the Docs Content team actions This issue or pull request should be reviewed by the docs actions team waiting for review Issue/PR is waiting for a writer's review needs SME This proposal needs review from a subject matter expert and removed triage Do not begin working on this issue until triaged by the team labels Apr 29, 2022
@github-actions
Copy link
Contributor

Thanks for opening a pull request! We've triaged this issue for technical review by a subject matter expert 👀

@ramyaparimi
Copy link
Contributor

Related PR #17464

@github-actions
Copy link
Contributor

github-actions bot commented May 6, 2022

This is a gentle bump for the docs team that this PR is waiting for technical review.

@github-actions github-actions bot added the SME stale The request for an SME has staled label May 6, 2022
@ethomson
Copy link
Contributor

Good catch. Thanks @parroty !

@github-actions github-actions bot removed the SME stale The request for an SME has staled label May 10, 2022
Copy link
Contributor

@ramyaparimi ramyaparimi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@parroty
Thanks so much for opening a PR with this fix! I'll get this merged once tests are passing 🍏

@ramyaparimi ramyaparimi added ready to merge This pull request is ready to merge SME reviewed An SME has reviewed this issue/PR and removed needs SME This proposal needs review from a subject matter expert labels May 11, 2022
@ramyaparimi ramyaparimi enabled auto-merge May 11, 2022 15:12
@ramyaparimi ramyaparimi merged commit a2ace94 into github:main May 11, 2022
@github-actions
Copy link
Contributor

Thanks very much for contributing! Your pull request has been merged 🎉 You should see your changes appear on the site in approximately 24 hours. If you're looking for your next contribution, check out our help wanted issues

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team ready to merge This pull request is ready to merge SME reviewed An SME has reviewed this issue/PR waiting for review Issue/PR is waiting for a writer's review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants