Updated PR comment example syntax.

The comment PR example using steps.preview.outputs.output was not
working despite naming the job 'preview' as defined. While
troubleshooting I found examples that made reference to setting a
specific step id that could then be referenced to get its output. This
worked for me so I updated the documentation to show to use this more
explicit reference.
This commit is contained in:
Mark Dorison 2020-10-22 09:56:53 -04:00
parent 772ead9671
commit 0dcf731c24
No known key found for this signature in database
GPG key ID: 5D3B9EDCD99B31CB

View file

@ -51,6 +51,7 @@ jobs:
- name: DNSControl preview - name: DNSControl preview
uses: koenrh/dnscontrol-action@v3 uses: koenrh/dnscontrol-action@v3
id: dnscontrol_preview
env: env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
with: with:
@ -82,8 +83,9 @@ for the preview job.
Done. 6 corrections. Done. 6 corrections.
``` ```
Provided that your GitHub Action job for 'preview' is named `preview`, you could Provided that your GitHub Action job for 'preview' has an id
use the following snippet to enable pull request comments using Unsplash's [comment-on-pr](https://github.com/unsplash/comment-on-pr) `dnscontrol_preview`, you could use the following snippet to enable pull request
comments using Unsplash's [comment-on-pr](https://github.com/unsplash/comment-on-pr)
GitHub Action. GitHub Action.
```yaml ```yaml
@ -94,7 +96,7 @@ GitHub Action.
with: with:
msg: | msg: |
``` ```
${{ steps.preview.outputs.output }} ${{ steps.dnscontrol_preview.outputs.output }}
``` ```
check_for_duplicate_msg: true check_for_duplicate_msg: true
``` ```