Skip to content

Commit 897f04c

Browse files
Merge main into dev-sync-with-main
2 parents 6a655d6 + ee8e425 commit 897f04c

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

.github/workflows/check-restricted-files.yaml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,32 @@ name: check-restricted-files
88
on:
99
pull_request:
1010
paths:
11-
- 'schemas/**/*.yaml'
12-
- 'versions/*.md'
11+
- "versions/*.md"
1312

1413
jobs:
1514
check-files:
1615
runs-on: ubuntu-latest
1716
steps:
17+
- uses: actions/checkout@v5 # checkout repo content
18+
with:
19+
fetch-depth: 0
20+
1821
- name: Check changed files
1922
shell: bash
2023
run: |
2124
if [[ "${{ github.event.pull_request.head.repo.full_name }}" == "OAI/OpenAPI-Specification" ]] && \
2225
[[ "${{ github.event.pull_request.base.repo.full_name }}" == "OAI/OpenAPI-Specification" ]]; then
23-
24-
if [[ "${{ github.event.pull_request.head.ref }}" == "main" ]] && \
26+
27+
if [[ "${{ github.event.pull_request.head.ref }}" == "dev-sync-with-main" ]] && \
2528
[[ "${{ github.event.pull_request.base.ref }}" == "dev" ]]; then
26-
echo Sync from main to dev
29+
echo Sync from main to dev via ${{ github.event.pull_request.head.ref }}
2730
exit 0
2831
fi
2932
30-
if [[ "${{ github.event.pull_request.head.ref }}" == "dev" ]] && \
31-
[[ "${{ github.event.pull_request.base.ref }}" =~ ^v[0-9]+\.[0-9]+-dev$ ]]; then
32-
echo Sync from dev to ${{ github.event.pull_request.base.ref }}
33+
if [[ "${{ github.event.pull_request.head.ref }}" =~ ^v[0-9]+\.[0-9]+-dev-sync-with-dev$ ]] && \
34+
[[ "${{ github.event.pull_request.base.ref }}" =~ ^v[0-9]+\.[0-9]+-dev$ ]] && \
35+
[[ ${{ github.event.pull_request.head.ref }} == ${{ github.event.pull_request.base.ref }}* ]]; then
36+
echo Sync from dev to ${{ github.event.pull_request.base.ref }} via ${{ github.event.pull_request.head.ref }}
3337
exit 0
3438
fi
3539
@@ -40,5 +44,8 @@ jobs:
4044
fi
4145
fi
4246
43-
echo This PR contains changes to files that should not be changed
47+
echo This PR contains changes to files that should not be changed:
48+
echo
49+
git diff --compact-summary origin/${{ github.event.pull_request.base.ref }} origin/${{ github.event.pull_request.head.ref }} -- versions/
50+
4451
exit 1

0 commit comments

Comments
 (0)