This is an automated email from the ASF dual-hosted git repository.
alexstocks pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-seata-go.git
The following commit(s) were added to refs/heads/master by this push:
new d50ec63b fix: undefined changes node in license checker (#882)
d50ec63b is described below
commit d50ec63b3678814ddc178e14c2537dfd536fc39b
Author: FinnTew <[email protected]>
AuthorDate: Sun Sep 14 09:20:05 2025 +0800
fix: undefined changes node in license checker (#882)
* fix: undefined changes node in license checker
* fix: add logical judgment license checker
* fix: update changes impl in license checker
* fix
---
.github/workflows/license.yml | 30 ++++++++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/.github/workflows/license.yml b/.github/workflows/license.yml
index 4f3195dd..d2c4076f 100644
--- a/.github/workflows/license.yml
+++ b/.github/workflows/license.yml
@@ -24,6 +24,34 @@ on:
- cron: "0 18 * * *" # TimeZone: UTC 0
jobs:
+ changes:
+ name: Detect changes
+ runs-on: ubuntu-latest
+ outputs:
+ has-changes: ${{ steps.changes.outputs.has-changes }}
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Detect file changes
+ id: changes
+ run: |
+ if [ "${{ github.event_name }}" = "pull_request" ]; then
+ changed_files=$(git diff --name-only origin/${{ github.base_ref
}}...HEAD)
+
+ if echo "$changed_files" | grep -E
'\.(go|java|js|ts|py|c|cpp|h|yml|yaml|json)$|go\.(mod|sum)$|package\.json$|LICENSE|NOTICE|Dockerfile'
> /dev/null; then
+ echo "has-changes=true" >> $GITHUB_OUTPUT
+ else
+ echo "has-changes=false" >> $GITHUB_OUTPUT
+ fi
+ else
+ echo "has-changes=true" >> $GITHUB_OUTPUT
+ fi
+
+ echo "Changed files:"
+ echo "$changed_files"
+
license-header:
name: License header
runs-on: ubuntu-latest
@@ -41,8 +69,10 @@ jobs:
dependency-license:
name: Dependency licenses
+ needs: [changes]
runs-on: ubuntu-latest
timeout-minutes: 30
+ if: needs.changes.outputs.has-changes == 'true'
steps:
- uses: actions/checkout@v3
with:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]