Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{CI} Auto-version-calculation fix #7233

Merged
merged 8 commits into from
Feb 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions .github/workflows/VersionCalPRComment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
uses: actions/checkout@master
with:
fetch-depth: 0 # checkout all branches
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}} # checkout pull request branch
- name: Show workdirectory after site cloned
run: |
pwd
Expand All @@ -34,20 +36,15 @@ jobs:
run: |
echo github.event.pull_request.base.sha: ${{github.event.pull_request.base.sha}}
echo github.event.pull_request.base.ref: ${{ github.event.pull_request.base.ref }}
echo github.event.pull_request.head.sha: ${{ github.event.pull_request.head.sha }}
echo github.event.pull_request.head.ref: ${{ github.event.pull_request.head.ref }}
echo github.event.pull_request.head.repo.full_name: ${{ github.event.pull_request.head.repo.full_name }}
echo github.sha: ${{github.sha}}
echo GITHUB_BASE_REF: ${GITHUB_BASE_REF}
echo GITHUB_HEAD_REF: ${GITHUB_HEAD_REF}
echo GITHUB_SHA: ${GITHUB_SHA}
echo GITHUB_REF: ${GITHUB_REF}
echo "base_branch=${GITHUB_BASE_REF}" >> $GITHUB_ENV
echo "diff_branch=${GITHUB_HEAD_REF}" >> $GITHUB_ENV
echo "base_commit=${GITHUB_SHA}" >> $GITHUB_ENV
echo "diff_commit=${GITHUB_SHA}" >> $GITHUB_ENV
git --version
git log --oneline | head -n 30
echo git branch -a
git branch -a
git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} > changed_files
git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} > changed_files
cat changed_files
cat changed_files | grep azext_ | awk -F"azext_" '{print $1}'| awk -F"/" '{print $2}' | sort | uniq > changed_modules
echo "changed_module_list=$(cat changed_files | grep azext_ | awk -F"azext_" '{print $1}'| awk -F"/" '{print $2}' | sort | uniq | xargs)" >> $GITHUB_ENV
Expand Down Expand Up @@ -95,8 +92,8 @@ jobs:
run: |
chmod +x env/bin/activate
source ./env/bin/activate
echo GITHUB_BASE_REF: ${GITHUB_BASE_REF}
git checkout ${GITHUB_BASE_REF}
echo github.event.pull_request.base.ref: ${{ github.event.pull_request.base.ref }}
git checkout ${{ github.event.pull_request.base.ref }}
for mod in `cat changed_modules`
do
echo **************************
Expand All @@ -107,8 +104,8 @@ jobs:
echo **************************
echo -e "\n\n\n\n\n"
done
echo GITHUB_HEAD_REF: ${GITHUB_HEAD_REF}
git checkout ${GITHUB_HEAD_REF}
echo github.event.pull_request.head.ref: ${{ github.event.pull_request.head.ref }}
git checkout ${{ github.event.pull_request.head.ref }}
for mod in `cat changed_modules`
do
echo **************************
Expand Down