forked from IGinX-THU/IGinX
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
51 lines (46 loc) · 1.62 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: "zookeeper"
description: "setup zookeeper"
inputs:
version:
description: "zookeeper version"
required: false
default: "3.7.2"
port:
description: "zk port"
required: false
default: "2181"
runs:
using: "composite"
steps:
- id: base
name: Initialize Setup Configuration
uses: ./.github/actions/setup/tool
with:
tool: zookeeper
version: ${{ inputs.version }}
- name: Restore zookeeper Cache
id: restore
uses: actions/cache/restore@v3
with:
path: ${{ steps.base.outputs.cache-path }}
key: ${{ steps.base.outputs.cache-key }}
- name: Setup zookeeper into Runner Tool Cache
uses: pbrisbin/setup-tool-action@v2
with:
name: zookeeper
version: ${{ inputs.version }}
url: "https://dlcdn.apache.org/zookeeper/zookeeper-{version}/apache-zookeeper-{version}-bin.{ext}"
subdir: "apache-zookeeper-{version}-bin"
ext: "tar.gz"
- name: Copy ZK to Port Dir
shell: bash
run: |
if [ ! -d "${{ runner.temp }}/zookeeper-${{ inputs.port }}" ]; then
cp -r "${{ steps.base.outputs.tool-path }}" "${{ runner.temp }}/zookeeper-${{ inputs.port }}"
fi
- name: Save zookeeper Cache
if: steps.restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: ${{ steps.base.outputs.cache-path }}
key: ${{ steps.base.outputs.cache-key }}