From 4167e332d7c24e22bb141f62ca4c46cf25b304a6 Mon Sep 17 00:00:00 2001 From: amit-momin Date: Fri, 27 Mar 2026 14:48:19 -0500 Subject: [PATCH 1/3] Added validate protos version action --- actions/validate-protos-version/action.yml | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 actions/validate-protos-version/action.yml diff --git a/actions/validate-protos-version/action.yml b/actions/validate-protos-version/action.yml new file mode 100644 index 00000000..ce033b52 --- /dev/null +++ b/actions/validate-protos-version/action.yml @@ -0,0 +1,58 @@ +name: validate-protos-version +description: > + Validates that all github.com/smartcontractkit/chainlink-protos/cre/go + pseudo-versions in go.mod files reference commits from the + capabilities-development branch of chainlink-protos. + +runs: + using: composite + steps: + - name: Checkout chainlink-protos + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + with: + repository: smartcontractkit/chainlink-protos + ref: capabilities-development + path: .chainlink-protos + fetch-depth: 0 + persist-credentials: false + + - name: + Validate chainlink-protos/cre/go versions are from + capabilities-development + shell: bash + run: | + failed=0 + found=0 + + while IFS= read -r gomod; do + version=$(grep 'github.com/smartcontractkit/chainlink-protos/cre/go ' "$gomod" | head -1 | awk '{print $2}' || true) + if [[ -z "$version" ]]; then + continue + fi + + found=1 + commit=${version##*-} + + echo "Checking $gomod: version=$version commit=$commit" + + if ! git -C .chainlink-protos merge-base --is-ancestor "$commit" capabilities-development 2>/dev/null; then + echo "::error file=$gomod::commit $commit is NOT on the capabilities-development branch of chainlink-protos" + failed=1 + else + echo "OK: commit $commit is on capabilities-development" + fi + done < <(find . -name go.mod -not -path './proto_vendor/*' -not -path './.chainlink-protos/*') + + if [[ "$found" -eq 0 ]]; then + echo "::error::No go.mod files found containing chainlink-protos/cre/go" + exit 1 + fi + + if [[ "$failed" -eq 1 ]]; then + echo "" + echo "One or more go.mod files reference a chainlink-protos/cre/go commit that is not on the capabilities-development branch." + exit 1 + fi + + echo "" + echo "All chainlink-protos/cre/go versions are from capabilities-development." From b5e223d6328c316fe65d3e96fe09c2e779a84fb2 Mon Sep 17 00:00:00 2001 From: amit-momin Date: Fri, 27 Mar 2026 15:13:56 -0500 Subject: [PATCH 2/3] Updated checkout action version --- actions/validate-protos-version/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/validate-protos-version/action.yml b/actions/validate-protos-version/action.yml index ce033b52..361e6cfa 100644 --- a/actions/validate-protos-version/action.yml +++ b/actions/validate-protos-version/action.yml @@ -8,7 +8,7 @@ runs: using: composite steps: - name: Checkout chainlink-protos - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 + uses: actions/checkout@v6 with: repository: smartcontractkit/chainlink-protos ref: capabilities-development From 461f78a895766e074f6202691e1a16bcc391f3fc Mon Sep 17 00:00:00 2001 From: Erik Burton Date: Fri, 27 Mar 2026 13:16:43 -0700 Subject: [PATCH 3/3] add boilerplate --- .changeset/real-pears-study.md | 5 +++++ actions/validate-protos-version/README.md | 3 +++ actions/validate-protos-version/package.json | 11 +++++++++++ actions/validate-protos-version/project.json | 8 ++++++++ 4 files changed, 27 insertions(+) create mode 100644 .changeset/real-pears-study.md create mode 100644 actions/validate-protos-version/README.md create mode 100644 actions/validate-protos-version/package.json create mode 100644 actions/validate-protos-version/project.json diff --git a/.changeset/real-pears-study.md b/.changeset/real-pears-study.md new file mode 100644 index 00000000..47d20c0b --- /dev/null +++ b/.changeset/real-pears-study.md @@ -0,0 +1,5 @@ +--- +"validate-protos-version": major +--- + +initial release diff --git a/actions/validate-protos-version/README.md b/actions/validate-protos-version/README.md new file mode 100644 index 00000000..9d58343a --- /dev/null +++ b/actions/validate-protos-version/README.md @@ -0,0 +1,3 @@ +# validate-protos-version + +> diff --git a/actions/validate-protos-version/package.json b/actions/validate-protos-version/package.json new file mode 100644 index 00000000..a9de587a --- /dev/null +++ b/actions/validate-protos-version/package.json @@ -0,0 +1,11 @@ +{ + "name": "validate-protos-version", + "version": "0.0.0", + "description": "", + "private": true, + "scripts": {}, + "author": "@smartcontractkit", + "license": "MIT", + "dependencies": {}, + "repository": "https://github.com/smartcontractkit/.github" +} diff --git a/actions/validate-protos-version/project.json b/actions/validate-protos-version/project.json new file mode 100644 index 00000000..5e16d4d8 --- /dev/null +++ b/actions/validate-protos-version/project.json @@ -0,0 +1,8 @@ +{ + "name": "validate-protos-version", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "projectType": "application", + "sourceRoot": "actions/validate-protos-version", + "// targets": "to see all targets run: nx show project validate-protos-version --web", + "targets": {} +}