Skip to content

Commit

Permalink
Try to add a workaround for archiving sample output in parent dir
Browse files Browse the repository at this point in the history
- The upload-artifact action supposedly supports relative paths, but
  it threw an error when relative paths were used. There also seems to
  be a few open bugs reported on GitHub, here's one: actions/upload-artifact#176.

- Since some of the samples dump their output in the parent directory, let's
  try a workaround to see if we can archive them in the workflow run.
  • Loading branch information
datalogics-saharay committed Mar 13, 2024
1 parent 3faa40a commit c4c3950
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/test-dotnet-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,11 @@ jobs:
run: |
sample_name=$(basename "$PWD")
echo "SAMPLE_NAME=$sample_name" >> "$GITHUB_ENV"
echo "Set $sample_name as SAMPLE_NAME environment variable"
sample_parent_dir_path=$(realpath ..)
echo "SAMPLE_PARENT_DIR_PATH=$sample_parent_dir_path" >> "$GITHUB_ENV"
echo "Set $sample_parent_dir_path as SAMPLE_PARENT_DIR_PATH environment variable"
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
Expand All @@ -183,7 +188,7 @@ jobs:
${{matrix.dir}}*.gif
${{matrix.dir}}*.json
${{matrix.dir}}*.txt
${{matrix.dir}}../*.pdf
${{matrix.dir}}../*.json
${{matrix.dir}}../*.txt
${{matrix.dir}}../*.csv
${{env.SAMPLE_PARENT_DIR_PATH}}*.pdf
${{env.SAMPLE_PARENT_DIR_PATH}}*.json
${{env.SAMPLE_PARENT_DIR_PATH}}*.txt
${{env.SAMPLE_PARENT_DIR_PATH}}*.csv

0 comments on commit c4c3950

Please sign in to comment.