From 77c9f95a565cc7f680da0a6bebf5849f4f60d3e0 Mon Sep 17 00:00:00 2001 From: Hiep Mai Date: Tue, 30 Jul 2024 11:04:52 +0700 Subject: [PATCH 1/6] test sync workflow manually --- .github/workflows/sync_pr_dev_to_main.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sync_pr_dev_to_main.yml b/.github/workflows/sync_pr_dev_to_main.yml index 1b7d2f07..38097811 100644 --- a/.github/workflows/sync_pr_dev_to_main.yml +++ b/.github/workflows/sync_pr_dev_to_main.yml @@ -1,8 +1,7 @@ name: Create Sync PR from Main to Dev on: - schedule: - - cron: "0 0 * * *" + workflow_dispatch: jobs: call_sync_branch: @@ -10,5 +9,5 @@ jobs: with: base_branch: 'main' target_branch: 'dev' - reviewers: 'jrwbabylonchain,gbarkhatov,jeremy-babylonchain' - secrets: inherit + reviewers: 'jrwbabylonlab,gbarkhatov,jeremy-babylonlabs' + secrets: inherit \ No newline at end of file From da4ccbda37889e19bb7956a3026a4bbce0f6bb74 Mon Sep 17 00:00:00 2001 From: Hiep Mai Date: Tue, 30 Jul 2024 11:07:55 +0700 Subject: [PATCH 2/6] Change github trigger condition to on push to test --- .github/workflows/sync_pr_dev_to_main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sync_pr_dev_to_main.yml b/.github/workflows/sync_pr_dev_to_main.yml index 38097811..ebd0b31f 100644 --- a/.github/workflows/sync_pr_dev_to_main.yml +++ b/.github/workflows/sync_pr_dev_to_main.yml @@ -1,7 +1,9 @@ name: Create Sync PR from Main to Dev on: - workflow_dispatch: + push: + branches: + - hiep/test-sync-workflow jobs: call_sync_branch: From a84b2f0d8317179c2dc2bde37558a92a19286e21 Mon Sep 17 00:00:00 2001 From: Hiep Mai Date: Tue, 30 Jul 2024 11:14:31 +0700 Subject: [PATCH 3/6] Update the source workflow --- .github/workflows/sync_pr_dev_to_main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync_pr_dev_to_main.yml b/.github/workflows/sync_pr_dev_to_main.yml index ebd0b31f..6d5991b2 100644 --- a/.github/workflows/sync_pr_dev_to_main.yml +++ b/.github/workflows/sync_pr_dev_to_main.yml @@ -7,7 +7,7 @@ on: jobs: call_sync_branch: - uses: babylonchain/.github/.github/workflows/reusable_sync_branch.yml@v0.2.0 + uses: babylonlabs-io/.github/.github/workflows/reusable_sync_branch.yml@v0.2.0 with: base_branch: 'main' target_branch: 'dev' From b529b25ab67f34c63c538736e9cf1f8ff63be627 Mon Sep 17 00:00:00 2001 From: Hiep Mai Date: Tue, 30 Jul 2024 11:19:27 +0700 Subject: [PATCH 4/6] Test adding permissions --- .github/workflows/sync_pr_dev_to_main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/sync_pr_dev_to_main.yml b/.github/workflows/sync_pr_dev_to_main.yml index 6d5991b2..0edb9157 100644 --- a/.github/workflows/sync_pr_dev_to_main.yml +++ b/.github/workflows/sync_pr_dev_to_main.yml @@ -5,6 +5,10 @@ on: branches: - hiep/test-sync-workflow +permissions: + contents: write + pull-requests: write + jobs: call_sync_branch: uses: babylonlabs-io/.github/.github/workflows/reusable_sync_branch.yml@v0.2.0 From d184c8e50410c36d2d25d0efa3ae98888674ffe1 Mon Sep 17 00:00:00 2001 From: Hiep Mai Date: Tue, 30 Jul 2024 11:26:11 +0700 Subject: [PATCH 5/6] Limit the permission to pull-requests only --- .github/workflows/sync_pr_dev_to_main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/sync_pr_dev_to_main.yml b/.github/workflows/sync_pr_dev_to_main.yml index 0edb9157..2ff63ee0 100644 --- a/.github/workflows/sync_pr_dev_to_main.yml +++ b/.github/workflows/sync_pr_dev_to_main.yml @@ -6,7 +6,6 @@ on: - hiep/test-sync-workflow permissions: - contents: write pull-requests: write jobs: From edb37b23da93fb2a99be499eb3d71f09989c8dd5 Mon Sep 17 00:00:00 2001 From: Hiep Mai Date: Tue, 30 Jul 2024 11:28:07 +0700 Subject: [PATCH 6/6] Revert testing condition --- .github/workflows/sync_pr_dev_to_main.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sync_pr_dev_to_main.yml b/.github/workflows/sync_pr_dev_to_main.yml index 2ff63ee0..553097eb 100644 --- a/.github/workflows/sync_pr_dev_to_main.yml +++ b/.github/workflows/sync_pr_dev_to_main.yml @@ -1,9 +1,8 @@ name: Create Sync PR from Main to Dev on: - push: - branches: - - hiep/test-sync-workflow + schedule: + - cron: "0 0 * * *" permissions: pull-requests: write