From 8acdc25717c05cdad95007852877a99d081ea24d Mon Sep 17 00:00:00 2001 From: BSd3v <82055130+BSd3v@users.noreply.github.com> Date: Thu, 10 Oct 2024 10:28:56 -0400 Subject: [PATCH 1/2] adjustments for GHA flow --- .github/workflows/host-test.yml | 3 +++ tmp_deploy.py | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/host-test.yml b/.github/workflows/host-test.yml index e932097..a554db3 100644 --- a/.github/workflows/host-test.yml +++ b/.github/workflows/host-test.yml @@ -79,6 +79,9 @@ jobs: GITHUB_REPOSITORY: ${{ github.repository }} PR_NUMBER: ${{ github.event.inputs.pr_number }} ARTIFACT_URL: ${{ env.artifact_url }} + ARTIFACT_ID: ${{ env.artifact_id }} + GITHUB_OWNER: snehilvj + FILE_FULLNAME: dash_mantine_components-${{ env.version }}.tar.gz run: | source .venv/bin/activate python tmp_deploy.py diff --git a/tmp_deploy.py b/tmp_deploy.py index 988d725..6ecc845 100644 --- a/tmp_deploy.py +++ b/tmp_deploy.py @@ -42,11 +42,11 @@ latest_time = modified_time latest_tar_gz = file_path -reqs['content'] += f'\n{os.getenv("ARTIFACT_URL")}' -files.append(reqs) +reqs['content'] += f'\n{os.getenv("PACKAGE_NAME")} @ https://py.cafe/gh/artifact/{os.getenv("GITHUB_OWNER")}/{os.getenv("GITHUB_REPOSITORY")}/{os.getenv("ARTIFACT_ID")}/{os.getenv("FILE_FULLNAME")}' def generate_link(files, code): json_object = { + "requirements": reqs['content'], "code": code, "files": files, } @@ -85,4 +85,4 @@ def post_comment(link): print("Comment added to the pull request.") # Call the function to post the comment -post_comment(link) +post_comment(link) \ No newline at end of file From 80b8ffbb5da72fa05d1e939ac3c27e134ee2140a Mon Sep 17 00:00:00 2001 From: BSd3v <82055130+BSd3v@users.noreply.github.com> Date: Thu, 10 Oct 2024 10:35:00 -0400 Subject: [PATCH 2/2] adding missing env variable --- .github/workflows/host-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/host-test.yml b/.github/workflows/host-test.yml index a554db3..f314a4b 100644 --- a/.github/workflows/host-test.yml +++ b/.github/workflows/host-test.yml @@ -82,6 +82,7 @@ jobs: ARTIFACT_ID: ${{ env.artifact_id }} GITHUB_OWNER: snehilvj FILE_FULLNAME: dash_mantine_components-${{ env.version }}.tar.gz + PACKAGE_NAME: dash_mantine_components run: | source .venv/bin/activate python tmp_deploy.py