File tree Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -24,20 +24,21 @@ jobs:
24
24
with :
25
25
node-version : 16
26
26
27
- - name : Get Latest Artifact URL
27
+ - name : Get Latest Artifact URL
28
28
id : get_artifact
29
29
run : |
30
30
repo_owner="rhunk"
31
31
repo_name="SnapEnhance"
32
32
workflow_name="beta.yml"
33
+ pat="${{ secrets.SNAP_ENHANCE_WORKFLOW_ARTIFACT }}" # Replace SNAP_ENHANCE_WORKFLOW_ARTIFACT with your actual secret name
33
34
34
- artifact_url=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }} " \
35
- "https://api.github.com/repos/${repo_owner}/${repo_name}/actions/workflows/${workflow_name}/runs?event=push &status=success&per_page=1" \
35
+ artifact_url=$(curl -s -H "Authorization: Bearer $pat " \
36
+ "https://api.github.com/repos/${repo_owner}/${repo_name}/actions/workflows/${workflow_name}/runs?event=schedule &status=success&per_page=1" \
36
37
| jq -r '.workflow_runs[0].artifacts_url')
37
38
38
- download_url=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }} " \
39
+ download_url=$(curl -s -H "Authorization: Bearer $pat " \
39
40
"$artifact_url" \
40
- | jq -r '.artifacts[] | select(.name == "core.apk") | .archive_download_url')
41
+ | jq -r '.artifacts[0] .archive_download_url')
41
42
42
43
echo "download_url=$download_url" >> $GITHUB_ENV
43
44
shell : bash
Original file line number Diff line number Diff line change @@ -23,20 +23,21 @@ jobs:
23
23
with :
24
24
node-version : 16
25
25
26
- - name : Get Latest Artifact URL
26
+ - name : Get Latest Artifact URL
27
27
id : get_artifact
28
28
run : |
29
29
repo_owner="rhunk"
30
30
repo_name="SnapEnhance"
31
31
workflow_name="beta.yml"
32
+ pat="${{ secrets.SNAP_ENHANCE_WORKFLOW_ARTIFACT }}" # Replace SNAP_ENHANCE_WORKFLOW_ARTIFACT with your actual secret name
32
33
33
- artifact_url=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }} " \
34
+ artifact_url=$(curl -s -H "Authorization: Bearer $pat " \
34
35
"https://api.github.com/repos/${repo_owner}/${repo_name}/actions/workflows/${workflow_name}/runs?event=schedule&status=success&per_page=1" \
35
36
| jq -r '.workflow_runs[0].artifacts_url')
36
37
37
- download_url=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }} " \
38
+ download_url=$(curl -s -H "Authorization: Bearer $pat " \
38
39
"$artifact_url" \
39
- | jq -r '.artifacts[] | select(.name == "core.apk") | .archive_download_url')
40
+ | jq -r '.artifacts[0] .archive_download_url')
40
41
41
42
echo "download_url=$download_url" >> $GITHUB_ENV
42
43
shell : bash
Original file line number Diff line number Diff line change 1
1
# A File to do dirty stuff - push in this file to trigger action
2
2
Snap 12.68.0.23 Beta & SnapEnhance CI Build ffd42de
3
3
4
- Add a dot here: ...
4
+ Add a dot here: ..
You can’t perform that action at this time.
0 commit comments