Skip to content

Commit 0e52df3

Browse files
committed
fix
1 parent 180d659 commit 0e52df3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/cron.yml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
# │ │ │ │ │
1313
# * * * * *
1414
- cron: '0 */6 * * *'
15+
workflow_dispatch:
1516

1617
defaults:
1718
run:

tools/config.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,15 +134,15 @@ function github_pr_exists(){ # github_pr_exists <repo-path> <branch-name>
134134
function github_release_id(){ # github_release_id <repo-path> <release-tag>
135135
local repo_path="$1"
136136
local release_tag="$2"
137-
local release=`curl -s -k -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3.raw+json" "https://api.github.com/repos/$repo_path/releases" | jq -r '.[] | select(.tag_name == "$release_tag") | .id'`
137+
local release=`curl -s -k -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3.raw+json" "https://api.github.com/repos/$repo_path/releases" | jq --arg release_tag "$release_tag" -r '.[] | select(.tag_name == "$release_tag") | .id'`
138138
if [ ! "$release" == "" ] && [ ! "$release" == "null" ]; then echo "$release"; else echo ""; fi
139139
}
140140

141141
function github_release_asset_id(){ # github_release_asset_id <repo-path> <release-id> <release-file>
142142
local repo_path="$1"
143143
local release_id="$2"
144144
local release_file="$3"
145-
local release_asset=`curl -s -k -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3.raw+json" "https://api.github.com/repos/$repo_path/releases/$release_id/assets" | jq -r '.[] | select(.name == "$release_file") | .id'`
145+
local release_asset=`curl -s -k -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3.raw+json" "https://api.github.com/repos/$repo_path/releases/$release_id/assets" | jq --arg release_file "$release_file" -r '.[] | select(.name == "$release_file") | .id'`
146146
if [ ! "$release_asset" == "" ] && [ ! "$release_asset" == "null" ]; then echo "$release_asset"; else echo ""; fi
147147
}
148148

0 commit comments

Comments
 (0)