[GH-ISSUE #378] Not working for event: "pull_request_review_comment" #265

Closed
opened 2026-03-01 21:41:54 +03:00 by kerem · 1 comment
Owner

Originally created by @joelworsham on GitHub (Oct 2, 2020).
Original GitHub issue: https://github.com/nektos/act/issues/378

No matter what I do, I cannot get act to pick up my action/event/job. If I change the on: pull_request_review_comment to on: push, it works fine.

Does ACT not support actions like this? Here are some things I've tried:

act -l -e ./.tmp/pull_request_review_comment.json -v
where pull_request_review_comment.json is:

{
  "pull_request_review_comment": {
    "action": "created",
    "comment": {
      "body": "unicorn_run"
    }
  }
}

Here is my workflow file (./github/workflows/unicorn.yml):

name: Unicorn Screenshots
on: pull_request_review_comment

jobs:
  screenshots:
    if: contains( github.event.comment.body, 'unicorn_run')
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: [12.x]

    steps:
    - uses: actions/checkout@v1
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v1
      with:
        node-version: ${{ matrix.node-version }}
    - name: serve site and screenshot
      env:
        CI: true

        ###--- SCREENSHOT CONFIGURATION ---###
        UNICORN_VERSION: 2.0.6
        UNICORN_OUTPUT_DIR: /home/runner/unicorn-screenshots
        UNICORN_COMMAND: unicorn fullsite http://localhost:3001 --headless --name ci-run
        PORT: 3001
        WEB_SERVER_COMMAND: NODE_ENV=production npm run dev
        WEB_SERVER_STARTUP_TIME: 10

        ###--- APP SPECIFIC ENV VARS ---###
        ###--- Don't store secrets here, no API keys---###
        ###--- https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets ---###
        AUTH_PROVIDERS_ENABLED: false
        ROUTE_ROLES_ENABLED: false
        PREPROD_AUTH_ENABLED: false
        REDIRECTS_FORCE_HTTPS: false
        CONTENTFUL_HOST: ${{ secrets.CONTENTFUL_HOST }}
        CONTENTFUL_ACCESS_TOKEN: ${{ secrets.CONTENTFUL_ACCESS_TOKEN }}
        CONTENTFUL_ENABLED: ${{ secrets.CONTENTFUL_ENABLED }}
        CONTENTFUL_ENVIRONMENT: ${{ secrets.CONTENTFUL_ENVIRONMENT }}
        CONTENTFUL_LOCALE: ${{ secrets.CONTENTFUL_LOCALE }}
        CONTENTFUL_SPACE_ID: ${{ secrets.CONTENTFUL_SPACE_ID }}
        ERROR404_ENABLED: false
        ERROR500_ENABLED: false
        JANRAIN_DEV_ENABLED: true
        OPENSESAME_PASSWORD: notset
        AUTH_STATE_CRYPTO_SECRET: notset
      run: |
        cp .env.example .env
        NODE_ENV=development npm ci
        NODE_ENV=production npm run build
        npm install --userconfig=./.npmrc -g ewi-unicorn@${UNICORN_VERSION}
        # start webserver in background, pause, then take screenshots
        SCREENSHOT_CMD="${WEB_SERVER_COMMAND} & sleep ${WEB_SERVER_STARTUP_TIME} && ${UNICORN_COMMAND}"
        echo "--------------------------------"
        echo "running screenshot command: $SCREENSHOT_CMD"
        echo "--------------------------------"
        eval $SCREENSHOT_CMD
    - uses: actions/upload-artifact@v1
      with:
        name: screenshots--${{ github.sha }}
        path: /home/runner/unicorn-screenshots/ci-run

Output of the above command:

joelworsham:ewi-lilly-es-webapp jworsham$ act -l -e ./.tmp/pull_request_review_comment.json -v
DEBU[0000] Loading environment from /Users/jworsham/Projects/Lilly/ewi-lilly-es-webapp/.env 
DEBU[0000] Loading secrets from                         
DEBU[0000] Loading workflows from '/Users/jworsham/Projects/Lilly/ewi-lilly-es-webapp/.github/workflows' 
DEBU[0000] Reading workflow '/Users/jworsham/Projects/Lilly/ewi-lilly-es-webapp/.github/workflows/main.yml' 
DEBU[0000] Reading workflow '/Users/jworsham/Projects/Lilly/ewi-lilly-es-webapp/.github/workflows/unicorn.yml' 
DEBU[0000] Planning event: push  
Originally created by @joelworsham on GitHub (Oct 2, 2020). Original GitHub issue: https://github.com/nektos/act/issues/378 No matter what I do, I cannot get `act` to pick up my action/event/job. If I change the `on: pull_request_review_comment` to `on: push`, it works fine. Does ACT not support actions like this? Here are some things I've tried: ` act -l -e ./.tmp/pull_request_review_comment.json -v` where `pull_request_review_comment.json` is: ``` { "pull_request_review_comment": { "action": "created", "comment": { "body": "unicorn_run" } } } ``` Here is my workflow file (`./github/workflows/unicorn.yml`): ``` name: Unicorn Screenshots on: pull_request_review_comment jobs: screenshots: if: contains( github.event.comment.body, 'unicorn_run') runs-on: ubuntu-latest strategy: matrix: node-version: [12.x] steps: - uses: actions/checkout@v1 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - name: serve site and screenshot env: CI: true ###--- SCREENSHOT CONFIGURATION ---### UNICORN_VERSION: 2.0.6 UNICORN_OUTPUT_DIR: /home/runner/unicorn-screenshots UNICORN_COMMAND: unicorn fullsite http://localhost:3001 --headless --name ci-run PORT: 3001 WEB_SERVER_COMMAND: NODE_ENV=production npm run dev WEB_SERVER_STARTUP_TIME: 10 ###--- APP SPECIFIC ENV VARS ---### ###--- Don't store secrets here, no API keys---### ###--- https://help.github.com/en/actions/automating-your-workflow-with-github-actions/creating-and-using-encrypted-secrets ---### AUTH_PROVIDERS_ENABLED: false ROUTE_ROLES_ENABLED: false PREPROD_AUTH_ENABLED: false REDIRECTS_FORCE_HTTPS: false CONTENTFUL_HOST: ${{ secrets.CONTENTFUL_HOST }} CONTENTFUL_ACCESS_TOKEN: ${{ secrets.CONTENTFUL_ACCESS_TOKEN }} CONTENTFUL_ENABLED: ${{ secrets.CONTENTFUL_ENABLED }} CONTENTFUL_ENVIRONMENT: ${{ secrets.CONTENTFUL_ENVIRONMENT }} CONTENTFUL_LOCALE: ${{ secrets.CONTENTFUL_LOCALE }} CONTENTFUL_SPACE_ID: ${{ secrets.CONTENTFUL_SPACE_ID }} ERROR404_ENABLED: false ERROR500_ENABLED: false JANRAIN_DEV_ENABLED: true OPENSESAME_PASSWORD: notset AUTH_STATE_CRYPTO_SECRET: notset run: | cp .env.example .env NODE_ENV=development npm ci NODE_ENV=production npm run build npm install --userconfig=./.npmrc -g ewi-unicorn@${UNICORN_VERSION} # start webserver in background, pause, then take screenshots SCREENSHOT_CMD="${WEB_SERVER_COMMAND} & sleep ${WEB_SERVER_STARTUP_TIME} && ${UNICORN_COMMAND}" echo "--------------------------------" echo "running screenshot command: $SCREENSHOT_CMD" echo "--------------------------------" eval $SCREENSHOT_CMD - uses: actions/upload-artifact@v1 with: name: screenshots--${{ github.sha }} path: /home/runner/unicorn-screenshots/ci-run ``` Output of the above command: ``` joelworsham:ewi-lilly-es-webapp jworsham$ act -l -e ./.tmp/pull_request_review_comment.json -v DEBU[0000] Loading environment from /Users/jworsham/Projects/Lilly/ewi-lilly-es-webapp/.env DEBU[0000] Loading secrets from DEBU[0000] Loading workflows from '/Users/jworsham/Projects/Lilly/ewi-lilly-es-webapp/.github/workflows' DEBU[0000] Reading workflow '/Users/jworsham/Projects/Lilly/ewi-lilly-es-webapp/.github/workflows/main.yml' DEBU[0000] Reading workflow '/Users/jworsham/Projects/Lilly/ewi-lilly-es-webapp/.github/workflows/unicorn.yml' DEBU[0000] Planning event: push ```
kerem 2026-03-01 21:41:54 +03:00
  • closed this issue
  • added the
    stale
    label
Author
Owner

@github-actions[bot] commented on GitHub (Dec 2, 2020):

Issue is stale and will be closed in 7 days unless there is new activity

<!-- gh-comment-id:736905825 --> @github-actions[bot] commented on GitHub (Dec 2, 2020): Issue is stale and will be closed in 7 days unless there is new activity
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#265
No description provided.