You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
name: CI
on:
pull_request:
types: [enqueued]
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo "i am a pr"
if: github.event_name == 'pull_request'
- run: echo "i am a merge group"
if: github.event_name == 'merge_group'
- run: sleep 20
- run: exit 1
...that I'm using to test out merge queues.
The intended behavior I'm trying to get is that for a given PR, when a user adds it to the merge queue, only then does this specific action run. The reason for that is because the action I'm trying to run will be resource-intensive and I don't want it to run on every commit to a PR; just right before merge. If this action fails, then the merge should be blocked.
However, what's actually happening is that the PR successfully gets merged while the sleep 20 is still running.
ActionsBuild, test, and automate your deployment pipeline with world-class CI/CDQuestion
1 participant
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Select Topic Area
Question
Body
I have a dummy GitHub Action:
...that I'm using to test out merge queues.
The intended behavior I'm trying to get is that for a given PR, when a user adds it to the merge queue, only then does this specific action run. The reason for that is because the action I'm trying to run will be resource-intensive and I don't want it to run on every commit to a PR; just right before merge. If this action fails, then the merge should be blocked.
However, what's actually happening is that the PR successfully gets merged while the
sleep 20
is still running.Any ideas on what I'm doing wrong here?
Beta Was this translation helpful? Give feedback.
All reactions