File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -140,3 +140,31 @@ jobs:
140
140
Write-Error "File contents of downloaded artifacts are incorrect"
141
141
}
142
142
shell : pwsh
143
+
144
+ # Replace the contents of Artifact #1
145
+ - name : ' Overwrite artifact #1 again'
146
+ uses : ./
147
+ with :
148
+ name : ' Artifact-A-${{ matrix.runs-on }}'
149
+ path : path/to/dir-2/file2.txt
150
+ overwrite : true
151
+
152
+ # Download replaced Artifact #1 and verify the correctness of the content
153
+ - name : ' Download artifact #1 again'
154
+ uses : actions/download-artifact@v4
155
+ with :
156
+ name : ' Artifact-A-${{ matrix.runs-on }}'
157
+ path : overwrite/some/new/path
158
+
159
+ - name : ' Verify Artifact #1 again'
160
+ run : |
161
+ $file = "overwrite/some/new/path/file2.txt"
162
+ if(!(Test-Path -path $file))
163
+ {
164
+ Write-Error "Expected file does not exist"
165
+ }
166
+ if(!((Get-Content $file) -ceq "Hello world from file #2"))
167
+ {
168
+ Write-Error "File contents of downloaded artifacts are incorrect"
169
+ }
170
+ shell : pwsh
You can’t perform that action at this time.
0 commit comments