Skip to content

Commit

Permalink
Take 3
Browse files Browse the repository at this point in the history
  • Loading branch information
reneme committed Nov 1, 2024
1 parent 08be70a commit e9c547a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 1 addition & 3 deletions .github/actions/read-repo-config/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
name: Read Repository Configuration
description: Reads the repository configuration file and makes it available as environment variables

env:
READ_CONFIG_SCRIPT: ${{ github.action_path }}/../../../src/scripts/read_repo_config.py

runs:
using: composite
steps:
- name: Read Repository Configuration into Environment Variables
run: ${{ env.READ_CONFIG_SCRIPT }} all >> $GITHUB_ENV
run: ${{ github.action_path }}/../../../src/scripts/repo_config.py all >> $GITHUB_ENV
shell: python
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
_DEFAULT_REPO_CONFIG_LOCATION = os.path.realpath(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', 'configs', 'repo_config.env'))

class RepoConfig(dict):
""" Reads the repository's configuration file and provides access to its variables. """

def __init__(self, env_file: str = _DEFAULT_REPO_CONFIG_LOCATION):
self._file_path = env_file
parser = re.compile(r'^(?P<var>\w+)\s*=\s*((?P<val>[^\"]\S+)|\"(?P<quoted_val>\S+)\")\s*$')
Expand Down

0 comments on commit e9c547a

Please sign in to comment.