[GH-ISSUE #542] Issue: Running push event for a specific branch #365

Closed
opened 2026-03-01 21:42:42 +03:00 by kerem · 2 comments
Owner

Originally created by @hottehead on GitHub (Feb 23, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/542

Act version

act version 0.2.17

Expected behaviour

Run workflow 2

Actual behaviour

Runs workflow 1 & 2

Workflow and/or repository

name: workflow 1

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
name: workflow 2 

on:
  push:
    branches:
      -  develop
name: push.json  - according to https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#push

{
  "push": {
    "ref": "/refs/heads/develop"
  }
}

Steps to reproduce

act -n -e push.json

Originally created by @hottehead on GitHub (Feb 23, 2021). Original GitHub issue: https://github.com/nektos/act/issues/542 ## Act version <!-- Paste output of `act --version` --> ``` act version 0.2.17 ``` ## Expected behaviour Run workflow 2 ## Actual behaviour Runs workflow 1 & 2 ## Workflow and/or repository <details> <summary></summary> ```none name: workflow 1 on: push: branches: - master pull_request: branches: - master ``` ```none name: workflow 2 on: push: branches: - develop ``` ```none name: push.json - according to https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#push { "push": { "ref": "/refs/heads/develop" } } ``` </details> ## Steps to reproduce <!-- Make sure to include command you used to run `act` e.g.: 1. Clone example repo (https://github.com/cplee/github-actions-demo) 2. Enter cloned repo directory 3. Run `act -s SUPER_SECRET=im-a-value` --> ## `act -n -e push.json` </details>
Author
Owner

@hottehead commented on GitHub (Feb 24, 2021):

I also tried refs/heads/develop in push.json

<!-- gh-comment-id:784947475 --> @hottehead commented on GitHub (Feb 24, 2021): I also tried `refs/heads/develop` in push.json
Author
Owner

@github-actions[bot] commented on GitHub (Mar 27, 2021):

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

<!-- gh-comment-id:808605858 --> @github-actions[bot] commented on GitHub (Mar 27, 2021): Issue is stale and will be closed in 14 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#365
No description provided.