Skip to content

Commit d508c9c

Browse files
authored
reset workflow file (Azure#8642)
1 parent ed4f5c2 commit d508c9c

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

.github/workflows/AzdevLinter.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ jobs:
1818
steps:
1919
- name: Checkout CLI extension repo
2020
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 1
23+
sparse-checkout: |
24+
.github
2125
- name: Azdev Env Setup
2226
uses: ./.github/actions/env-setup
2327
- name: Get Diff Files
@@ -46,6 +50,7 @@ jobs:
4650
cat changed_files
4751
cat changed_files | grep src/ | awk -F"src/" '{print $2}'| grep / | awk -F"/" '{print $1}' | sort | uniq
4852
echo "changed_module_list=$(cat changed_files | grep src/ | awk -F"src/" '{print $2}'| grep / | awk -F"/" '{print $1}' | sort | uniq | xargs)" >> $GITHUB_ENV
53+
git checkout -f "$base_branch_pre"/"$base_branch"
4954
- name: Display PR Diff Modules
5055
run: |
5156
for mod in ${changed_module_list[@]}
@@ -77,6 +82,7 @@ jobs:
7782
# always use the latest index.json and scripts from base branch
7883
git checkout "$base_branch_pre"/"$base_branch" -- scripts
7984
git checkout "$base_branch_pre"/"$base_branch" -- src/index.json
85+
git checkout "$base_branch_pre"/"$base_branch" -- .github
8086
merge_base=$(git merge-base HEAD "$base_branch_pre"/"$base_branch")
8187
echo merge_base: "$merge_base"
8288

.github/workflows/AzdevStyle.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ jobs:
1818
steps:
1919
- name: Checkout CLI extension repo
2020
uses: actions/checkout@v4
21+
with:
22+
fetch-depth: 1
23+
sparse-checkout: |
24+
.github
2125
- name: Azdev Env Setup
2226
uses: ./.github/actions/env-setup
2327
- name: Get Diff Files
@@ -46,6 +50,7 @@ jobs:
4650
cat changed_files
4751
cat changed_files | grep src/ | awk -F"src/" '{print $2}'| grep / | awk -F"/" '{print $1}' | sort | uniq
4852
echo "changed_module_list=$(cat changed_files | grep src/ | awk -F"src/" '{print $2}'| grep / | awk -F"/" '{print $1}' | sort | uniq | xargs)" >> $GITHUB_ENV
53+
git checkout -f "$base_branch_pre"/"$base_branch"
4954
- name: Display PR Diff Modules
5055
run: |
5156
for mod in ${changed_module_list[@]}
@@ -76,7 +81,8 @@ jobs:
7681
git checkout -f "$diff_branch"
7782
# always use the latest index.json and scripts from base branch
7883
git checkout "$base_branch_pre"/"$base_branch" -- scripts
79-
git checkout "$base_branch_pre"/"$base_branch" -- src/index.json
84+
git checkout "$base_branch_pre"/"$base_branch" -- src/index.json
85+
git checkout "$base_branch_pre"/"$base_branch" -- .github
8086
merge_base=$(git merge-base HEAD "$base_branch_pre"/"$base_branch")
8187
echo merge_base: "$merge_base"
8288

0 commit comments

Comments
 (0)