Skip to content

Commit 1297d4d

Browse files
committed
Use sha_short
1 parent 7d01b2d commit 1297d4d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/preview.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,18 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v3
2727

28+
- name: Set outputs
29+
id: vars
30+
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
31+
2832
- name: Comment Credentials
2933
uses: marocchino/sticky-pull-request-comment@v2
3034
with:
3135
header: codercom-preview-docs
3236
message: |
3337
✨ Coder.com for PR #${{ github.event.number }} deployed! It will be updated on every commit.
3438
35-
* _Host_: https://coder.com/docs/coder/${{ github.event.pull_request.head.sha }}
39+
* _Host_: https://coder.com/docs/coder/${{ steps.vars.outputs.sha_short }}
3640
* _Last deploy status_: success
3741
* _Commit_: ${{ github.event.pull_request.head.sha }}
3842
* _Workflow status_: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

0 commit comments

Comments
 (0)