From 3e5aa3f47be0428ba539d3f6b50c626c8583f6be Mon Sep 17 00:00:00 2001 From: Jonathan Tran Date: Mon, 8 Apr 2024 18:09:59 -0400 Subject: [PATCH 1/5] fix: Fix pip not found error during docker build --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2ce6641..f246e9c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ -FROM ubuntu:latest +FROM python:3.12-bookworm COPY entrypoint.py /entrypoint.py RUN pip install py-allspice -ENTRYPOINT [ "/entrypoint.py" ] \ No newline at end of file +ENTRYPOINT [ "/entrypoint.py" ] -- 2.45.2 From 5a5a4acfaaca2ec2c5c796a8fb8bde9e8636f908 Mon Sep 17 00:00:00 2001 From: Jonathan Tran Date: Mon, 8 Apr 2024 18:50:50 -0400 Subject: [PATCH 2/5] fix: Fix entrypoint.py to be executable --- entrypoint.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 entrypoint.py diff --git a/entrypoint.py b/entrypoint.py old mode 100644 new mode 100755 -- 2.45.2 From 11209ac7dc6d74ab8f6419572d8d17d7496195b3 Mon Sep 17 00:00:00 2001 From: Jonathan Tran Date: Mon, 8 Apr 2024 19:06:07 -0400 Subject: [PATCH 3/5] fix: Fix parameter name to be consistent --- action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 15727e2..f844eb4 100644 --- a/action.yml +++ b/action.yml @@ -7,7 +7,7 @@ inputs: project_path: description: "Path to the project file from the root of the repo" required: true - pcb_file_path: + pcb_path: description: "Path to the PCB file from the root of the repo" required: true output_file_name: @@ -23,7 +23,7 @@ runs: args: - ${{ github.repository }} - ${{ inputs.project_path }} - - ${{ inputs.pcb_file_path }} + - ${{ inputs.pcb_path }} - "--source_ref" - ${{ github.sha }} - "--allspice_hub_url" -- 2.45.2 From d9421be29ea65658bf8ad4c682c56a6d3f7c2d11 Mon Sep 17 00:00:00 2001 From: Jonathan Tran Date: Mon, 8 Apr 2024 19:06:32 -0400 Subject: [PATCH 4/5] fix: Move positional arguments to the correct position --- action.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/action.yml b/action.yml index f844eb4..509c955 100644 --- a/action.yml +++ b/action.yml @@ -21,9 +21,6 @@ runs: using: "docker" image: "Dockerfile" args: - - ${{ github.repository }} - - ${{ inputs.project_path }} - - ${{ inputs.pcb_path }} - "--source_ref" - ${{ github.sha }} - "--allspice_hub_url" @@ -32,3 +29,6 @@ runs: - ${{ inputs.attributes_mapping }} - "--output_file" - ${{ inputs.output_file_name }} + - ${{ github.repository }} + - ${{ inputs.project_path }} + - ${{ inputs.pcb_path }} -- 2.45.2 From 7cb7e3271ecedb62feffab6f96c55c37aeab763a Mon Sep 17 00:00:00 2001 From: Jonathan Tran Date: Mon, 8 Apr 2024 19:21:06 -0400 Subject: [PATCH 5/5] fix: Add auth token --- action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/action.yml b/action.yml index 509c955..70a569b 100644 --- a/action.yml +++ b/action.yml @@ -17,6 +17,8 @@ inputs: attributes_mapping: description: "JSON string with the mapping of the attributes to the AllSpice attributes" required: true + auth_token: + description: "AllSpice Hub authentication token" runs: using: "docker" image: "Dockerfile" @@ -32,3 +34,5 @@ runs: - ${{ github.repository }} - ${{ inputs.project_path }} - ${{ inputs.pcb_path }} + env: + ALLSPICE_AUTH_TOKEN: ${{ inputs.auth_token }} -- 2.45.2