Skip to content

Commit

Permalink
use Paths
Browse files Browse the repository at this point in the history
  • Loading branch information
mucsi96 committed Mar 17, 2024
1 parent e4f516a commit ab23a3b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion scripts/build_test_docker_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
secrets = load_vars(sys.argv[2], root_directory / 'vars/vault.yaml')

build_and_push_docker_img(
src="src",
src=root_directory / 'src',
tag_prefix="docker-image",
image_name="publish-tools-test",
docker_username=environ.get('GITHUB_REPOSITORY_OWNER'),
Expand Down
4 changes: 3 additions & 1 deletion scripts/pack_test_pages.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#!/usr/bin/env python3

from pathlib import Path
import init
from src.github_utils import create_pages_artifact

root_directory = Path(__file__).parent.parent

create_pages_artifact(directory="test")
create_pages_artifact(directory=root_directory / 'test')
2 changes: 1 addition & 1 deletion scripts/publish_test_npm_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
secrets = load_vars(sys.argv[2], root_directory / 'vars/vault.yaml')

publish_npm_package(
src="src",
src=root_directory / 'src',
tag_prefix="npm-package",
npm_access_token=secrets['npm_access_token'],
github_access_token=sys.argv[1]
Expand Down
3 changes: 2 additions & 1 deletion src/github_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
from pathlib import Path
from random import choice
from string import ascii_letters, digits
import sys
Expand Down Expand Up @@ -97,7 +98,7 @@ def upload_release_asset(

def create_pages_artifact(
*,
directory: str
directory: Path
):
random_string = ''.join(choice(ascii_letters + digits) for _ in range(8))
tar_file = f"{environ.get("RUNNER_TEMP")}/{random_string}.tar"
Expand Down

0 comments on commit ab23a3b

Please sign in to comment.