FirebaseExtended / FirebaseExtended/action-hosting-deploy

[BUG] Commenting on PR step not running when triggered from issue_comment

Open
#228 2 comments 5 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
809
Forks
232
PR merge metrics
No merged PRs in 30d

Description

Hey guys!

The **`Commenting on PR`** step is not running when the workflow is triggered from **`issue_comment`** trigger. It works fine when a PR is opened, all steps are running. But if I changes something in the PR and comments on it to trigger the workflow again, everything runs, except the **`Commenting on PR`** step.

Workflow file:
```
---
name: Crete Storybook preview per PR
on:
pull_request:
types:
- opened
issue_comment:
types:
- created

jobs:
build_and_preview:
if: |
github.event.pull_request.head.repo.full_name == github.repository || contains(github.event.comment.body, 'update_preview_environment')
runs-on: ubuntu-latest

env:
NPM_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v5.4

- name: Checking out to ${{ steps.branch-name.outputs.current_branch }}
uses: actions/checkout@v3
with:
ref: ${{ steps.branch-name.outputs.current_branch }}

- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install dependencies
run: yarn install

- name: Build Storybook
run: yarn storybook:build

- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_SLANG_AUTH }}'
projectId: slang-auth
channelId: storybook-preview
```

### Error message

There is no error message.

### Expected behavior

This is the expected behavior:
![image](https://user-images.githubusercontent.com/42014588/184363355-378b50f1-66b2-474f-afcc-b3ded149a89e.png)

### Actual behavior

This is what happens:
![image](https://user-images.githubusercontent.com/42014588/184363198-d659be57-f79a-496f-a4fd-02f27ac700ae.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.