Skip to content

Commit 206d13f

Browse files
committed
Use unique artifact name for uploading
1 parent 394e589 commit 206d13f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,25 @@ inputs:
1212
runs:
1313
using: "composite"
1414
steps:
15-
- name: Calculate target file name
15+
- name: Calculate metadata
1616
id: meta
1717
run: |
1818
import os, secrets
1919
rnd = secrets.token_hex(16)
2020
with open(os.environ["GITHUB_OUTPUT"], "a") as f:
2121
print(f"file=.coverage.{rnd}", file=f)
22+
art = os.environ["ARTIFACT"]
23+
print(f"artifact={art}-{rnd}", file=f)
24+
env:
25+
artifact: ${{ inputs.artifact }}
2226
shell: python
2327
- name: Rename file
2428
run: mv ${{ inputs.file }} ${{ steps.meta.outputs.file }}
2529
shell: bash
2630
- name: Upload coverage artifact
2731
uses: actions/[email protected]
2832
with:
29-
name: ${{ inputs.artifact }}
33+
name: ${{ steps.meta.outputs.artifact }}
3034
path: ${{ steps.meta.outputs.file }}
3135
if-no-files-found: error
3236
retention-days: 1

0 commit comments

Comments
 (0)