diff --git a/README.md b/README.md index f7e91d629..e517dfa76 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ on: # │ │ │ │ │ # │ │ │ │ │ # * * * * * - - cron: '0 0 * * 0' + - cron: '30 1 * * 0' jobs: CodeQL-Build: diff --git a/python-setup/auto_install_packages.py b/python-setup/auto_install_packages.py index f0c102056..5228ff897 100755 --- a/python-setup/auto_install_packages.py +++ b/python-setup/auto_install_packages.py @@ -173,5 +173,8 @@ def install_packages(codeql_base_dir) -> Optional[str]: python_executable_path = install_packages(codeql_base_dir) if python_executable_path is not None: + # see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable + env_file = open(os.environ["GITHUB_ENV"], mode="at") + print("Setting CODEQL_PYTHON={}".format(python_executable_path)) - print("::set-env name=CODEQL_PYTHON::{}".format(python_executable_path)) + print("CODEQL_PYTHON={}".format(python_executable_path), file=env_file) diff --git a/python-setup/tests/from_python_exe.py b/python-setup/tests/from_python_exe.py index 69e2e873e..19702cf37 100755 --- a/python-setup/tests/from_python_exe.py +++ b/python-setup/tests/from_python_exe.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import sys +import os import subprocess from typing import Tuple @@ -24,8 +25,11 @@ def get_details(path_to_python_exe: str) -> Tuple[str, str]: if __name__ == "__main__": version, import_path = get_details(sys.argv[1]) + # see https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable + env_file = open(os.environ["GITHUB_ENV"], mode="at") + print("Setting LGTM_PYTHON_SETUP_VERSION={}".format(version)) - print("::set-env name=LGTM_PYTHON_SETUP_VERSION::{}".format(version)) + print("LGTM_PYTHON_SETUP_VERSION={}".format(version), file=env_file) print("Setting LGTM_INDEX_IMPORT_PATH={}".format(import_path)) - print("::set-env name=LGTM_INDEX_IMPORT_PATH::{}".format(import_path)) \ No newline at end of file + print("LGTM_INDEX_IMPORT_PATH={}".format(import_path), file=env_file)