From d18e904b3b37cf6b2f960a5a5a1dd8bd4c48af9a Mon Sep 17 00:00:00 2001 From: Benjamin Schimke Date: Tue, 12 Sep 2023 12:10:42 +0200 Subject: [PATCH] Make logdump action output path configurable 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 #95 --- actions/dump-charm-debug-artifacts/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/actions/dump-charm-debug-artifacts/action.yml b/actions/dump-charm-debug-artifacts/action.yml index 0ab0b44..3f0ae0d 100644 --- a/actions/dump-charm-debug-artifacts/action.yml +++ b/actions/dump-charm-debug-artifacts/action.yml @@ -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