File tree Expand file tree Collapse file tree 4 files changed +11
-31
lines changed Expand file tree Collapse file tree 4 files changed +11
-31
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ name: Test Action
2
2
on :
3
3
pull_request :
4
4
branches : ["main"]
5
- push :
6
- branches : ["main"]
7
5
8
6
jobs :
9
7
check-pr-is-updated :
13
11
steps :
14
12
- name : Checkout
15
13
uses : actions/checkout@v3
14
+ with :
15
+ fetch-depth : 0
16
16
17
17
- name : ' check if the PR branch is updated or not'
18
18
id : check_pr_is_updated
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 6
6
remote_branch :
7
7
description : ' Remote branch (e.g.: upstream/main)'
8
8
required : true
9
- default : ' upstream/main'
10
9
pr_sha :
11
10
description : ' PR SHA'
12
11
required : true
@@ -16,8 +15,12 @@ branding:
16
15
color : green
17
16
18
17
runs :
19
- using : ' docker'
20
- image : ' Dockerfile'
21
- args :
22
- - ${{ inputs.remote_branch }}
23
- - ${{ inputs.pr_sha }}
18
+ using : ' composite'
19
+ steps :
20
+ - name : check if the PR branch is updated
21
+ shell : bash
22
+ run : |
23
+ if ! git merge-base --is-ancestor ${{ inputs.remote_branch }} ${{ inputs.pr_sha }}; then
24
+ echo "This branch is not up to date with ${{ inputs.remote_branch }}";
25
+ exit 1;
26
+ fi
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments