File tree Expand file tree Collapse file tree 2 files changed +70
-0
lines changed
Expand file tree Collapse file tree 2 files changed +70
-0
lines changed Original file line number Diff line number Diff line change 1+ name : install-oasis
2+ on :
3+ workflow_call :
4+ inputs :
5+ release_tag :
6+ required : false
7+ type : string
8+ # A push occurs to one of the matched branches.
9+ push :
10+ branches :
11+ - master
12+ - stable/*
13+ # Or when a pull request event occurs for a pull request against one of the
14+ # matched branches.
15+ pull_request :
16+ branches :
17+ - master
18+ - stable/*
19+ jobs :
20+ install :
21+ runs-on : ubuntu-latest
22+ steps :
23+ - name : Install Oasis CLI (latest or pinned)
24+ run : |
25+ #TAG="${{ inputs.release_tag }}"
26+ #echo "Input length: ${#TAG}"
27+ API="https://github.com/oasisprotocol/cli/releases/download/v0.16.0/oasis_cli_0.16.0_linux_amd64.tar.gz"
28+
29+ echo "Fetching release info from: $API"
30+ # ...same download logic...
31+ curl -L "$API" -o oasis-cli.tar.gz
32+ tar -xzf oasis-cli.tar.gz
33+ rm oasis-cli.tar.gz
34+
35+ # Make executable
36+ # chmod +x oasis
37+
38+ # Verify installation
39+ # ./oasis --version
40+
41+ - name : Debug inputs
42+ run : |
43+ echo "Raw input: '${{ inputs.release_tag }}'"
44+ echo "Input length: ${#TAG}"
45+ TAG="${{ inputs.release_tag }}"
46+ if [ -z "$TAG" ]; then
47+ echo "TAG is empty or unset"
48+ else
49+ echo "TAG is set to: '$TAG'"
50+ fi
51+ - name : Determine release tag
52+ id : tag
53+ run : |
54+ TAG="${{ inputs.release_tag }}"
55+ if [ -z "$TAG" ]; then
56+ echo "No input tag provided → using latest release."
57+ TAG=$(curl -fsSL https://api.github.com/repos/oasisprotocol/cli/releases/latest | jq -r .tag_name)
58+ fi
59+ echo "tag=$TAG" >> $GITHUB_OUTPUT
60+ - name : Expose PATH
61+ run : echo "$PWD" >> "$GITHUB_PATH"
62+ - name : Verify installation
63+ run : |
64+ echo "Oasis CLI installed successfully!"
65+ oasis --version
Original file line number Diff line number Diff line change 1+ jobs :
2+ use-oasis-cli :
3+ uses : your-org/ci/.github/workflows/install-oasis.yml@main
4+ with :
5+ release_tag : v0.16.0
You can’t perform that action at this time.
0 commit comments