Skip to content

Commit

Permalink
🥚 Add emoji reactions on each step of the conda-lock action (#3)
Browse files Browse the repository at this point in the history
Add 👀 when on starting the GitHub Action, 🚀 when the conda-lock command is starting up, and :hooray: when the conda-lock script finishes. Also updated peter-evans/create-or-update-comment from v2 to v3, and trigger the workflow only on issue comment creation, not edits.
  • Loading branch information
weiji14 authored Aug 24, 2023
1 parent 1232a7b commit 0cb1fde
Showing 1 changed file with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/conda-lock.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Conda Lock

on:
issue_comment:
types: [created, edited]
types: [created]

permissions:
contents: read
Expand All @@ -22,6 +22,14 @@ jobs:
shell: bash -l {0}

steps:
# Add an emoji reaction to comment to indicate the script is starting
- name: Add reaction
uses: peter-evans/create-or-update-comment@v3
with:
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.comment.id }}
reaction-type: eyes

# Checkout the pull request branch
- name: Checkout Repository
uses: actions/checkout@v3
Expand All @@ -30,6 +38,14 @@ jobs:
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
ref: ${{ github.event.client_payload.pull_request.head.ref }}

# Add an emoji reaction to comment to indicate that conda-lock is starting
- name: Add reaction
uses: peter-evans/create-or-update-comment@v3
with:
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.comment.id }}
reaction-type: rocket

# Run conda-lock GitHub Action
- name: Run conda-lock
uses: weiji14/conda-lock-refresh@5525d3fd746de3709ac623e1895303e239baf6ed
Expand All @@ -39,8 +55,8 @@ jobs:

# Add an emoji reaction to comment to indicate the script completed successfully
- name: Add reaction
uses: peter-evans/create-or-update-comment@v2
uses: peter-evans/create-or-update-comment@v3
with:
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
comment-id: ${{ github.event.comment.id }}
reaction-type: hooray

0 comments on commit 0cb1fde

Please sign in to comment.