Skip to content

Commit

Permalink
Merge pull request #262 from khaledsulayman/ks-auto-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
khaledsulayman authored Sep 12, 2024
2 parents b9d41ee + 4c47c95 commit b5807a7
Show file tree
Hide file tree
Showing 4 changed files with 83 additions and 2 deletions.
70 changes: 70 additions & 0 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,74 @@
pull_request_rules:
- name: auto-merge
description: Automatically merge to main with >= 2 approvals. All requested reviews have given feedback, no changes requested, and CI has passed.
conditions:
- "#approved-reviews-by>=2"
- "#review-requested=0"
- "#changes-requested-reviews-by=0"
- label!=hold
- label!=do-not-merge
- label!=needs-rebase
- check-success=DCO

- or:
# base branch is main or a release branch
- base=main
- base~=^release-

# If workflow configuration files in .github/ are changed, the actionlint check must pass
- or:

- and:
- check-success=actionlint
- or:
- files~=^\.github/(actions|workflows)/.*\.ya?ml$
- files~=^\.github/workflows/actionlint\.
- and:
# files matching the below patterns are unchanged
- -files~=^\.github/(actions|workflows)/.*\.ya?ml$
- -files~=^\.github/workflows/actionlint\.

# e2e workflow
- or:
- and:
- check-success=e2e-workflow-complete
- or:
- files~=\.py$
- files=pyproject.toml
- files=^requirements.*\.txt$
- files=.github/workflows/e2e-nvidia-t4-x1.yml
- and:
- -files~=\.py$
- -files=pyproject.toml
- -files~=^requirements.*\.txt$
- -files=.github/workflows/e2e-nvidia-t4-x1.yml

# lint must pass if files change that would trigger this job
- or:
- and:
- check-success=lint-workflow-complete
- or:
# see .github/workflows/lint.yml and test.yml
- files~=\.py$
- files=pyproject.toml
- files~=^requirements.*\.txt$
- files=tox.ini
- files~=^scripts/[^/]+\.sh$
- files~=^src/instructlab/sdg/pipelines/
- files=.github/workflows/lint.yml
- and:
- -files~=\.py$
- -files=pyproject.toml
- -files~=^requirements.*\.txt$
- -files=tox.ini
- -files~=^scripts/[^/]+\.sh$
- -files~=^src/instructlab/sdg/pipelines/
- -files=.github/workflows/lint.yml

actions:
merge:
method: merge
delete_head_branch:

- name: label-cicd
description: Automatically apply CI/CD label
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/actionlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
push:
branches:
- "main"
- "release-**"
paths:
- '.github/workflows/*.ya?ml'
- '.github/workflows/actionlint.*' # This workflow
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/e2e-nvidia-t4-x1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
branches:
- main
- release-*
paths:
- "**.py"
- "pyproject.toml"
- "requirements**.txt"
- ".github/workflows/e2e-nvidia-t4-x1.yml" # This workflow
pull_request_target:
types:
- opened
Expand All @@ -15,6 +20,11 @@ on:
branches:
- main
- release-*
paths:
- "**.py"
- "pyproject.toml"
- "requirements**.txt"
- ".github/workflows/e2e-nvidia-t4-x1.yml" # This workflow

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
- 'requirements*.txt'
- 'tox.ini'
- 'scripts/*.sh'
- '.github/**'
- '.github/workflows/lint.yml'
- 'src/instructlab/sdg/pipelines/**'
pull_request:
branches:
Expand All @@ -25,7 +25,7 @@ on:
- 'requirements*.txt'
- 'tox.ini'
- 'scripts/*.sh'
- '.github/**'
- '.github/workflows/lint.yml'
- 'src/instructlab/sdg/pipelines/**'

env:
Expand Down

0 comments on commit b5807a7

Please sign in to comment.