Skip to content

Commit

Permalink
React with eyes before the rest of the job
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Carroll <[email protected]>
  • Loading branch information
mjcarroll committed Apr 11, 2024
1 parent 8c4bf11 commit 0888996
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions .github/workflows/comment_trigger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,22 @@ jobs:
# BUILDCACHE_DEBUG: 2 # optional: debug level, less is more
BUILDCACHE_DIRECT_MODE: true # optional: Allow direct caching
steps:
- name: "Set node id (issue)"
if: ${{ github.event.action == 'opened' }}
run: |
echo "NODE_ID=${{ github.event.issue.node_id }}" >> "$GITHUB_ENV"
- name: "Set node id (comment)"
if: ${{ github.event.action == 'created' }}
run: |
echo "NODE_ID=${{ github.event.comment.node_id }}" >> "$GITHUB_ENV"
- name: "React"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api graphql --silent --raw-field query="mutation AddReaction {addReaction(input:{subjectId:\"$NODE_ID\",content:EYES}){reaction{content}subject{id}}}"
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
Expand All @@ -36,21 +52,6 @@ jobs:
run: |
echo $EVENT_CONTEXT
- name: "Set node id (issue)"
if: ${{ github.event.action == 'opened' }}
run: |
echo "NODE_ID=${{ github.event.issue.node_id }}" >> "$GITHUB_ENV"
- name: "Set node id (comment)"
if: ${{ github.event.action == 'created' }}
run: |
echo "NODE_ID=${{ github.event.comment.node_id }}" >> "$GITHUB_ENV"
- name: "React"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh api graphql --silent --raw-field query="mutation AddReaction {addReaction(input:{subjectId:\"$NODE_ID\",content:EYES}){reaction{content}subject{id}}}"
- name: "Parse issue body"
if: ${{ github.event.action == 'opened' }}
Expand Down

0 comments on commit 0888996

Please sign in to comment.