Skip to content

Commit

Permalink
ci: shallow lock error
Browse files Browse the repository at this point in the history
Signed-off-by: Francesco Canovai <[email protected]>
  • Loading branch information
fcanovai committed Jun 28, 2024
1 parent bc2fa7a commit ce16f6c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/continuous-delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,17 @@ jobs:
# We need the full history for the commitlint task
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Install Task
uses: arduino/setup-task@v2
- name: Install Dagger
env:
# renovate: datasource=github-tags depName=dagger/dagger versioning=semver
DAGGER_VERSION: 0.11.9
DAGGER_VERSION: 0.11.5
run: |
curl -L https://dl.dagger.io/dagger/install.sh | BIN_DIR=$HOME/.local/bin sh
- name: Run CI task
env:
COMMIT_LEN: ${{ github.event.pull_request.commits }}
run: |
task ci
29 changes: 17 additions & 12 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,11 @@ tasks:

protoc-gen-go-grpc:
desc: Compile proto files
deps:
- protolint
env:
# renovate: datasource=git-refs depName=protoc-gen-go-grpc lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
DAGGER_PROTOC_GEN_GO_GRPC_SHA: f09d41cb90701db446048a9f20eb03495e50f727
cmds:
- task: protolint
- >
dagger -s call -m github.com/cloudnative-pg/daggerverse/protoc-gen-go-grpc@${DAGGER_PROTOC_GEN_GO_GRPC_SHA} run --source . --go-opt module=github.com/cloudnative-pg/cnpg-i
--go-grpcopt module=github.com/cloudnative-pg/cnpg-i --proto-path proto -o .
Expand All @@ -27,12 +26,11 @@ tasks:

lint:
desc: Run golangci-lint
deps:
- protoc-gen-go-grpc
env:
# renovate: datasource=git-refs depName=golangci-lint lookupName=https://github.com/sagikazarmark/daggerverse currentValue=main
DAGGER_GOLANGCI_LINT_SHA: b249f27c0d6a2183cd368ae767fc912a09a1a40f
cmds:
- task: protoc-gen-go-grpc
- >
dagger -s call -m github.com/sagikazarmark/daggerverse/golangci-lint@${DAGGER_GOLANGCI_LINT_SHA}
run --source . --config .golangci.yml stdout
Expand All @@ -53,28 +51,35 @@ tasks:
desc: Check for conventional commits
env:
# renovate: datasource=git-refs depName=commitlint lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
DAGGER_COMMITLINT_SHA: f09d41cb90701db446048a9f20eb03495e50f727
DAGGER_COMMITLINT_SHA: 6f30f37494c3152432bd6585be0851db2cb2e8f4
FROM: 'origin/main'
TO: 'HEAD'
cmds:
- dagger -s call -m github.com/cloudnative-pg/daggerverse/commitlint@${DAGGER_COMMITLINT_SHA} lint --source . --args "--from=origin/main" stdout
- env
- git branch -a
- git rev-parse HEAD
- git rev-parse origin/main
- git log HEAD~3..HEAD
- dagger call -m github.com/fcanovai/daggerverse/commitlint@${DAGGER_COMMITLINT_SHA} git-debug --source . stdout
- dagger call -m github.com/fcanovai/daggerverse/commitlint@${DAGGER_COMMITLINT_SHA} lint --source . --args "--from=${TO}~${COMMIT_LEN}" --args "--to=${TO}" stdout

uncommitted:
desc: Check for uncommitted changes
deps:
- lint
- protoc-gen-doc
env:
# renovate: datasource=git-refs depName=uncommitted lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
DAGGER_UNCOMMITTED_SHA: f09d41cb90701db446048a9f20eb03495e50f727
cmds:
- task: lint
- task: protoc-gen-doc
- dagger -s call -m github.com/cloudnative-pg/daggerverse/uncommitted@${DAGGER_UNCOMMITTED_SHA} check-uncommitted --source . stdout
sources:
- ./**

ci:
desc: Run the CI pipeline
deps:
- commitlint
- uncommitted
cmds:
- task: commitlint
- task: uncommitted

clean:
desc: Remove autogenerated artifacts
Expand Down

0 comments on commit ce16f6c

Please sign in to comment.