File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,23 @@ jobs:
5555 if : github.event.pull_request.labels.length == 0
5656 steps :
5757 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
58+ with :
59+ fetch-depth : 0
5860
5961 - name : Get changed roles
6062 id : changed-roles
61- run : git diff --name-only ${{ github.event.pull_request.head.sha }} -r | grep -E '^roles/' | cut -f 1-2 -d'/' | sort -u >> "$GITHUB_OUTPUT"
63+ env :
64+ BASE_REF : ${{ github.event.pull_request.base.ref }}
65+ HEAD_REF : ${{ github.event.pull_request.head.ref }}
66+ run : |
67+ files="$(git diff --name-only "origin/${BASE_REF}...origin/${HEAD_REF}" \
68+ | grep -E '^roles/' \
69+ | cut -f 1-2 -d'/' \
70+ | sort -u \
71+ | tr '\n' ' ' \
72+ | sed 's/[[:space:]]*$//')"
73+
74+ echo "all_changed_and_modified_files=${files}" >> "$GITHUB_OUTPUT"
6275
6376 - name : Add changed roles labels
6477 uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
You can’t perform that action at this time.
0 commit comments