From 74ae6f3b91a464cc2afecb36404dc248dac2f61f Mon Sep 17 00:00:00 2001 From: includeno Date: Sun, 7 Jan 2024 13:59:45 +0800 Subject: [PATCH] update --- .github/workflows/build_python_firefox_buster_image.yml | 2 +- .github/workflows/build_python_firefox_slim_image.yml | 2 +- latest_version_firefox.py | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_python_firefox_buster_image.yml b/.github/workflows/build_python_firefox_buster_image.yml index 642705f..52997da 100644 --- a/.github/workflows/build_python_firefox_buster_image.yml +++ b/.github/workflows/build_python_firefox_buster_image.yml @@ -42,7 +42,7 @@ jobs: - name: Get latest version run: | python -m pip install requests - python latest_version_firefox.py --lang python + python latest_version_firefox.py --lang python --tag slim-buster - name: Output Docker info run: docker info - name: Sets build date diff --git a/.github/workflows/build_python_firefox_slim_image.yml b/.github/workflows/build_python_firefox_slim_image.yml index 096078a..4169347 100644 --- a/.github/workflows/build_python_firefox_slim_image.yml +++ b/.github/workflows/build_python_firefox_slim_image.yml @@ -42,7 +42,7 @@ jobs: - name: Get latest version run: | python -m pip install requests - python latest_version_firefox.py --lang python + python latest_version_firefox.py --lang python --tag slim - name: Output Docker info run: docker info - name: Sets build date diff --git a/latest_version_firefox.py b/latest_version_firefox.py index a360f74..c9e9d80 100644 --- a/latest_version_firefox.py +++ b/latest_version_firefox.py @@ -39,6 +39,7 @@ def get_latest_geckodriver_version(): argparse.ArgumentParser(description='Get the latest version of the specified language') parser = argparse.ArgumentParser() parser.add_argument('--lang', type=str, default='python', help='language') +parser.add_argument('--tag', type=str, default='slim-buster', help='tag') args = parser.parse_args() def get_tag_by_lang(lang): @@ -56,7 +57,7 @@ def get_tag_by_lang(lang): current_tag=get_tag_by_lang(args.lang) print("Current Tag: ", current_tag) -NEW_TAG=args.lang+"_firefox_"+FIREFOX_ESR_VERSION+"_geckodriver_"+GECKODRIVER_VERSION +NEW_TAG=args.lang+"_firefox_"+FIREFOX_ESR_VERSION+"_geckodriver_"+GECKODRIVER_VERSION+"_"+args.tag with open('NEW_TAG', 'w') as f: f.write(f'NEW_TAG={NEW_TAG}\n')