Skip to content

Commit e921cab

Browse files
Check if VERSION or RAPIDS_VERSION has changed
1 parent 7d357f9 commit e921cab

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

.github/workflows/checks.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ on:
2626
default: true
2727
type: boolean
2828
required: false
29+
enable_check_version_file_changed:
30+
description: "Whether to enable the version file changed checker"
31+
defualt: true
32+
type: boolean
33+
required: false
2934
enable_check_version_against_tag:
3035
description: "Whether to enable the version tag checker"
3136
default: true
@@ -42,8 +47,19 @@ defaults:
4247
shell: bash
4348

4449
jobs:
50+
changed-files:
51+
secrets: inherit
52+
if: ${{ inputs.enable_check_version_file_changed }}
53+
uses: ./.github/workflows/changed-files.yaml
54+
with:
55+
files_yaml: |
56+
version_files:
57+
- VERSION
58+
- RAPIDS_VERSION
59+
4560
other-checks:
4661
runs-on: ubuntu-latest
62+
needs: changed-files
4763
container:
4864
image: rapidsai/ci-conda:25.12-latest # zizmor: ignore[unpinned-images]
4965
env:
@@ -72,6 +88,15 @@ jobs:
7288
run: rapids-check-pr-job-dependencies "${IGNORED_JOBS}"
7389
env:
7490
IGNORED_JOBS: ${{ inputs.ignored_pr_jobs }}
91+
- name: Check if VERSION or RAPIDS_VERSION file has changed
92+
if: ${{ inputs.enable_check_version_file_changed }}
93+
run: |
94+
if "$VERSION_FILES_CHANGED"; then
95+
echo "ERROR: VERSION or RAPIDS_VERSION file has been changed"
96+
exit 1
97+
fi
98+
env:
99+
VERSION_FILES_CHANGED: ${{ fromJSON(needs.changed-files.outputs.changed_file_groups).version_files }}
75100
- name: Fetch tags
76101
if: ${{ inputs.enable_check_version_against_tag }}
77102
uses: actions/checkout@v5

0 commit comments

Comments
 (0)