File tree Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Expand file tree Collapse file tree 2 files changed +16
-10
lines changed Original file line number Diff line number Diff line change 22name : Deploy Jekyll with GitHub Pages dependencies preinstalled
33
44on :
5- # Runs on pushes targeting the default branch
6- push :
7- branches : ["main"]
8-
95 # Allows you to run this workflow manually from the Actions tab
106 workflow_dispatch :
117 repository_dispatch :
4238 destination : ./_site
4339 - name : Helm package
4440 run : |
45- bash helm.sh
41+ if [[ "${{ github.event_name }}" == "repository_dispatch" ]]; then
42+ bash helm.sh ${{ github.event.client_payload.ref }}
43+ elif [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
44+ bash helm.sh
45+ fi
4646 sudo cp index.yaml _site/
4747 - name : Upload artifact
4848 uses : actions/upload-pages-artifact@v1
Original file line number Diff line number Diff line change 33# 仓库名称
44repository=" labring/endpoints-operator"
55
6- # 获取最新release的版本号
7- latest_release=$( curl -s " https://api.github.com/repos/$repository /releases/latest" | grep ' "tag_name":' | sed -E ' s/.*"([^"]+)".*/\1/' )
6+ # 版本号参数
7+ version=$1
8+
9+ if [[ -z " $version " ]]; then
10+ # 获取最新release的版本号
11+ version=$( curl -s " https://api.github.com/repos/$repository /releases/latest" | grep ' "tag_name":' | sed -E ' s/.*"([^"]+)".*/\1/' )
12+ fi
13+
814# 构建下载链接
9- download_url=" https://github.com/$repository /releases/download/$latest_release /endpoints-operator-${latest_release # v} .tgz"
15+ download_url=" https://github.com/$repository /releases/download/$version /endpoints-operator-${version # v} .tgz"
1016
11- # 下载最新release
17+ # 下载指定版本的release
1218wget $download_url
1319
14- helm repo index . --url https://github.com/$repository /releases/download/$latest_release
20+ helm repo index . --url https://github.com/$repository /releases/download/$version
You can’t perform that action at this time.
0 commit comments