Skip to content

Commit

Permalink
Import demo
Browse files Browse the repository at this point in the history
  • Loading branch information
jd committed Nov 30, 2023
0 parents commit 936822a
Show file tree
Hide file tree
Showing 3 changed files with 104 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Continuous Integration
on:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
sleep 30
test-before-merge:
# Only run this job on branches created by Mergify merge queue
if: startsWith(github.head_ref, 'mergify/merge-queue/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
sleep 60
40 changes: 40 additions & 0 deletions .github/workflows/create-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Create Pull Requests
on:
workflow_dispatch:
inputs:
autoqueue:
description: Whether to put the PR in queue automatically
type: boolean

jobs:
create-hotfix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
mkdir testbed
echo `uuidgen` > testbed/`uuidgen`
- name: Create the hotfix pull request (autoqueue)
if: ${{ inputs.autoqueue }}
uses: peter-evans/create-pull-request@v5
with:
title: "Hotfix pull request"
body: >
This is a test pull request!
commit-message: >
Testing 123
branch:
labels: hotfix,autoqueue
base: main
- name: Create the hotfix pull request (autoqueue)
if: ${{ ! inputs.autoqueue }}
uses: peter-evans/create-pull-request@v5
with:
title: "Hotfix pull request"
body: >
This is a test pull request!
commit-message: >
Testing 123
branch:
labels: hotfix
base: main
44 changes: 44 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
pull_request_rules:
# If you add the label `automerge` on a PR, it will be merged automatically
- name: automatic merge
conditions:
- label = automerge
actions:
merge:
method: merge

# If you add the label `automerge` on a PR, it will be queued automatically
- name: automatic queue
conditions:
- label = autoqueue
actions:
queue:

queue_rules:
- name: hotfix
speculative_checks: 5
allow_inplace_checks: false
queue_conditions:
- label = hotfix
# This can be queued without passing the CI
# But we still required to pass before merging
merge_conditions:
- check-success = test
- check-success = test-before-merge

- name: default
queue_conditions:
- label != lowprio
- label != hotfix
- check-success = test
merge_conditions:
- check-success = test-before-merge

- name: lowprio
batch_size: 3
batch_max_wait_time: 1 min
queue_conditions:
- label = lowprio
- check-success = test
merge_conditions:
- check-success = test-before-merge

0 comments on commit 936822a

Please sign in to comment.