File tree Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Expand file tree Collapse file tree 1 file changed +46
-0
lines changed Original file line number Diff line number Diff line change
1
+ on :
2
+ workflow_dispatch :
3
+ inputs :
4
+ url :
5
+ description : " URL of the artifact to mirror."
6
+ type : string
7
+ required : true
8
+ github_tag :
9
+ description : " Tag to upload the artifact to."
10
+ type : string
11
+ required : true
12
+ sha256_hash :
13
+ description : " Hash of the downloaded artifact to validate."
14
+ type : string
15
+ required : true
16
+
17
+ env :
18
+ XZ_OPT : " -T0"
19
+
20
+ name : Mirror
21
+
22
+ jobs :
23
+ mirror_artifact :
24
+ name : Mirror Artifact
25
+ runs-on : ubuntu-latest
26
+ permissions :
27
+ contents : write
28
+
29
+ steps :
30
+ - name : Download and Validate Artifact
31
+ run : |
32
+ mkdir downloads
33
+ cd downloads
34
+
35
+ ARTIFACT_NAME=$(basename ${{ inputs.url }})
36
+
37
+ wget ${{ inputs.url }}
38
+ echo "${{ inputs.sha256_hash }} $ARTIFACT_NAME" | sha256sum --check
39
+
40
+ - name : Upload Mirrored Artifact to Release
41
+ uses : svenstaro/upload-release-action@v2
42
+ with :
43
+ file : " downloads/*"
44
+ file_glob : true
45
+ tag : ${{ inputs.github_tag }}
46
+ overwrite : true
You can’t perform that action at this time.
0 commit comments