Skip to content

Commit 9985836

Browse files
committed
[ci] Merge all artifacts into one archive
1 parent 16b98eb commit 9985836

File tree

1 file changed

+29
-3
lines changed

1 file changed

+29
-3
lines changed

.github/workflows/test-kg.yml

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: Test Generate Knowledge Graphs
1+
name: Generate Knowledge Graphs
22

33
on:
44
workflow_dispatch:
55
pull_request:
66

77
jobs:
8-
test-kg-stmicro:
8+
generate-kg-stmicro:
99
runs-on: ubuntu-latest
1010
strategy:
1111
fail-fast: false
@@ -77,12 +77,38 @@ jobs:
7777
with:
7878
name: logs-${{ matrix.family_group.name }}
7979
path: log/stmicro/kg
80-
retention-days: 7
80+
retention-days: 1
8181

8282
- name: Upload KGs
8383
if: always()
8484
uses: actions/upload-artifact@v4
8585
with:
8686
name: kg-${{ matrix.family_group.name }}
8787
path: ext/stmicro/kg-archive
88+
retention-days: 1
89+
90+
91+
merge-kg-artifacts:
92+
runs-on: ubuntu-latest
93+
needs: generate-kg-stmicro
94+
steps:
95+
- name: Download All KGs
96+
uses: actions/download-artifact@v4
97+
with:
98+
pattern: kg-*
99+
path: kg-archive-all
100+
101+
- name: Merge all KGs
102+
run: |
103+
mkdir -p kg-archive/
104+
105+
find kg-archive-all/ -mindepth 2 -maxdepth 2 -type d | while read DIR; do
106+
cp -r "$DIR" kg-archive/
107+
done
108+
109+
- name: Upload Final Knowledge Graphs
110+
uses: actions/upload-artifact@v4
111+
with:
112+
name: kg-archive
113+
path: kg-archive/
88114
retention-days: 7

0 commit comments

Comments
 (0)