Commit e3b4e3a 1 parent 2c0e3fe commit e3b4e3a Copy full SHA for e3b4e3a
File tree 2 files changed +47
-3
lines changed
2 files changed +47
-3
lines changed Original file line number Diff line number Diff line change @@ -121,9 +121,9 @@ type ArtifactContext struct {
121
121
}
122
122
123
123
func artifactNameToID (s string ) int64 {
124
- h := fnv .New64a ()
124
+ h := fnv .New32a ()
125
125
h .Write ([]byte (s ))
126
- return int64 (h .Sum64 ())
126
+ return int64 (h .Sum32 ())
127
127
}
128
128
129
129
func (c ArtifactContext ) Error (status int , _ ... interface {}) {
@@ -376,7 +376,7 @@ func (r *artifactV4Routes) listArtifacts(ctx *ArtifactContext) {
376
376
377
377
for _ , entry := range entries {
378
378
id := artifactNameToID (entry .Name ())
379
- if (req .NameFilter == nil || req .NameFilter .Value == entry .Name ()) || (req .IdFilter == nil || req .IdFilter .Value == id ) {
379
+ if (req .NameFilter == nil || req .NameFilter .Value == entry .Name ()) && (req .IdFilter == nil || req .IdFilter .Value == id ) {
380
380
data := & ListArtifactsResponse_MonolithArtifact {
381
381
Name : entry .Name (),
382
382
CreatedAt : timestamppb .Now (),
Original file line number Diff line number Diff line change @@ -17,16 +17,29 @@ jobs:
17
17
strategy:
18
18
${{ tojson(strategy) }}
19
19
shell: cp {0} context.txt
20
+ - run : echo Artifact2 > data.txt
21
+
20
22
- uses : actions/upload-artifact@v4
21
23
with :
22
24
name : test
23
25
path : context.txt
24
26
27
+ - uses : actions/upload-artifact@v4
28
+ with :
29
+ name : test2
30
+ path : data.txt
31
+
25
32
- uses : actions/download-artifact@v4
26
33
with :
27
34
name : test
28
35
path : out
29
36
- run : cat out/context.txt
37
+
38
+ - name : assert
39
+ run : |
40
+ [[ "$(cat context.txt)" = "$(cat out/context.txt)" ]] || exit 1
41
+ shell : bash
42
+
30
43
- run : |
31
44
No content
32
45
shell: cp {0} context.txt
41
54
name : test
42
55
path : out2
43
56
- run : cat out2/context.txt
57
+
58
+ - name : assert 2
59
+ run : |
60
+ [[ "$(cat context.txt)" = "$(cat out2/context.txt)" ]] || exit 1
61
+ shell : bash
62
+
63
+ - uses : actions/download-artifact@v4
64
+ with :
65
+ name : test2
66
+ path : out3
67
+ - run : cat out3/data.txt
68
+
69
+ - name : assert 3
70
+ run : |
71
+ [[ "$(cat data.txt)" = "$(cat out3/data.txt)" ]] || exit 1
72
+ shell : bash
73
+
74
+ - uses : actions/download-artifact@v4
75
+ with :
76
+ pattern : " test*"
77
+ path : out4
78
+ merge-multiple : true
79
+
80
+ - run : cat out4/data.txt
81
+ - run : cat out4/context.txt
82
+
83
+ - name : assert 4
84
+ run : |
85
+ [[ "$(cat context.txt)" = "$(cat out4/context.txt)" ]] || exit 1
86
+ [[ "$(cat data.txt)" = "$(cat out4/data.txt)" ]] || exit 1
87
+ shell : bash
You can’t perform that action at this time.
0 commit comments