diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index ab10664..5601b21 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -36,6 +36,8 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v3 + with: + ref: "refs/pull/${{ github.event.number }}/merge" # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 55f5c3c..26325a6 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,9 +12,9 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - - name: Unshallow - run: git fetch --prune --unshallow + with: + fetch-depth: 0 + ref: "refs/pull/${{ github.event.number }}/merge" - name: Install semantic-release run: yarn global add --no-progress --non-interactive "semantic-release" "@semantic-release/exec" @@ -31,9 +31,9 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - - name: Unshallow - run: git fetch --prune --unshallow + with: + fetch-depth: 0 + ref: "refs/pull/${{ github.event.number }}/merge" - name: Set up Go uses: actions/setup-go@v2.1.4 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b634d9e..79a27c6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,6 +22,8 @@ jobs: - name: Checkout uses: actions/checkout@v3 + with: + fetch-depth: 0 - name: golangci-lint uses: golangci/golangci-lint-action@v2.5.2 @@ -41,6 +43,8 @@ jobs: - name: Checkout uses: actions/checkout@v3 + with: + ref: "refs/pull/${{ github.event.number }}/merge" - name: Test run: go test -coverprofile cover.out ./...