Skip to content

Commit 04c30bf

Browse files
Copilotderekmisler
andcommitted
Fix verbose log artifact name conflicts when action runs multiple times
Co-authored-by: derekmisler <2684662+derekmisler@users.noreply.github.com>
1 parent f4f4da1 commit 04c30bf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,8 @@ runs:
476476
fi
477477
echo "verbose-log-file=$VERBOSE_LOG_FILE" >> $GITHUB_OUTPUT
478478
echo "Verbose log file: $VERBOSE_LOG_FILE"
479+
VERBOSE_LOG_BASENAME=$(basename "$VERBOSE_LOG_FILE")
480+
echo "verbose-log-artifact-name=cagent-verbose-log-${GITHUB_RUN_ID}-${GITHUB_RUN_ATTEMPT}-${GITHUB_JOB}-${VERBOSE_LOG_BASENAME}" >> $GITHUB_OUTPUT
479481
480482
# Build command arguments array (SECURE: no eval!)
481483
ARGS=("run" "--exec")
@@ -701,7 +703,7 @@ runs:
701703
if: always() && steps.run-agent.outputs.verbose-log-file != ''
702704
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
703705
with:
704-
name: cagent-verbose-log-${{ github.run_id }}-${{ github.run_attempt }}-${{ github.job }}
706+
name: ${{ steps.run-agent.outputs.verbose-log-artifact-name }}
705707
path: ${{ steps.run-agent.outputs.verbose-log-file }}
706708
retention-days: 14
707709
if-no-files-found: ignore

0 commit comments

Comments
 (0)