File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Block merging with outdated 3rdparty/
2
+
3
+ on :
4
+ pull_request :
5
+ types : [opened, ready_for_review, reopened, synchronize]
6
+
7
+ permissions :
8
+ contents : read
9
+
10
+ concurrency :
11
+ group : block-outdated-3rdparty-${{ github.head_ref || github.run_id }}
12
+ cancel-in-progress : true
13
+
14
+ jobs :
15
+ block-outdated-3rdparty :
16
+ name : Block merging with outdated 3rdparty/
17
+
18
+ runs-on : ubuntu-latest-low
19
+
20
+ steps :
21
+ - name : Check requirement
22
+ uses : dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
23
+ id : changes
24
+ continue-on-error : true
25
+ with :
26
+ filters : |
27
+ src:
28
+ - '3rdparty'
29
+ - 'version.php'
30
+
31
+ - name : Checkout
32
+ uses : actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
33
+
34
+ - name : 3rdparty commit hash on current branch
35
+ id : actual
36
+ run : |
37
+ echo "commit=$(git submodule status | grep ' 3rdparty' | egrep -o '[a-f0-9]{40}')" >> "$GITHUB_OUTPUT"
38
+
39
+ - name : Last 3rdparty commit on target branch
40
+ id : target
41
+ run : |
42
+ echo "commit=$(git ls-remote https://github.com/nextcloud/3rdparty ${{ github.base_ref }} | awk '{ print $1}')" >> "$GITHUB_OUTPUT"
43
+
44
+ - name : Compare if 3rdparty commits are different
45
+ run : |
46
+ echo '3rdparty/ seems to not point to the last commit of the dedicated branch:'
47
+ echo "Branch has: ${{ steps.actual.outputs.commit }}"
48
+ echo "${{ github.base_ref }} has: ${{ steps.target.outputs.commit }}"
49
+
50
+ - name : Fail if 3rdparty commits are different
51
+ if : ${{ steps.changes.outputs.src != 'false' && steps.actual.outputs.commit != steps.target.outputs.commit }}
52
+ run : |
53
+ exit 1
You can’t perform that action at this time.
0 commit comments