This is an automated email from the ASF dual-hosted git repository.

tison pushed a commit to branch ci
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git

commit 4e4a2738254890d5d9f370135589251095eeb201
Author: tison <[email protected]>
AuthorDate: Thu Oct 26 10:44:57 2023 +0800

    ci: check licnese header
    
    Signed-off-by: tison <[email protected]>
---
 .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++
 licenserc.toml           |  5 +++++
 2 files changed, 34 insertions(+)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..d346dabb
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,29 @@
+name: CI
+on:
+  pull_request:
+    branches: [ main ]
+  push:
+    branches: [ main ]
+
+# Concurrency strategy:
+#   github.workflow: distinguish this workflow from others
+#   github.event_name: distinguish `push` event from `pull_request` event
+#   github.event.number: set to the number of the pull request if 
`pull_request` event
+#   github.run_id: otherwise, it's a `push` or `schedule` event, only cancel 
if we rerun the workflow
+#
+# Reference:
+#   https://docs.github.com/en/actions/using-jobs/using-concurrency
+#   
https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
+concurrency:
+  group: ${{ github.workflow }}-${{ github.event_name }}-${{ 
github.event.number || github.run_id }}
+  cancel-in-progress: true
+
+jobs:
+  check:
+    name: Check and lint
+    runs-on: ubuntu-latest
+    timeout-minutes: 10
+    steps:
+      - uses: actions/checkout@v3
+      - name: Check license header
+        uses: korandoru/hawkeye@v3
diff --git a/licenserc.toml b/licenserc.toml
new file mode 100644
index 00000000..03174a35
--- /dev/null
+++ b/licenserc.toml
@@ -0,0 +1,5 @@
+headerPath = "Apache-2.0-ASF.txt"
+
+[properties]
+inceptionYear = 2023
+copyrightOwner = "tison <[email protected]>"

Reply via email to