Skip to content

Commit 4f54513

Browse files
wojiushixiaobaiibuler
authored andcommitted
feat: 更新基础镜像
1 parent ca754e8 commit 4f54513

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Container image that runs your code
2-
FROM centos:7
2+
FROM debian:trixie-slim
33

44
# Copies your code file from your action repository to the filesystem path `/` of the container
55
COPY *.sh /

build.sh

+11-10
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,28 @@ OS=${INPUT_OS-''}
55
ARCH=${INPUT_ARCH-''}
66
RELEASE_TAG=$(basename "${GITHUB_REF:-'master'}")
77
export VERSION=${RELEASE_TAG:-"master"}
8-
#INPUT_UPLOAD_URL='https://uploads.github.com/repos/ibuler/koko/releases/27862783/assets'
9-
if [[ -n "${INPUT_UPLOAD_URL=''}" ]];then
10-
RELEASE_ASSETS_UPLOAD_URL=${INPUT_UPLOAD_URL}
11-
else
12-
RELEASE_ASSETS_UPLOAD_URL=$(jq -r .release.upload_url < "${GITHUB_EVENT_PATH}")
13-
fi
14-
RELEASE_ASSETS_UPLOAD_URL=${RELEASE_ASSETS_UPLOAD_URL%\{?name,label\}}
15-
#INPUT_GITHUB_TOKEN=
168

179
function add_pkg() {
1810
pkg=$1
1911
command -v apk && apk add ${pkg} && return 0
20-
command -v yum && yum install ${pkg} && return 0
21-
command -v apt && apt get ${pkg} && return 0
12+
command -v yum && yum makecache fast && yum install -y ${pkg} && return 0
13+
command -v apt && apt-get update && apt-get install -y ${pkg} && return 0
2214
}
2315

2416
if [[ $(uname) != 'Darwin' ]];then
2517
command -v bash || add_pkg bash
2618
command -v curl || add_pkg curl
19+
command -v jq || add_pkg jq
2720
fi
2821

22+
#INPUT_UPLOAD_URL='https://uploads.github.com/repos/ibuler/koko/releases/27862783/assets'
23+
if [[ -n "${INPUT_UPLOAD_URL=''}" ]];then
24+
RELEASE_ASSETS_UPLOAD_URL=${INPUT_UPLOAD_URL}
25+
else
26+
RELEASE_ASSETS_UPLOAD_URL=$(jq -r .release.upload_url < "${GITHUB_EVENT_PATH}")
27+
fi
28+
RELEASE_ASSETS_UPLOAD_URL=${RELEASE_ASSETS_UPLOAD_URL%\{?name,label\}}
29+
#INPUT_GITHUB_TOKEN=
2930

3031
function get_md5() {
3132
file=$1

0 commit comments

Comments
 (0)