diff --git a/.woodpecker/pr.yml b/.woodpecker/pr.yml index aab447a..a7878f5 100644 --- a/.woodpecker/pr.yml +++ b/.woodpecker/pr.yml @@ -2,11 +2,20 @@ when: - event: pull_request +skip_clone: true + steps: + - name: clone + image: alpine/git + commands: + - git clone --depth=1 ${CI_REPO_CLONE_URL} . + - git checkout ${CI_COMMIT_SHA} + - name: restore image: mcr.microsoft.com/dotnet/sdk:10.0-preview commands: - dotnet restore + depends_on: [clone] - name: build image: mcr.microsoft.com/dotnet/sdk:10.0-preview diff --git a/.woodpecker/release.yml b/.woodpecker/release.yml index 821c359..72ab106 100644 --- a/.woodpecker/release.yml +++ b/.woodpecker/release.yml @@ -3,11 +3,20 @@ when: - event: push branch: main +skip_clone: true + steps: + - name: clone + image: alpine/git + commands: + - git clone --depth=50 --tags ${CI_REPO_CLONE_URL} . + - git checkout ${CI_COMMIT_SHA} + - name: restore image: mcr.microsoft.com/dotnet/sdk:10.0-preview commands: - dotnet restore + depends_on: [clone] - name: build image: mcr.microsoft.com/dotnet/sdk:10.0-preview