This is an automated email from the ASF dual-hosted git repository.
zclll pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 8719d70ff3b [improve](ci) Use incremental license check for pull
requests (#62232)
8719d70ff3b is described below
commit 8719d70ff3bbd24b22d7ce33a4fb5f8c8e3fcc92
Author: Dongyang Li <[email protected]>
AuthorDate: Tue Apr 14 11:26:45 2026 +0800
[improve](ci) Use incremental license check for pull requests (#62232)
Reduce the time cost for license check to at least 5 minutes.
---------
Co-authored-by: stephen lee <[email protected]>
---
.github/workflows/license-eyes.yml | 32 +++++++++++++++++++++++++++++++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff --git a/.github/workflows/license-eyes.yml
b/.github/workflows/license-eyes.yml
index c17081fc75b..b0470ef5c6c 100644
--- a/.github/workflows/license-eyes.yml
+++ b/.github/workflows/license-eyes.yml
@@ -48,7 +48,37 @@ jobs:
with:
ref: ${{ github.event.pull_request.head.sha }}
+ - name: Get changed files
+ if: github.event_name == 'pull_request_target'
+ id: changed-files
+ uses: tj-actions/changed-files@v45
+ with:
+ separator: "\n"
+
+ - name: Generate incremental licenserc
+ if: github.event_name == 'pull_request_target' &&
steps.changed-files.outputs.all_changed_files != ''
+ env:
+ CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
+ run: |
+ python3 - <<'EOF'
+ import yaml, os
+
+ with open('.licenserc.yaml') as f:
+ config = yaml.safe_load(f)
+
+ changed = os.environ.get('CHANGED_FILES', '').strip().split('\n')
+ changed = [p.strip() for p in changed if p.strip()]
+
+ config['header']['paths'] = changed
+
+ with open('.licenserc-incremental.yaml', 'w') as f:
+ yaml.dump(config, f, default_flow_style=False,
allow_unicode=True)
+ EOF
+
- name: Check License
- uses: apache/[email protected]
+ if: github.event_name != 'pull_request_target' ||
steps.changed-files.outputs.all_changed_files != ''
+ uses: apache/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ with:
+ config: ${{ github.event_name == 'pull_request_target' &&
'.licenserc-incremental.yaml' || '.licenserc.yaml' }}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]