Skip to content

Commit

Permalink
Migrate sync job to GitHub Actions and remove CircleCI config (#3508)
Browse files Browse the repository at this point in the history
* 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
ankatiyar authored Jan 17, 2024
1 parent 42b526e commit 4dafc47
Show file tree
Hide file tree
Showing 13 changed files with 72 additions and 395 deletions.
33 changes: 0 additions & 33 deletions .circleci/config.yml

This file was deleted.

164 changes: 0 additions & 164 deletions .circleci/continue_config.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
automerge:
- any:
- head-branch: ['merge-main-to-develop']
20 changes: 20 additions & 0 deletions .github/workflows/auto-merge-prs.yml
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 }}"
22 changes: 22 additions & 0 deletions .github/workflows/label-pr.yml
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
2 changes: 1 addition & 1 deletion .github/workflows/merge-gatekeeper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
timeout: 3600
interval: 30
ignored: 'lint_only, runner / vale,ci/circleci: win_e2e_tests-3.7,ci/circleci: win_pip_compile-3.9,ci/circleci: win_e2e_tests-3.9,ci/circleci: win_pip_compile-3.8,ci/circleci: lint-3.7,ci/circleci: win_pip_compile-3.7,ci/circleci: pip_compile-3.7,ci/circleci: e2e_tests-3.7,ci/circleci: win_unit_tests-3.7,ci/circleci: win_unit_tests-3.9,ci/circleci: e2e_tests-3.8,ci/circleci: win_unit_tests-3.10,ci/circleci: win_pip_compile-3.10,ci/circleci: win_unit_tests-3.8,ci/circleci: e2e_tests-3.9,ci/circleci: unit_tests-3.10,ci/circleci: unit_tests-3.8,ci/circleci: e2e_tests-3.10,ci/circleci: lint-3.8,ci/circleci: unit_tests-3.9,ci/circleci: unit_tests-3.7,ci/circleci: win_e2e_tests-3.10,ci/circleci: pip_compile-3.8,ci/circleci: pip_compile-3.10,ci/circleci: win_e2e_tests-3.8,ci/circleci: lint-3.9,ci/circleci: pip_compile-3.9,ci/circleci: lint-3.10,build_code,ci/circleci: check-updated-files,regular'
ignored: 'CircleCI Pipeline, runner / vale,'
25 changes: 25 additions & 0 deletions .github/workflows/sync.yml
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 }}"
28 changes: 0 additions & 28 deletions tools/circleci/docker_build_img/Dockerfile

This file was deleted.

36 changes: 0 additions & 36 deletions tools/circleci/docker_build_img/build.sh

This file was deleted.

Loading

0 comments on commit 4dafc47

Please sign in to comment.