This is an automated email from the ASF dual-hosted git repository.
xjlgod pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-seata-go-samples.git
The following commit(s) were added to refs/heads/main by this push:
new bfb1ecc optimize: add license header and dependency workflow (#64)
bfb1ecc is described below
commit bfb1ecc2ea03f254b6f87962b7059e141cebd38d
Author: jimin <[email protected]>
AuthorDate: Sat Jun 14 17:48:44 2025 +0800
optimize: add license header and dependency workflow (#64)
* optimize: add license header
* optimize: add license workflow
* optimize: add license workflow
* optimize: add license workflow
---
.github/workflows/build.yaml | 42 +++++++++++++++++++++++++++++
.github/workflows/license-checker.yml | 51 +++++++++++++++++++++++++++++++++++
.licenserc.yaml | 3 +--
3 files changed, 94 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
new file mode 100644
index 0000000..2d1576c
--- /dev/null
+++ b/.github/workflows/build.yaml
@@ -0,0 +1,42 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: build
+
+on:
+ push:
+ branches: [ "main" ]
+ pull_request:
+ branches: [ "main" ]
+
+jobs:
+
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Set up Go
+ uses: actions/setup-go@v4
+ with:
+ go-version: '1.18'
+
+ - name: Build
+ run: go build -v ./...
+
+ - name: Test
+ run: go test -v ./...
\ No newline at end of file
diff --git a/.github/workflows/license-checker.yml
b/.github/workflows/license-checker.yml
new file mode 100644
index 0000000..e7d361b
--- /dev/null
+++ b/.github/workflows/license-checker.yml
@@ -0,0 +1,51 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+name: License checker
+
+on:
+ pull_request:
+ branches: [ main ]
+
+jobs:
+ check-license:
+ runs-on: ubuntu-latest
+ steps:
+ # step 1 clear cache
+ - name: Clear cache directory first before trying to restore from cache
+ run: sudo rm -rf $(go env GOMODCACHE) && sudo rm -rf $(go env GOCACHE)
+ shell: bash
+ # step 2 checkout
+ - name: Checkout
+ uses: actions/checkout@v3
+ # step 3
https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
+ - uses: actions/setup-node@v3
+ with:
+ node-version: '14.x'
+ # step 4 check license
+ - name: Check License Header
+ uses:
apache/skywalking-eyes/header@8fc52baabc14c86294d96034bcc194cfa7f76b05
+ with:
+ log: info
+ config: .licenserc.yaml
+ mode: check
+ # step 5 check dependencies
+ - name: Check Dependencies' License
+ uses:
apache/skywalking-eyes/dependency@8fc52baabc14c86294d96034bcc194cfa7f76b05
+ with:
+ log: info
+ config: .licenserc.yaml
+ mode: check
\ No newline at end of file
diff --git a/.licenserc.yaml b/.licenserc.yaml
index 176994e..46b83c6 100644
--- a/.licenserc.yaml
+++ b/.licenserc.yaml
@@ -54,14 +54,13 @@ header: # `header` section is configurations for source
codes license header.
- '**'
paths-ignore: # `paths-ignore` are the path list that will be ignored by
license-eye.
- - 'licenses'
- '**/go.mod'
- '**/go.sum'
- 'LICENSE'
- 'DISCLAIMER'
- 'NOTICE'
- '.github'
- comment: on-failure # on what condition license-eye will comment on the pull
request, `on-failure`, `always`, `never`.
+ comment: on-failure
language:
Go:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]