Skip to content

Commit bfa05c7

Browse files
committed
增加下载工具链
1 parent 163fefb commit bfa05c7

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Download Docker Cli
2+
on:
3+
workflow_dispatch: # 仅手动触发
4+
jobs:
5+
download_resource:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Download Docker Cli x86
9+
continue-on-error: true
10+
run: |
11+
LATEST_ZIP=$(curl -s https://download.docker.com/win/static/stable/x86_64/ | grep -oE 'docker-[0-9.]+\.zip' | tail -n 1)
12+
wget https://download.docker.com/win/static/stable/x86_64/$LATEST_ZIP
13+
unzip $LATEST_ZIP
14+
cp docker/docker.exe docker-windows-x86_64.exe
15+
16+
URL=$(curl -s https://api.github.com/repos/docker/compose/releases/latest | jq -r '.assets[] | select(.name == "docker-compose-windows-x86_64.exe") | .browser_download_url')
17+
curl -L "$URL"
18+
- name: Create Release
19+
if: always()
20+
uses: softprops/action-gh-release@v2
21+
with:
22+
tag_name: docker-cli-v1
23+
name: "Docker Cli Collection"
24+
body: "Pre-built docker cli command"
25+
files: |
26+
docker-windows-x86_64.exe
27+
docker-compose-windows-x86_64.exe
28+
draft: false
29+
prerelease: false

0 commit comments

Comments
 (0)