From 3c7333ea2ed0d8aba9e68cf72aaf1c04951e176f Mon Sep 17 00:00:00 2001 From: Jarcis-cy Date: Tue, 25 Jun 2024 13:31:05 +0800 Subject: [PATCH] =?UTF-8?q?[test]=20=E6=B5=8B=E8=AF=95ci=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/lint.yml | 8 +++++--- finger/Azure.yml | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d93645e..e5f9471 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -17,6 +17,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2 + with: + fetch-depth: 2 # 获取足够的提交历史 - name: Download latest release of xlint_linux_amd64 run: | @@ -28,9 +30,9 @@ jobs: run: | FINGER_CHANGED=false POC_CHANGED=false - PREV_SHA=$(git rev-parse HEAD~1) - git diff --name-only $PREV_SHA ${{ github.sha }} | grep '^finger/' && FINGER_CHANGED=true || true - git diff --name-only $PREV_SHA ${{ github.sha }} | grep '^poc/' && POC_CHANGED=true || true + PREV_SHA=$(git rev-list -n 1 HEAD^1) + git diff --name-only $PREV_SHA $GITHUB_SHA | grep '^finger/' && FINGER_CHANGED=true || true + git diff --name-only $PREV_SHA $GITHUB_SHA | grep '^poc/' && POC_CHANGED=true || true if $FINGER_CHANGED && $POC_CHANGED; then ./xlint_linux_amd64 -f "./finger/*.yml" -f "./poc/*.yml" | tee xlint_output diff --git a/finger/Azure.yml b/finger/Azure.yml index 7a76008..94e3078 100644 --- a/finger/Azure.yml +++ b/finger/Azure.yml @@ -3,7 +3,7 @@ manual: false detail: fingerprint: name: Azure - fofa: header="azure-webrole-instance" + fofa: header="azure-webrole-instance-id" transport: http rules: r0: