File tree 1 file changed +3
-20
lines changed 1 file changed +3
-20
lines changed Original file line number Diff line number Diff line change 17
17
18
18
steps :
19
19
- name : Get Artifact URL
20
- id : get-artifact-url
21
- uses : actions/github-script@v6
22
- with :
23
- script : |
24
- const downloadUrl = "https://api.github.com/repos/Kommunicate-io/Kommunicate-Android-Chat-SDK/actions/artifacts/2355441843";
25
- const fetcha = require('node-fetch'); // Available in github-script
26
- const response = await fetcha(downloadUrl, {
27
- headers: {
28
- Authorization: `token ${process.env.GITHUB_TOKEN}`,
29
- },
30
- });
31
- if (response.ok) {
32
- const buffer = await response.buffer();
33
- require('fs').writeFileSync('artifact.zip', buffer);
34
- console.log('Artifact downloaded successfully as artifact.zip');
35
- } else {
36
- console.error(`Failed to download artifact: ${response.statusText}`);
37
- }
38
- env :
39
- GITHUB_TOKEN : ${{ secrets.DOWNLOAD_TOKEN }}
20
+ run:|
21
+ response = $(curl -H "Authorization : token ${{ secrets.DOWNLOAD_TOKEN }}" -L "https://api.github.com/repos/Kommunicate-io/Kommunicate-Android-Chat-SDK/actions/artifacts/2355441843" -o artifact.zip)
22
+ echo "response from curl= $response"
You can’t perform that action at this time.
0 commit comments