-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
28 lines (27 loc) · 895 Bytes
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
name: before-deploy-from-PR
description: deploys dev environment
branding: {color: blue, icon: box}
outputs:
ref:
description: commit sha ref
value: ${{steps.get_PR_sha_ref.outputs.result}}
runs:
using: composite
steps:
- name: acknowledge deploy comment
uses: actions/github-script@v6
with:
# language=js
script: |
const {owner, repo} = context.issue
const comment_id = context.payload.comment.id
github.rest.reactions.createForIssueComment({owner, repo, comment_id, content: "rocket"})
- name: get PR sha ref
id: get_PR_sha_ref
uses: actions/github-script@v6
with:
result-encoding: string
# language=js
script: |
const {owner, repo, number: pull_number } = context.issue
return (await github.rest.pulls.get({owner, repo, pull_number})).data.head.ref