File tree Expand file tree Collapse file tree 2 files changed +11
-3
lines changed
Expand file tree Collapse file tree 2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -76,9 +76,15 @@ def find_draft_xls_files(changed_files: list[str]) -> list[str]:
7676
7777def main ():
7878 """Main entry point for the script."""
79- # Get repository root (parent of .github directory)
80- script_dir = Path (__file__ ).resolve ().parent
81- repo_root = script_dir .parent .parent
79+ # Get repository root from environment variable (set by GitHub Actions)
80+ # or fall back to calculating from script location
81+ repo_root_env = os .environ .get ("REPO_ROOT" )
82+ if repo_root_env :
83+ repo_root = Path (repo_root_env )
84+ else :
85+ # Fallback: parent of .github directory
86+ script_dir = Path (__file__ ).resolve ().parent
87+ repo_root = script_dir .parent .parent
8288
8389 # Get changed files from command line arguments or environment variable
8490 if len (sys .argv ) > 1 :
Original file line number Diff line number Diff line change 6262 - name : Assign XLS number
6363 if : steps.check-drafts.outputs.has_drafts == 'true'
6464 id : assign-number
65+ env :
66+ REPO_ROOT : ${{ github.workspace }}
6567 run : |
6668 echo ${{ steps.check-drafts.outputs.draft_files }}
6769 python base-repo/.github/scripts/assign_xls_number.py ${{ steps.check-drafts.outputs.draft_files }}
You can’t perform that action at this time.
0 commit comments