diff --git a/.github/workflows/release_registry.yml b/.github/workflows/release_registry.yml index 8299aaa..25a6545 100644 --- a/.github/workflows/release_registry.yml +++ b/.github/workflows/release_registry.yml @@ -18,10 +18,6 @@ jobs: - name: Check out the code uses: actions/checkout@v2 - - name: Merge Source Configs - run: python merge_configs.py - working-directory: ${{ github.workspace }} - - name: Get next version uses: reecetech/version-increment@2023.9.3 id: version @@ -29,6 +25,10 @@ jobs: scheme: semver increment: patch + - name: Merge Source Configs + run: python merge_configs.py --version ${{ steps.version.outputs.version }} + working-directory: ${{ github.workspace }} + - name: Create a new Release if: github.event.pull_request.merged == true || github.event.ref == 'refs/heads/main' run: | diff --git a/merge_configs.py b/merge_configs.py index 7e323b6..1c6e15c 100644 --- a/merge_configs.py +++ b/merge_configs.py @@ -1,8 +1,16 @@ import os import yaml +import argparse + +parser = argparse.ArgumentParser() + +#-db DATABASE -u USERNAME -p PASSWORD -size 20000 +parser.add_argument("-v", "--version", dest = "version", help="Source-Registry Version") merged_config = {} +merged_config["version"] = args.version + # Iterate through all config.yml files for root, dirs, files in os.walk("."): for file in files: