From d2fbfeaecbd8248b961cde70d513bcef39dbb26f Mon Sep 17 00:00:00 2001 From: StuartFerguson Date: Thu, 30 Jul 2026 15:11:34 +0100 Subject: [PATCH] Fix scheduled task artifact root handling --- .github/workflows/createrelease.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/createrelease.yml b/.github/workflows/createrelease.yml index bdcfe32..4d67db8 100644 --- a/.github/workflows/createrelease.yml +++ b/.github/workflows/createrelease.yml @@ -81,6 +81,7 @@ jobs: uses: actions/download-artifact@v4.1.8 with: name: scheduledtasks + path: ${{ runner.temp }}\scheduledtasks - name: Install scheduled tasks shell: powershell @@ -89,7 +90,12 @@ jobs: SCHEDULED_TASK_PASSWORD: ${{ secrets.SCHEDULED_TASK_PASSWORD }} run: | $taskScriptDir = 'C:\txnproc\transactionprocessing\powershell' - $scheduledTasksRoot = Join-Path $env:GITHUB_WORKSPACE 'ScheduledTasks' + $scheduledTasksDownloadRoot = Join-Path $env:RUNNER_TEMP 'scheduledtasks' + $scheduledTasksRoot = Join-Path $scheduledTasksDownloadRoot 'ScheduledTasks' + + if (-not (Test-Path $scheduledTasksRoot)) { + $scheduledTasksRoot = $scheduledTasksDownloadRoot + } New-Item -ItemType Directory -Path $taskScriptDir -Force | Out-Null @@ -185,6 +191,7 @@ jobs: uses: actions/download-artifact@v4.1.8 with: name: scheduledtasks + path: ${{ runner.temp }}\scheduledtasks - name: Install scheduled tasks shell: powershell @@ -193,7 +200,12 @@ jobs: SCHEDULED_TASK_PASSWORD: ${{ secrets.SCHEDULED_TASK_PASSWORD }} run: | $taskScriptDir = 'C:\txnproc\transactionprocessing\powershell' - $scheduledTasksRoot = Join-Path $env:GITHUB_WORKSPACE 'ScheduledTasks' + $scheduledTasksDownloadRoot = Join-Path $env:RUNNER_TEMP 'scheduledtasks' + $scheduledTasksRoot = Join-Path $scheduledTasksDownloadRoot 'ScheduledTasks' + + if (-not (Test-Path $scheduledTasksRoot)) { + $scheduledTasksRoot = $scheduledTasksDownloadRoot + } New-Item -ItemType Directory -Path $taskScriptDir -Force | Out-Null