Skip to content

Commit

Permalink
Check for changes to data_model directory without a sha update - Issue
Browse files Browse the repository at this point in the history
…project-chip#31571 (project-chip#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 <[email protected]>

---------

Co-authored-by: Andrei Litvin <[email protected]>
Co-authored-by: C Freeman <[email protected]>
  • Loading branch information
3 people authored Apr 24, 2024
1 parent 3380876 commit 0cc9ad5
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/check-data-model-directory-updates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright (c) 2024 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Check for changes to data_model directory without a sha update

on:
pull_request:
paths:
- "data_model/**"

jobs:
check-submodule-update-label:
name: Check for changes to data_model directory without a sha update
runs-on: ubuntu-latest
if: "git diff --name-only HEAD^..HEAD data_model/ | grep -q spec_sha"
steps:
- name: Error Message
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.
- name: Fail Job
run: exit 1

0 comments on commit 0cc9ad5

Please sign in to comment.