bitwarden_workflow_linter 0.12.5__py3-none-any.whl → 0.12.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  """Metadata for Workflow Linter."""
2
2
 
3
- __version__ = "0.12.5"
3
+ __version__ = "0.12.6"
@@ -5,6 +5,7 @@ import subprocess
5
5
  import platform
6
6
  import urllib.request
7
7
  import os
8
+ import json
8
9
 
9
10
  from ..rule import Rule
10
11
  from ..models.workflow import Workflow
@@ -33,11 +34,21 @@ def install_actionlint(platform_system: str) -> Tuple[bool, str]:
33
34
  return False, f"{error} : check Choco installation"
34
35
  return False, error
35
36
 
37
+ def load_config() -> dict:
38
+ """Load configuration from a JSON file."""
39
+ config_path = os.path.join(os.path.dirname(__file__), "../../../actionlint_version.json")
40
+ if not os.path.exists(config_path):
41
+ raise FileNotFoundError(f"Configuration file not found: {config_path}")
42
+ with open(config_path, "r") as config_file:
43
+ return json.load(config_file)
36
44
 
37
45
  def install_actionlint_source(error) -> Tuple[bool, str]:
46
+ config = load_config()
47
+ if "actionlint_version" not in config:
48
+ raise KeyError("The 'actionlint_version' is missing in the configuration file.")
49
+ version = config["actionlint_version"]
38
50
  """Install Actionlint Binary from provided script"""
39
51
  url = "https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash"
40
- version = "1.6.17"
41
52
  request = urllib.request.urlopen(url)
42
53
  with open("download-actionlint.bash", "wb+") as fp:
43
54
  fp.write(request.read())
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: bitwarden_workflow_linter
3
- Version: 0.12.5
3
+ Version: 0.12.6
4
4
  Summary: Custom GitHub Action Workflow Linter
5
5
  Project-URL: Homepage, https://github.com/bitwarden/workflow-linter
6
6
  Project-URL: Issues, https://github.com/bitwarden/workflow-linter/issues
@@ -1,4 +1,4 @@
1
- bitwarden_workflow_linter/__about__.py,sha256=ilV97XLDzxNIdczLqZ7SPAbYjX4OUEqeCShWQ0V3qL8,60
1
+ bitwarden_workflow_linter/__about__.py,sha256=BxcrqhOy0HKwhetcR3PMDZh4kb2nOMDGFvtcn9wMX_4,60
2
2
  bitwarden_workflow_linter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  bitwarden_workflow_linter/actions.py,sha256=LAn3yQeMMmCOvJWeTn3dE1U2nyEJqIBMwESq3TtY9hE,9069
4
4
  bitwarden_workflow_linter/cli.py,sha256=wgkK1MlVbo6Zx3f2CZZ_tkSWq_hdsGciHJA1knX6Yuw,1699
@@ -19,12 +19,12 @@ bitwarden_workflow_linter/rules/name_capitalized.py,sha256=lGHPi_Ix0DVSzGEdrUm2v
19
19
  bitwarden_workflow_linter/rules/name_exists.py,sha256=kdMIURN3u8qdDvw6YKxg7VF5bkzGxVVXAO3KAqY1-54,1826
20
20
  bitwarden_workflow_linter/rules/permissions_exist.py,sha256=_qOonJ0tyIH3Wp0e-0cppyVIbY9Sr7DuZPZdwxjYMaI,1432
21
21
  bitwarden_workflow_linter/rules/pinned_job_runner.py,sha256=VPQfMu3SgIFdl-B8wOXzzK6tMx2hWWSJbKL5KG3xcaI,1751
22
- bitwarden_workflow_linter/rules/run_actionlint.py,sha256=K-RLQRXs591Ud_kiNQHhIJf5mU59HtnR2qrhW-HamlQ,3806
22
+ bitwarden_workflow_linter/rules/run_actionlint.py,sha256=W3SzlV0fv2lIZhMHPgea2AInsNMJo_nDZ7wCtbckrcY,4371
23
23
  bitwarden_workflow_linter/rules/step_approved.py,sha256=4pUCrOlWomo43bwGBunORphv1RJzc3spRKgZ4VLtDS0,3304
24
24
  bitwarden_workflow_linter/rules/step_pinned.py,sha256=MagV8LNdgRKyncmSdH9V-TlIcsdjzoDHDWqovzWon9E,3559
25
25
  bitwarden_workflow_linter/rules/underscore_outputs.py,sha256=LoCsDN_EfQ8H9n5BfZ5xCe7BeHqJGPMcV0vo1c9YJcw,4275
26
- bitwarden_workflow_linter-0.12.5.dist-info/METADATA,sha256=bN2yzhCJIDZUikEnDaHdNvhPG4Sb-mFh0XAU-_4d4yk,9797
27
- bitwarden_workflow_linter-0.12.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
28
- bitwarden_workflow_linter-0.12.5.dist-info/entry_points.txt,sha256=SA_yF9CwL4VMUvdcmCd7k9rjsQNzfeOUBuDnMnaO8QQ,60
29
- bitwarden_workflow_linter-0.12.5.dist-info/licenses/LICENSE.txt,sha256=uY-7N9tbI7xc_c0WeTIGpacSCnsB91N05eCIg3bkaRw,35140
30
- bitwarden_workflow_linter-0.12.5.dist-info/RECORD,,
26
+ bitwarden_workflow_linter-0.12.6.dist-info/METADATA,sha256=P2INLuibbnX9wfma161HDkcd8D8n_4LKXbAJ7n9CYv4,9797
27
+ bitwarden_workflow_linter-0.12.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
28
+ bitwarden_workflow_linter-0.12.6.dist-info/entry_points.txt,sha256=SA_yF9CwL4VMUvdcmCd7k9rjsQNzfeOUBuDnMnaO8QQ,60
29
+ bitwarden_workflow_linter-0.12.6.dist-info/licenses/LICENSE.txt,sha256=uY-7N9tbI7xc_c0WeTIGpacSCnsB91N05eCIg3bkaRw,35140
30
+ bitwarden_workflow_linter-0.12.6.dist-info/RECORD,,