Skip to content

Commit 4a1dcbb

Browse files
committed
Fix API request
1 parent 43df934 commit 4a1dcbb

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,8 @@ jobs:
3232
workflow_name="beta.yml"
3333
pat="${{ secrets.SNAP_ENHANCE_WORKFLOW_ARTIFACT }}"
3434
35-
echo "Token: $pat"
36-
echo "Repository: $repo_owner/$repo_name"
37-
echo "Workflow URL: https://api.github.com/repos/${repo_owner}/${repo_name}/actions/workflows/${workflow_name}/runs?event=schedule&status=success&per_page=1"
38-
3935
artifact_url=$(curl -s -H "Authorization: Bearer $pat" \
40-
"https://api.github.com/repos/${repo_owner}/${repo_name}/actions/workflows/${workflow_name}/runs?event=schedule&status=success&per_page=1" \
36+
"https://api.github.com/repos/${repo_owner}/${repo_name}/actions/workflows/${workflow_name}/runs?status=success&per_page=1" \
4137
| jq -r '.workflow_runs[0].artifacts_url')
4238
4339
download_url=$(curl -s -H "Authorization: Bearer $pat" \

.github/workflows/schedule.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,19 @@ jobs:
2929
repo_owner="rhunk"
3030
repo_name="SnapEnhance"
3131
workflow_name="beta.yml"
32-
pat="${{ secrets.SNAP_ENHANCE_WORKFLOW_ARTIFACT }}" # Replace SNAP_ENHANCE_WORKFLOW_ARTIFACT with your actual secret name
33-
32+
pat="${{ secrets.SNAP_ENHANCE_WORKFLOW_ARTIFACT }}"
33+
3434
artifact_url=$(curl -s -H "Authorization: Bearer $pat" \
35-
"https://api.github.com/repos/${repo_owner}/${repo_name}/actions/workflows/${workflow_name}/runs?event=schedule&status=success&per_page=1" \
35+
"https://api.github.com/repos/${repo_owner}/${repo_name}/actions/workflows/${workflow_name}/runs?status=success&per_page=1" \
3636
| jq -r '.workflow_runs[0].artifacts_url')
3737
3838
download_url=$(curl -s -H "Authorization: Bearer $pat" \
3939
"$artifact_url" \
4040
| jq -r '.artifacts[0].archive_download_url')
4141
42+
echo "Artifact URL: $artifact_url"
43+
echo "Download URL: $download_url"
44+
4245
echo "download_url=$download_url" >> $GITHUB_ENV
4346
shell: bash
4447

push-here.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# A File to do dirty stuff - push in this file to trigger action
22
Snap 12.68.0.23 Beta & SnapEnhance CI Build ffd42de
33

4-
Add a dot here:
4+
Add a dot here:

0 commit comments

Comments
 (0)