octokit / request-action

A GitHub Action to send arbitrary requests to GitHub's REST API
https://github.com/marketplace/actions/GitHub-API-Request
MIT License
370 stars 47 forks source link

docs(README): fix failing examples in the README #221

Closed 9inpachi closed 1 year ago

9inpachi commented 1 year ago

Resolves #130


Behavior

Before the change?

The examples in the README that tried to echo GitHub Actions contexts incorrectly were failing. For example:

- run: "echo latest release: ${{ steps.get_latest_release.outputs.data }}"

Failing test job: https://github.com/9inpachi/git-testing/actions/runs/3896990385/jobs/6654168007 Failing test job workflow file: https://github.com/9inpachi/git-testing/actions/runs/3896990385/workflow

After the change?

The GitHub Actions contexts that are used in the echo statements are wrapped in single quotes to be able to echo multiline strings with double quotes. For example, output of ${{ steps.get_latest_release.outputs.data }} is a multiline string with double quotes and can be safely echo'd now.

- run: "echo latest release: '${{ steps.get_latest_release.outputs.data }}'"

Successful test job: https://github.com/9inpachi/git-testing/actions/runs/3897156229/jobs/6654529237 Successful test job workflow file: https://github.com/9inpachi/git-testing/actions/runs/3897156229/workflow

octokitbot commented 1 year ago

:tada: This PR is included in version 2.1.8 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: