diff --git a/.github/workflows/audit-workflows.lock.yml b/.github/workflows/audit-workflows.lock.yml index 93fdc21e07..7bd0e7a80d 100644 --- a/.github/workflows/audit-workflows.lock.yml +++ b/.github/workflows/audit-workflows.lock.yml @@ -1052,11 +1052,6 @@ jobs: trending-data-${{ github.workflow }}- trending-data- trending- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -5918,6 +5913,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Upload safe outputs assets if: always() uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 diff --git a/.github/workflows/ci-doctor.lock.yml b/.github/workflows/ci-doctor.lock.yml index 7964e67205..c5e1ea7827 100644 --- a/.github/workflows/ci-doctor.lock.yml +++ b/.github/workflows/ci-doctor.lock.yml @@ -1038,11 +1038,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -5865,6 +5860,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/cli-version-checker.lock.yml b/.github/workflows/cli-version-checker.lock.yml index 44b1dbe846..c64a468e86 100644 --- a/.github/workflows/cli-version-checker.lock.yml +++ b/.github/workflows/cli-version-checker.lock.yml @@ -561,11 +561,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -4929,6 +4924,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/cloclo.lock.yml b/.github/workflows/cloclo.lock.yml index 99de4ca255..ca384d6df4 100644 --- a/.github/workflows/cloclo.lock.yml +++ b/.github/workflows/cloclo.lock.yml @@ -1935,11 +1935,6 @@ jobs: cloclo-memory-${{ github.workflow }}- cloclo-memory- cloclo- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6396,6 +6391,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/close-old-discussions.lock.yml b/.github/workflows/close-old-discussions.lock.yml index a56895164d..5fa6a8e5f6 100644 --- a/.github/workflows/close-old-discussions.lock.yml +++ b/.github/workflows/close-old-discussions.lock.yml @@ -580,11 +580,6 @@ jobs: restore-keys: | discussions-data- discussions- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -4770,6 +4765,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/copilot-agent-analysis.lock.yml b/.github/workflows/copilot-agent-analysis.lock.yml index c0008a01d1..1fda4af9fc 100644 --- a/.github/workflows/copilot-agent-analysis.lock.yml +++ b/.github/workflows/copilot-agent-analysis.lock.yml @@ -890,11 +890,6 @@ jobs: copilot-pr-data- copilot-pr- copilot- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -5605,6 +5600,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/copilot-pr-nlp-analysis.lock.yml b/.github/workflows/copilot-pr-nlp-analysis.lock.yml index c620951e85..5891f1fa9e 100644 --- a/.github/workflows/copilot-pr-nlp-analysis.lock.yml +++ b/.github/workflows/copilot-pr-nlp-analysis.lock.yml @@ -1180,11 +1180,6 @@ jobs: copilot-pr-data- copilot-pr- copilot- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6707,6 +6702,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Upload safe outputs assets if: always() uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 diff --git a/.github/workflows/copilot-pr-prompt-analysis.lock.yml b/.github/workflows/copilot-pr-prompt-analysis.lock.yml index dba48b40a0..31e9d3afbf 100644 --- a/.github/workflows/copilot-pr-prompt-analysis.lock.yml +++ b/.github/workflows/copilot-pr-prompt-analysis.lock.yml @@ -706,11 +706,6 @@ jobs: copilot-pr-data- copilot-pr- copilot- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -5729,6 +5724,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/copilot-session-insights.lock.yml b/.github/workflows/copilot-session-insights.lock.yml index 472092b661..fda599cabd 100644 --- a/.github/workflows/copilot-session-insights.lock.yml +++ b/.github/workflows/copilot-session-insights.lock.yml @@ -1594,11 +1594,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -7015,6 +7010,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Upload safe outputs assets if: always() uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 diff --git a/.github/workflows/daily-code-metrics.lock.yml b/.github/workflows/daily-code-metrics.lock.yml index 506a5ecffc..d390b22002 100644 --- a/.github/workflows/daily-code-metrics.lock.yml +++ b/.github/workflows/daily-code-metrics.lock.yml @@ -1122,11 +1122,6 @@ jobs: trending-data-${{ github.workflow }}- trending-data- trending- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6056,6 +6051,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/daily-copilot-token-report.lock.yml b/.github/workflows/daily-copilot-token-report.lock.yml index de7947700b..1dd334ae9e 100644 --- a/.github/workflows/daily-copilot-token-report.lock.yml +++ b/.github/workflows/daily-copilot-token-report.lock.yml @@ -1248,11 +1248,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6872,6 +6867,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Upload safe outputs assets if: always() uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 diff --git a/.github/workflows/daily-doc-updater.lock.yml b/.github/workflows/daily-doc-updater.lock.yml index bc3d277f5a..de41551b80 100644 --- a/.github/workflows/daily-doc-updater.lock.yml +++ b/.github/workflows/daily-doc-updater.lock.yml @@ -424,11 +424,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -4652,6 +4647,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/daily-firewall-report.lock.yml b/.github/workflows/daily-firewall-report.lock.yml index 6db91fba91..9016aabe15 100644 --- a/.github/workflows/daily-firewall-report.lock.yml +++ b/.github/workflows/daily-firewall-report.lock.yml @@ -920,11 +920,6 @@ jobs: trending-data-${{ github.workflow }}- trending-data- trending- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory # Repo memory git-based storage configuration from frontmatter processed below - name: Clone repo-memory branch (default) env: @@ -6163,6 +6158,12 @@ jobs: path: /tmp/gh-aw/repo-memory-default retention-days: 1 if-no-files-found: ignore + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Upload safe outputs assets if: always() uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 diff --git a/.github/workflows/daily-issues-report.lock.yml b/.github/workflows/daily-issues-report.lock.yml index 17886667cb..a4f15a6645 100644 --- a/.github/workflows/daily-issues-report.lock.yml +++ b/.github/workflows/daily-issues-report.lock.yml @@ -1293,11 +1293,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6502,6 +6497,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Upload safe outputs assets if: always() uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 diff --git a/.github/workflows/daily-news.lock.yml b/.github/workflows/daily-news.lock.yml index b12181987d..513fb89955 100644 --- a/.github/workflows/daily-news.lock.yml +++ b/.github/workflows/daily-news.lock.yml @@ -1266,11 +1266,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6631,6 +6626,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Upload safe outputs assets if: always() uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 diff --git a/.github/workflows/daily-performance-summary.lock.yml b/.github/workflows/daily-performance-summary.lock.yml index c444aeafe8..bb4015984a 100644 --- a/.github/workflows/daily-performance-summary.lock.yml +++ b/.github/workflows/daily-performance-summary.lock.yml @@ -1055,11 +1055,6 @@ jobs: trending-data-${{ github.workflow }}- trending-data- trending- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -7709,6 +7704,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Upload safe outputs assets if: always() uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 diff --git a/.github/workflows/daily-repo-chronicle.lock.yml b/.github/workflows/daily-repo-chronicle.lock.yml index 558c6abbce..347e7c3098 100644 --- a/.github/workflows/daily-repo-chronicle.lock.yml +++ b/.github/workflows/daily-repo-chronicle.lock.yml @@ -952,11 +952,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6305,6 +6300,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Upload safe outputs assets if: always() uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 diff --git a/.github/workflows/deep-report.lock.yml b/.github/workflows/deep-report.lock.yml index 1d05a2be95..25682053a7 100644 --- a/.github/workflows/deep-report.lock.yml +++ b/.github/workflows/deep-report.lock.yml @@ -803,11 +803,6 @@ jobs: weekly-issues-data- weekly-issues- weekly- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory # Repo memory git-based storage configuration from frontmatter processed below - name: Clone repo-memory branch (default) env: @@ -5390,6 +5385,12 @@ jobs: path: /tmp/gh-aw/repo-memory-default retention-days: 1 if-no-files-found: ignore + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Upload safe outputs assets if: always() uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 diff --git a/.github/workflows/developer-docs-consolidator.lock.yml b/.github/workflows/developer-docs-consolidator.lock.yml index 21a3c17aff..50378a656d 100644 --- a/.github/workflows/developer-docs-consolidator.lock.yml +++ b/.github/workflows/developer-docs-consolidator.lock.yml @@ -948,11 +948,6 @@ jobs: developer-docs-cache- developer-docs- developer- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -5807,6 +5802,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/firewall-escape.lock.yml b/.github/workflows/firewall-escape.lock.yml index 52191bc575..da8764ed7d 100644 --- a/.github/workflows/firewall-escape.lock.yml +++ b/.github/workflows/firewall-escape.lock.yml @@ -431,11 +431,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} diff --git a/.github/workflows/github-mcp-structural-analysis.lock.yml b/.github/workflows/github-mcp-structural-analysis.lock.yml index df0781bb8c..17f7c94513 100644 --- a/.github/workflows/github-mcp-structural-analysis.lock.yml +++ b/.github/workflows/github-mcp-structural-analysis.lock.yml @@ -951,11 +951,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -5734,6 +5729,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Upload safe outputs assets if: always() uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 diff --git a/.github/workflows/github-mcp-tools-report.lock.yml b/.github/workflows/github-mcp-tools-report.lock.yml index f0da6f97e9..2c3c898e95 100644 --- a/.github/workflows/github-mcp-tools-report.lock.yml +++ b/.github/workflows/github-mcp-tools-report.lock.yml @@ -803,11 +803,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -5510,6 +5505,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/glossary-maintainer.lock.yml b/.github/workflows/glossary-maintainer.lock.yml index 05e91528f6..c66c6eb876 100644 --- a/.github/workflows/glossary-maintainer.lock.yml +++ b/.github/workflows/glossary-maintainer.lock.yml @@ -891,11 +891,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6198,6 +6193,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/go-fan.lock.yml b/.github/workflows/go-fan.lock.yml index f3c3b73d5d..0b0c2e0548 100644 --- a/.github/workflows/go-fan.lock.yml +++ b/.github/workflows/go-fan.lock.yml @@ -636,11 +636,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -5051,6 +5046,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/go-logger.lock.yml b/.github/workflows/go-logger.lock.yml index da083c2fe6..9935cf74e6 100644 --- a/.github/workflows/go-logger.lock.yml +++ b/.github/workflows/go-logger.lock.yml @@ -552,11 +552,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -4816,6 +4811,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/grumpy-reviewer.lock.yml b/.github/workflows/grumpy-reviewer.lock.yml index 77baa1fa58..78897323de 100644 --- a/.github/workflows/grumpy-reviewer.lock.yml +++ b/.github/workflows/grumpy-reviewer.lock.yml @@ -1736,11 +1736,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6528,6 +6523,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/instructions-janitor.lock.yml b/.github/workflows/instructions-janitor.lock.yml index 108dcced98..aa7e65e05a 100644 --- a/.github/workflows/instructions-janitor.lock.yml +++ b/.github/workflows/instructions-janitor.lock.yml @@ -421,11 +421,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -4581,6 +4576,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/lockfile-stats.lock.yml b/.github/workflows/lockfile-stats.lock.yml index 70077cde25..18bddc3463 100644 --- a/.github/workflows/lockfile-stats.lock.yml +++ b/.github/workflows/lockfile-stats.lock.yml @@ -656,11 +656,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -5093,6 +5088,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/mcp-inspector.lock.yml b/.github/workflows/mcp-inspector.lock.yml index e40bb58ee6..f2ea4c652c 100644 --- a/.github/workflows/mcp-inspector.lock.yml +++ b/.github/workflows/mcp-inspector.lock.yml @@ -591,11 +591,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -5708,6 +5703,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/org-health-report.lock.yml b/.github/workflows/org-health-report.lock.yml index be2a04f7ac..d17f509e3c 100644 --- a/.github/workflows/org-health-report.lock.yml +++ b/.github/workflows/org-health-report.lock.yml @@ -1160,11 +1160,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6569,6 +6564,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Upload safe outputs assets if: always() uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 diff --git a/.github/workflows/pdf-summary.lock.yml b/.github/workflows/pdf-summary.lock.yml index 63c1ad7844..370c18df62 100644 --- a/.github/workflows/pdf-summary.lock.yml +++ b/.github/workflows/pdf-summary.lock.yml @@ -1796,11 +1796,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6553,6 +6548,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/poem-bot.lock.yml b/.github/workflows/poem-bot.lock.yml index 1c0da1a1fe..73e98b05d4 100644 --- a/.github/workflows/poem-bot.lock.yml +++ b/.github/workflows/poem-bot.lock.yml @@ -2397,12 +2397,6 @@ jobs: poem-memory-${{ github.workflow }}- poem-memory- poem- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - retention-days: 30 - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -7606,6 +7600,13 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory + retention-days: 30 - name: Upload safe outputs assets if: always() uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 diff --git a/.github/workflows/pr-nitpick-reviewer.lock.yml b/.github/workflows/pr-nitpick-reviewer.lock.yml index 272f0080a1..ff2e5ec6be 100644 --- a/.github/workflows/pr-nitpick-reviewer.lock.yml +++ b/.github/workflows/pr-nitpick-reviewer.lock.yml @@ -1720,11 +1720,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6873,6 +6868,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/prompt-clustering-analysis.lock.yml b/.github/workflows/prompt-clustering-analysis.lock.yml index 1c9a54f503..58c87bc81e 100644 --- a/.github/workflows/prompt-clustering-analysis.lock.yml +++ b/.github/workflows/prompt-clustering-analysis.lock.yml @@ -1342,11 +1342,6 @@ jobs: trending-data-${{ github.workflow }}- trending-data- trending- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6369,6 +6364,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/python-data-charts.lock.yml b/.github/workflows/python-data-charts.lock.yml index 63d736f802..7242e09091 100644 --- a/.github/workflows/python-data-charts.lock.yml +++ b/.github/workflows/python-data-charts.lock.yml @@ -1246,11 +1246,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6937,6 +6932,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Upload safe outputs assets if: always() uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 diff --git a/.github/workflows/q.lock.yml b/.github/workflows/q.lock.yml index 616908cc13..5d2289b5fb 100644 --- a/.github/workflows/q.lock.yml +++ b/.github/workflows/q.lock.yml @@ -2052,11 +2052,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -7135,6 +7130,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/repository-quality-improver.lock.yml b/.github/workflows/repository-quality-improver.lock.yml index 46346ecd6c..4f2315742a 100644 --- a/.github/workflows/repository-quality-improver.lock.yml +++ b/.github/workflows/repository-quality-improver.lock.yml @@ -876,11 +876,6 @@ jobs: quality-focus-${{ github.workflow }}- quality-focus- quality- - - name: Upload cache-memory data as artifact (focus-areas) - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory-focus-areas - path: /tmp/gh-aw/cache-memory-focus-areas - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6151,6 +6146,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact (focus-areas) + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory-focus-areas + path: /tmp/gh-aw/cache-memory-focus-areas - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/safe-output-health.lock.yml b/.github/workflows/safe-output-health.lock.yml index b7e9185399..1b55522698 100644 --- a/.github/workflows/safe-output-health.lock.yml +++ b/.github/workflows/safe-output-health.lock.yml @@ -781,11 +781,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -5390,6 +5385,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/schema-consistency-checker.lock.yml b/.github/workflows/schema-consistency-checker.lock.yml index bc2524a6d4..aeb139d305 100644 --- a/.github/workflows/schema-consistency-checker.lock.yml +++ b/.github/workflows/schema-consistency-checker.lock.yml @@ -670,11 +670,6 @@ jobs: schema-consistency-cache- schema-consistency- schema- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -5038,6 +5033,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/scout.lock.yml b/.github/workflows/scout.lock.yml index fe82319004..f13af39109 100644 --- a/.github/workflows/scout.lock.yml +++ b/.github/workflows/scout.lock.yml @@ -1997,11 +1997,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6444,6 +6439,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/security-fix-pr.lock.yml b/.github/workflows/security-fix-pr.lock.yml index 472ee4f655..29d59c9ad8 100644 --- a/.github/workflows/security-fix-pr.lock.yml +++ b/.github/workflows/security-fix-pr.lock.yml @@ -398,11 +398,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -4588,6 +4583,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/smoke-claude.lock.yml b/.github/workflows/smoke-claude.lock.yml index b9be9c1bee..693c7ec34c 100644 --- a/.github/workflows/smoke-claude.lock.yml +++ b/.github/workflows/smoke-claude.lock.yml @@ -1997,11 +1997,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6325,6 +6320,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/smoke-codex.lock.yml b/.github/workflows/smoke-codex.lock.yml index e7e8d02d2e..a31922d99d 100644 --- a/.github/workflows/smoke-codex.lock.yml +++ b/.github/workflows/smoke-codex.lock.yml @@ -1876,11 +1876,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6107,6 +6102,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/smoke-copilot-no-firewall.lock.yml b/.github/workflows/smoke-copilot-no-firewall.lock.yml index 9cfdf4a7b2..72cad17e05 100644 --- a/.github/workflows/smoke-copilot-no-firewall.lock.yml +++ b/.github/workflows/smoke-copilot-no-firewall.lock.yml @@ -1910,11 +1910,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -7806,6 +7801,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/smoke-copilot-playwright.lock.yml b/.github/workflows/smoke-copilot-playwright.lock.yml index 78c5b4f3a1..2db8ff5914 100644 --- a/.github/workflows/smoke-copilot-playwright.lock.yml +++ b/.github/workflows/smoke-copilot-playwright.lock.yml @@ -1962,11 +1962,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -8090,6 +8085,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/smoke-copilot.lock.yml b/.github/workflows/smoke-copilot.lock.yml index 813fb7eec7..c651c9abd1 100644 --- a/.github/workflows/smoke-copilot.lock.yml +++ b/.github/workflows/smoke-copilot.lock.yml @@ -1878,11 +1878,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -7988,6 +7983,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/smoke-detector.lock.yml b/.github/workflows/smoke-detector.lock.yml index 0da6f73ce3..7ac069d975 100644 --- a/.github/workflows/smoke-detector.lock.yml +++ b/.github/workflows/smoke-detector.lock.yml @@ -1646,11 +1646,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6068,6 +6063,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/spec-kit-executor.lock.yml b/.github/workflows/spec-kit-executor.lock.yml index 387b02301b..4107ea98f7 100644 --- a/.github/workflows/spec-kit-executor.lock.yml +++ b/.github/workflows/spec-kit-executor.lock.yml @@ -490,11 +490,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory # Repo memory git-based storage configuration from frontmatter processed below - name: Clone repo-memory branch (default) env: @@ -5341,6 +5336,12 @@ jobs: path: /tmp/gh-aw/repo-memory-default retention-days: 1 if-no-files-found: ignore + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/stale-repo-identifier.lock.yml b/.github/workflows/stale-repo-identifier.lock.yml index eca4d7e210..eec13ac4b2 100644 --- a/.github/workflows/stale-repo-identifier.lock.yml +++ b/.github/workflows/stale-repo-identifier.lock.yml @@ -1229,11 +1229,6 @@ jobs: trending-data-${{ github.workflow }}- trending-data- trending- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6805,6 +6800,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Upload safe outputs assets if: always() uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 diff --git a/.github/workflows/static-analysis-report.lock.yml b/.github/workflows/static-analysis-report.lock.yml index 610da52420..2d4100e27c 100644 --- a/.github/workflows/static-analysis-report.lock.yml +++ b/.github/workflows/static-analysis-report.lock.yml @@ -690,11 +690,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -5129,6 +5124,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/super-linter.lock.yml b/.github/workflows/super-linter.lock.yml index a58025ce81..e019103d26 100644 --- a/.github/workflows/super-linter.lock.yml +++ b/.github/workflows/super-linter.lock.yml @@ -510,11 +510,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -5329,6 +5324,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Validate agent logs for errors if: always() uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8 diff --git a/.github/workflows/technical-doc-writer.lock.yml b/.github/workflows/technical-doc-writer.lock.yml index 95c3c4efc0..021ce0e9a0 100644 --- a/.github/workflows/technical-doc-writer.lock.yml +++ b/.github/workflows/technical-doc-writer.lock.yml @@ -1317,11 +1317,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6386,6 +6381,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Upload safe outputs assets if: always() uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 diff --git a/.github/workflows/unbloat-docs.lock.yml b/.github/workflows/unbloat-docs.lock.yml index c9f45dfd5c..5137f5d16f 100644 --- a/.github/workflows/unbloat-docs.lock.yml +++ b/.github/workflows/unbloat-docs.lock.yml @@ -1672,11 +1672,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6190,6 +6185,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Upload safe outputs assets if: always() uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 diff --git a/.github/workflows/weekly-issue-summary.lock.yml b/.github/workflows/weekly-issue-summary.lock.yml index 6bd2d3eda6..92af1b2fc7 100644 --- a/.github/workflows/weekly-issue-summary.lock.yml +++ b/.github/workflows/weekly-issue-summary.lock.yml @@ -892,11 +892,6 @@ jobs: restore-keys: | memory-${{ github.workflow }}- memory- - - name: Upload cache-memory data as artifact - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 - with: - name: cache-memory - path: /tmp/gh-aw/cache-memory - name: Configure Git credentials env: REPO_NAME: ${{ github.repository }} @@ -6162,6 +6157,12 @@ jobs: name: agent-stdio.log path: /tmp/gh-aw/agent-stdio.log if-no-files-found: warn + - name: Upload cache-memory data as artifact + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 + if: always() + with: + name: cache-memory + path: /tmp/gh-aw/cache-memory - name: Upload safe outputs assets if: always() uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5 diff --git a/pkg/workflow/cache.go b/pkg/workflow/cache.go index 903ff1e359..b5bf4a4ade 100644 --- a/pkg/workflow/cache.go +++ b/pkg/workflow/cache.go @@ -307,14 +307,15 @@ func generateCacheSteps(builder *strings.Builder, data *WorkflowData, verbose bo } } -// generateCacheMemorySteps generates cache steps for the cache-memory configuration +// generateCacheMemorySteps generates cache setup steps (directory creation and restore) for the cache-memory configuration // Cache-memory provides a simple file share that LLMs can read/write freely +// Artifact upload is handled separately by generateCacheMemoryArtifactUpload after agent execution func generateCacheMemorySteps(builder *strings.Builder, data *WorkflowData) { if data.CacheMemoryConfig == nil || len(data.CacheMemoryConfig.Caches) == 0 { return } - cacheLog.Printf("Generating cache-memory steps for %d caches", len(data.CacheMemoryConfig.Caches)) + cacheLog.Printf("Generating cache-memory setup steps for %d caches", len(data.CacheMemoryConfig.Caches)) builder.WriteString(" # Cache memory file share configuration from frontmatter processed below\n") @@ -404,27 +405,63 @@ func generateCacheMemorySteps(builder *strings.Builder, data *WorkflowData) { for _, key := range restoreKeys { fmt.Fprintf(builder, " %s\n", key) } + } +} - // Add upload-artifact step for each cache (runs always), but skip for restore-only caches - if !cache.RestoreOnly { - if useBackwardCompatiblePaths { - builder.WriteString(" - name: Upload cache-memory data as artifact\n") - } else { - builder.WriteString(fmt.Sprintf(" - name: Upload cache-memory data as artifact (%s)\n", cache.ID)) - } - builder.WriteString(fmt.Sprintf(" uses: %s\n", GetActionPin("actions/upload-artifact"))) - builder.WriteString(" with:\n") - // Always use the new artifact name and path format - if useBackwardCompatiblePaths { - builder.WriteString(" name: cache-memory\n") - } else { - fmt.Fprintf(builder, " name: cache-memory-%s\n", cache.ID) - } - fmt.Fprintf(builder, " path: %s\n", cacheDir) - // Add retention-days if configured - if cache.RetentionDays != nil { - fmt.Fprintf(builder, " retention-days: %d\n", *cache.RetentionDays) - } +// generateCacheMemoryArtifactUpload generates artifact upload steps for cache-memory +// This should be called after agent execution steps to ensure cache is uploaded after the agent has finished +func generateCacheMemoryArtifactUpload(builder *strings.Builder, data *WorkflowData) { + if data.CacheMemoryConfig == nil || len(data.CacheMemoryConfig.Caches) == 0 { + return + } + + // Only upload artifacts when threat detection is enabled (needed for update_cache_memory job) + // When threat detection is disabled, cache is saved automatically by actions/cache post-action + threatDetectionEnabled := data.SafeOutputs != nil && data.SafeOutputs.ThreatDetection != nil + if !threatDetectionEnabled { + cacheLog.Print("Skipping cache-memory artifact upload (threat detection disabled)") + return + } + + cacheLog.Printf("Generating cache-memory artifact upload steps for %d caches", len(data.CacheMemoryConfig.Caches)) + + // Use backward-compatible paths only when there's a single cache with ID "default" + useBackwardCompatiblePaths := len(data.CacheMemoryConfig.Caches) == 1 && data.CacheMemoryConfig.Caches[0].ID == "default" + + for _, cache := range data.CacheMemoryConfig.Caches { + // Skip restore-only caches + if cache.RestoreOnly { + continue + } + + // Default cache uses /tmp/gh-aw/cache-memory/ for backward compatibility + // Other caches use /tmp/gh-aw/cache-memory-{id}/ to prevent overlaps + var cacheDir string + if cache.ID == "default" { + cacheDir = "/tmp/gh-aw/cache-memory" + } else { + cacheDir = fmt.Sprintf("/tmp/gh-aw/cache-memory-%s", cache.ID) + } + + // Add upload-artifact step for each cache (runs always) + if useBackwardCompatiblePaths { + builder.WriteString(" - name: Upload cache-memory data as artifact\n") + } else { + builder.WriteString(fmt.Sprintf(" - name: Upload cache-memory data as artifact (%s)\n", cache.ID)) + } + builder.WriteString(fmt.Sprintf(" uses: %s\n", GetActionPin("actions/upload-artifact"))) + builder.WriteString(" if: always()\n") + builder.WriteString(" with:\n") + // Always use the new artifact name and path format + if useBackwardCompatiblePaths { + builder.WriteString(" name: cache-memory\n") + } else { + fmt.Fprintf(builder, " name: cache-memory-%s\n", cache.ID) + } + fmt.Fprintf(builder, " path: %s\n", cacheDir) + // Add retention-days if configured + if cache.RetentionDays != nil { + fmt.Fprintf(builder, " retention-days: %d\n", *cache.RetentionDays) } } } diff --git a/pkg/workflow/cache_memory_integration_test.go b/pkg/workflow/cache_memory_integration_test.go index f9f81ed100..f5f24ca833 100644 --- a/pkg/workflow/cache_memory_integration_test.go +++ b/pkg/workflow/cache_memory_integration_test.go @@ -38,12 +38,12 @@ tools: "uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830", "key: memory-${{ github.workflow }}-${{ github.run_id }}", "path: /tmp/gh-aw/cache-memory", - "- name: Upload cache-memory data as artifact", - "name: cache-memory", "## Cache Folder Available", "You have access to a persistent cache folder at `/tmp/gh-aw/cache-memory/`", }, notExpectedInLock: []string{ + // Should NOT upload artifact when detection is disabled + "- name: Upload cache-memory data as artifact", "## Cache Folders Available", "cache-memory/default/", "cache-memory/session/", @@ -75,20 +75,19 @@ tools: "- name: Cache memory file share data (default)", "key: memory-default-${{ github.run_id }}", "path: /tmp/gh-aw/cache-memory", - "- name: Upload cache-memory data as artifact (default)", - "name: cache-memory-default", "- name: Create cache-memory directory (session)", "mkdir -p /tmp/gh-aw/cache-memory-session", "- name: Cache memory file share data (session)", "key: memory-session-${{ github.run_id }}", "path: /tmp/gh-aw/cache-memory-session", - "- name: Upload cache-memory data as artifact (session)", - "name: cache-memory-session", "## Cache Folders Available", "- **default**: `/tmp/gh-aw/cache-memory/`", "- **session**: `/tmp/gh-aw/cache-memory-session/`", }, notExpectedInLock: []string{ + // Should NOT upload artifacts when detection is disabled + "- name: Upload cache-memory data as artifact (default)", + "- name: Upload cache-memory data as artifact (session)", "## Cache Folder Available", }, }, diff --git a/pkg/workflow/cache_memory_restore_only_test.go b/pkg/workflow/cache_memory_restore_only_test.go index 485846968f..93f309c922 100644 --- a/pkg/workflow/cache_memory_restore_only_test.go +++ b/pkg/workflow/cache_memory_restore_only_test.go @@ -63,13 +63,14 @@ tools: "- name: Cache memory file share data (default)", "actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830", "key: memory-default-${{ github.run_id }}", - "- name: Upload cache-memory data as artifact (default)", - "name: cache-memory-default", "- name: Restore cache memory file share data (readonly)", "actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830", "key: memory-readonly-${{ github.run_id }}", }, notExpectedInLock: []string{ + // Should NOT upload artifacts when detection is disabled + "- name: Upload cache-memory data as artifact (default)", + "name: cache-memory-default", "- name: Upload cache-memory data as artifact (readonly)", "name: cache-memory-readonly", }, @@ -99,13 +100,14 @@ tools: expectedInLock: []string{ "- name: Cache memory file share data (writeable)", "actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830", - "- name: Upload cache-memory data as artifact (writeable)", - "name: cache-memory-writeable", "- name: Restore cache memory file share data (readonly1)", "actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830", "- name: Restore cache memory file share data (readonly2)", }, notExpectedInLock: []string{ + // Should NOT upload artifacts when detection is disabled + "- name: Upload cache-memory data as artifact (writeable)", + "name: cache-memory-writeable", "- name: Upload cache-memory data as artifact (readonly1)", "- name: Upload cache-memory data as artifact (readonly2)", "name: cache-memory-readonly1", diff --git a/pkg/workflow/cache_memory_threat_detection_test.go b/pkg/workflow/cache_memory_threat_detection_test.go index 92dd7482e0..761776f1af 100644 --- a/pkg/workflow/cache_memory_threat_detection_test.go +++ b/pkg/workflow/cache_memory_threat_detection_test.go @@ -42,8 +42,10 @@ Test workflow with cache-memory and threat detection enabled.`, "- name: Restore cache memory file share data", "uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830", "key: memory-${{ github.workflow }}-${{ github.run_id }}", - // Should still upload artifact + // Should upload artifact with if: always() "- name: Upload cache-memory data as artifact", + "uses: actions/upload-artifact@", + "if: always()", "name: cache-memory", // Should have update_cache_memory job "update_cache_memory:", @@ -81,11 +83,10 @@ Test workflow with cache-memory but no threat detection.`, "- name: Cache memory file share data", "uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830", "key: memory-${{ github.workflow }}-${{ github.run_id }}", - // Should still upload artifact - "- name: Upload cache-memory data as artifact", - "name: cache-memory", }, notExpectedInLock: []string{ + // Should NOT upload artifact when detection is disabled + "- name: Upload cache-memory data as artifact", // Should NOT have update_cache_memory job "update_cache_memory:", // Should NOT use restore action @@ -123,8 +124,9 @@ Test workflow with multiple cache-memory and threat detection enabled.`, "key: memory-default-${{ github.run_id }}", "- name: Restore cache memory file share data (session)", "key: memory-session-${{ github.run_id }}", - // Should upload both artifacts + // Should upload both artifacts with if: always() "- name: Upload cache-memory data as artifact (default)", + "if: always()", "name: cache-memory-default", "- name: Upload cache-memory data as artifact (session)", "name: cache-memory-session", diff --git a/pkg/workflow/compiler_yaml.go b/pkg/workflow/compiler_yaml.go index e4b8b8fb9d..aeb6811794 100644 --- a/pkg/workflow/compiler_yaml.go +++ b/pkg/workflow/compiler_yaml.go @@ -444,6 +444,10 @@ func (c *Compiler) generateMainJobSteps(yaml *strings.Builder, data *WorkflowDat // Add repo-memory artifact upload to save state for push job generateRepoMemoryArtifactUpload(yaml, data) + // Add cache-memory artifact upload (after agent execution) + // This ensures artifacts are uploaded after the agent has finished modifying the cache + generateCacheMemoryArtifactUpload(yaml, data) + // upload assets if upload-asset is configured if data.SafeOutputs != nil && data.SafeOutputs.UploadAssets != nil { c.generateUploadAssets(yaml)