Skip to content

Commit

Permalink
Provide the proper env for the script #6
Browse files Browse the repository at this point in the history
Signed-off-by: tdruez <[email protected]>
  • Loading branch information
tdruez committed Apr 25, 2024
1 parent 9bd551f commit bf64f78
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/push-to-dejacode.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
shell: bash
run: |
python ${{ github.workspace }}/scripts/push_to_dejacode.py
echo ${{ env.PROJECT_OUTPUT_DIRECTORY }}
env:
DEJACODE_URL: ${{ secrets.DEJACODE_URL }}
DEJACODE_API_KEY: ${{ secrets.DEJACODE_API_KEY }}
Expand Down
3 changes: 3 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ runs:
--format ${{ inputs.output-formats }}
project_outputs=$(ls ${{ env.PROJECT_OUTPUT_DIRECTORY }}))
echo "PROJECT_OUTPUTS=$project_outputs" >> $GITHUB_ENV
echo "DEBUG"
echo ${{ env.PROJECT_OUTPUT_DIRECTORY }}
echo ${{ env.PROJECT_OUTPUTS }}
- name: Upload outputs
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion scripts/push_to_dejacode.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ def request_post(url, **kwargs):

def create_product(product_data):
response = request_post(PRODUCTS_API_URL, data=product_data)
print(response)
return response["uuid"]


Expand All @@ -75,6 +74,7 @@ def push_scan_to_product(files):

# Replace by args
PROJECT_OUTPUT_DIRECTORY = os.environ["PROJECT_OUTPUT_DIRECTORY"]
print(PROJECT_OUTPUT_DIRECTORY)
scan_location = list(Path(PROJECT_OUTPUT_DIRECTORY).glob("*.json"))[0]
print(scan_location)

Expand Down

0 comments on commit bf64f78

Please sign in to comment.