Skip to content

Commit

Permalink
Make logdump action output path configurable
Browse files Browse the repository at this point in the history
Currently, the logdump action output path is hard-coded. Running this
action twice in the same CI causes these actions to overwrite each
others logs.

With this commit, the path can now be configured by setting the
`$LOGDUMP_OUTPUT_DIR` env variable in a workflow. If it is not set
the path will fall-back to `tmp_logs_$GITHUB_JOB` with $GITHUB_JOB being
the unique id of the current running job.

Closes canonical#95
  • Loading branch information
bschimke95 committed Sep 12, 2023
1 parent b718dfa commit d18e904
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actions/dump-charm-debug-artifacts/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ runs:
id: mkdir
shell: bash
run: |
LOG_DIR="tmp_logs"
LOG_DIR="${${{ env.LOGDUMP_OUTPUT_DIR }}:-tmp_logs_$GITHUB_JOB}"
echo "log-dir=$(echo $LOG_DIR)" >> $GITHUB_OUTPUT
mkdir $LOG_DIR
Expand Down

0 comments on commit d18e904

Please sign in to comment.