Commit 8419c41 1 parent 093fdf4 commit 8419c41 Copy full SHA for 8419c41
File tree 1 file changed +21
-2
lines changed
1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change 15
15
uses : actions/checkout@v3
16
16
with :
17
17
fetch-depth : 0
18
+ - name : Define base and head refs
19
+ env :
20
+ BASE_REF : ${{ github.event.pull_request.base.ref }}
21
+ HEAD_REF : ${{ github.event.pull_request.head.ref }}
22
+ run : |
23
+ echo "Base ref: ${BASE_REF}"
24
+ echo "Head ref: ${HEAD_REF}"
25
+ - name : Add forked repository as remote
26
+ run : |
27
+ git remote add fork ${{ github.event.pull_request.head.repo.clone_url }}
28
+ - name : Fetch base branch from main repository
29
+ run : |
30
+ git fetch origin ${BASE_REF}
31
+ - name : Fetch head branch from forked repository
32
+ run : |
33
+ git fetch fork ${HEAD_REF}
18
34
- name : Get changed files
35
+ env :
36
+ BASE_REF : ${{ github.event.pull_request.base.ref }}
37
+ HEAD_REF : ${{ github.event.pull_request.head.ref }}
19
38
run : |
20
- git diff --name-only --diff-filter=ACMRTUXB ${GITHUB_BASE_REF }..${GITHUB_HEAD_REF } > check_diff.txt
39
+ git diff --name-only --diff-filter=ACMRTUXB origin/${BASE_REF }..fork/${HEAD_REF } > check_diff.txt
21
40
- name : Check changed files
22
41
run : |
23
42
if grep -v -E "^(docs|\.github)/" check_diff.txt; then
26
45
echo "skip=true" >> ${GITHUB_OUTPUT}
27
46
fi
28
47
outputs :
29
- skip : ${{ steps.check.outputs.skip_workflows }}
48
+ skip : ${{ steps.check.outputs.skip }}
You can’t perform that action at this time.
0 commit comments