-
Notifications
You must be signed in to change notification settings - Fork 905
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate sync job to GitHub Actions and remove CircleCI config (#3508)
* Add sync, label and merge jobs Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com> * Add comments to the workflows Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com> * Update merge gatekeeper Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com> --------- Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>
- Loading branch information
Showing
13 changed files
with
72 additions
and
395 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
automerge: | ||
- any: | ||
- head-branch: ['merge-main-to-develop'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Auto-merge sync PR | ||
# This workflow automatically merges the PRs labelled "automerge". This is a part of syncing | ||
# of `develop` and `main` branches. | ||
|
||
on: | ||
schedule: | ||
- cron: '*/60 * * * *' # every 60 minutes | ||
workflow_dispatch: # on button click | ||
|
||
jobs: | ||
automerge: | ||
permissions: | ||
pull-requests: read | ||
contents: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Automerge PRs with "automerge" label | ||
uses: "pascalgn/automerge-action@v0.16.2" | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Label PRs | ||
# This workflow is a part of the sync and merge job, it labels the PRs created by `sync.yml` | ||
# workflows with the "automerge" label. This label is used by the `auto-merge-prs.yml` workflow | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
branches: | ||
- develop | ||
|
||
|
||
jobs: | ||
label-pr: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
steps: | ||
- name: Label PR with "automerge" | ||
uses: actions/labeler@v5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Sync `main` and `develop` | ||
# This workflow merges commits from `main` branch to `develop` branch if the commits can be merged | ||
# cleanly, otherwise creates a PR for the maintainers to manually resolve the conflicts. | ||
|
||
on: | ||
schedule: | ||
- cron: '*/30 * * * *' # every 30 minutes | ||
workflow_dispatch: # on button click | ||
|
||
jobs: | ||
sync: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set git email and name | ||
run: | | ||
git config --global user.email "kedro@kedro.com" | ||
git config --global user.name "Kedro" | ||
- name: Maybe merge to develop or raise a PR | ||
run: ./tools/github_actions/merge.sh . "main" "develop" "${{ secrets.GITHUB_TOKEN }}" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.