Skip to content

Commit

Permalink
feat: 更新基础镜像
Browse files Browse the repository at this point in the history
  • Loading branch information
wojiushixiaobai authored and ibuler committed Jul 4, 2024
1 parent ca754e8 commit 4f54513
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Container image that runs your code
FROM centos:7
FROM debian:trixie-slim

# Copies your code file from your action repository to the filesystem path `/` of the container
COPY *.sh /
Expand Down
21 changes: 11 additions & 10 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,28 @@ OS=${INPUT_OS-''}
ARCH=${INPUT_ARCH-''}
RELEASE_TAG=$(basename "${GITHUB_REF:-'master'}")
export VERSION=${RELEASE_TAG:-"master"}
#INPUT_UPLOAD_URL='https://uploads.github.com/repos/ibuler/koko/releases/27862783/assets'
if [[ -n "${INPUT_UPLOAD_URL=''}" ]];then
RELEASE_ASSETS_UPLOAD_URL=${INPUT_UPLOAD_URL}
else
RELEASE_ASSETS_UPLOAD_URL=$(jq -r .release.upload_url < "${GITHUB_EVENT_PATH}")
fi
RELEASE_ASSETS_UPLOAD_URL=${RELEASE_ASSETS_UPLOAD_URL%\{?name,label\}}
#INPUT_GITHUB_TOKEN=

function add_pkg() {
pkg=$1
command -v apk && apk add ${pkg} && return 0
command -v yum && yum install ${pkg} && return 0
command -v apt && apt get ${pkg} && return 0
command -v yum && yum makecache fast && yum install -y ${pkg} && return 0
command -v apt && apt-get update && apt-get install -y ${pkg} && return 0
}

if [[ $(uname) != 'Darwin' ]];then
command -v bash || add_pkg bash
command -v curl || add_pkg curl
command -v jq || add_pkg jq
fi

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

function get_md5() {
file=$1
Expand Down

0 comments on commit 4f54513

Please sign in to comment.