Skip to content

Commit 0cc9ad5

Browse files
vatsalghelani-csaandy31415cecille
authored
Check for changes to data_model directory without a sha update - Issue #31571 (#33110)
* Create check-data-model-directory-updates.yaml * Added the workflow code * Removed dependabot branch ignore * Update .github/workflows/check-data-model-directory-updates.yaml Co-authored-by: C Freeman <cecille@google.com> --------- Co-authored-by: Andrei Litvin <andy314@gmail.com> Co-authored-by: C Freeman <cecille@google.com>
1 parent 3380876 commit 0cc9ad5

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright (c) 2024 Project CHIP Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Check for changes to data_model directory without a sha update
16+
17+
on:
18+
pull_request:
19+
paths:
20+
- "data_model/**"
21+
22+
jobs:
23+
check-submodule-update-label:
24+
name: Check for changes to data_model directory without a sha update
25+
runs-on: ubuntu-latest
26+
if: "git diff --name-only HEAD^..HEAD data_model/ | grep -q spec_sha"
27+
steps:
28+
- name: Error Message
29+
run: echo This pull request attempts to update data_model directory, but is missing updates to spec_sha file with the latest version of the sha. Files in the data_model directory are generated automatically and should not be updated manually.
30+
- name: Fail Job
31+
run: exit 1

0 commit comments

Comments
 (0)