Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/migrations-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#
# This file is part of Edgehog.
#
# Copyright 2025 SECO Mind Srl
#
# 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.
#
# SPDX-License-Identifier: Apache-2.0
#

name: Migrations check

on:
# Run on pull requests matching apps
pull_request:
paths:
- "backend/priv/repo/migrations/**"
- "backend/priv/resource_snapshots/**"
- ".github/workflows/migrations-check.yaml"

jobs:
comment:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: mshick/add-pr-comment@v2
with:
message: |
**⚠️ This PR chenges migrations and/or snapshots**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
**⚠️ This PR chenges migrations and/or snapshots**
**⚠️ This PR changes migrations and/or snapshots**

Ensure that it is are based on the latest changes in the base branch before merging.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Ensure that it is are based on the latest changes in the base branch before merging.
Ensure that the changes are based on the latest revision of the target branch before merging. Migrations and snapshots are timestamp-based and should chronologically follow the ones already merged.

Loading