diff --git a/.github/workflows/build-image-ci.yaml b/.github/workflows/build-image-ci.yaml index 2b0c3a10..a0723102 100644 --- a/.github/workflows/build-image-ci.yaml +++ b/.github/workflows/build-image-ci.yaml @@ -71,8 +71,8 @@ jobs: uses: dorny/paths-filter@v2.10.2 id: go-changes with: - base: ${{ github.event.pull_request_target.base.sha }} - ref: ${{ github.event.pull_request_target.head.sha }} + base: ${{ github.event.pull_request.base.sha }} + ref: ${{ github.event.pull_request.head.sha }} filters: | src: - api/** diff --git a/.github/workflows/debug-context.yaml b/.github/workflows/debug-context.yaml index c6463f7a..8f621690 100644 --- a/.github/workflows/debug-context.yaml +++ b/.github/workflows/debug-context.yaml @@ -39,9 +39,11 @@ jobs: # "github.head_ref = pr/welan/md-spell" echo "github.head_ref = ${{ github.head_ref }}" + # pull_request or pull_request_target 都能获取到 echo "github.event.pull_request.base.sha = ${{ github.event.pull_request.base.sha }}" echo "github.event.pull_request.head.sha = ${{ github.event.pull_request.head.sha }}" + # 这个获取不到任何东西 ,即使 pull_request_target 也获取不到 echo "github.event.pull_request_target.base.sha = ${{ github.event.pull_request_target.base.sha }}" echo "github.event.pull_request_target.head.sha = ${{ github.event.pull_request_target.head.sha }}" @@ -75,3 +77,10 @@ jobs: # ================ for workflow_call, only available in a reusable workflow echo "inputs = ${{ inputs }}" echo "inputs = ${{ inputs.mytag }}" + + # ========= env + echo "GITHUB_BASE_REF = ${{ GITHUB_BASE_REF }}" + echo "GITHUB_HEAD_REF = ${{ GITHUB_HEAD_REF }}" + echo "GITHUB_REF = ${{ GITHUB_REF }}" + echo "GITHUB_REF_NAME = ${{ GITHUB_REF_NAME }}" + echo "GITHUB_SHA = ${{ GITHUB_SHA }}" diff --git a/.github/workflows/debug-context2.yaml b/.github/workflows/debug-context2.yaml index dad15759..a386863f 100644 --- a/.github/workflows/debug-context2.yaml +++ b/.github/workflows/debug-context2.yaml @@ -37,9 +37,11 @@ jobs: # "github.head_ref = pr/welan/md-spell" echo "github.head_ref = ${{ github.head_ref }}" + # pull_request or pull_request_target 都能获取到 echo "github.event.pull_request.base.sha = ${{ github.event.pull_request.base.sha }}" echo "github.event.pull_request.head.sha = ${{ github.event.pull_request.head.sha }}" + # 这个获取不到任何东西 ,即使 pull_request_target 也获取不到 echo "github.event.pull_request_target.base.sha = ${{ github.event.pull_request_target.base.sha }}" echo "github.event.pull_request_target.head.sha = ${{ github.event.pull_request_target.head.sha }}" @@ -73,3 +75,11 @@ jobs: # ================ for workflow_call, only available in a reusable workflow echo "inputs = ${{ inputs }}" echo "inputs = ${{ inputs.mytag }}" + + # ========= env + echo "GITHUB_BASE_REF = ${{ GITHUB_BASE_REF }}" + echo "GITHUB_HEAD_REF = ${{ GITHUB_HEAD_REF }}" + echo "GITHUB_REF = ${{ GITHUB_REF }}" + echo "GITHUB_REF_NAME = ${{ GITHUB_REF_NAME }}" + echo "GITHUB_SHA = ${{ GITHUB_SHA }}" + \ No newline at end of file diff --git a/docs/contributing/development/chart.md b/docs/contributing/development/chart.md index d7899170..ecc24b2e 100644 --- a/docs/contributing/development/chart.md +++ b/docs/contributing/development/chart.md @@ -5,7 +5,7 @@ the '/' of branch 'github_pages' is used as github page each version of chart package will be automatically created by CI, they will be pushed to '/chart' of branch 'github_pages'. -the '/index.yaml' of branch 'github_pages' will also be updated by CI. +the '/index.yaml' of branch 'github_pages' will also be updated by CI. so, you could use following command to get the chart diff --git a/pkg/lock/lock.go b/pkg/lock/lock.go index 08d90b8c..774bf06a 100644 --- a/pkg/lock/lock.go +++ b/pkg/lock/lock.go @@ -10,6 +10,6 @@ type RWMutex struct { // Mutex is equivalent to sync.Mutex but applies deadlock detection if the // built tag "lockdebug" is set -type Mutex struct { +type Mutex struct { internalMutex }