Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ VERSION ?= dev-$(shell git rev-parse --short HEAD)
APP_NAME = skywalking-cli
OUT_DIR = bin
BINARY = swctl
DESTDIR ?= /usr/local/bin

HUB ?= docker.io/apache

Expand Down
57 changes: 57 additions & 0 deletions actions/setup/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.

inputs:
install-dir:
description: The directory to install swctl
required: false
default: /usr/local/bin
version:
description: The version of swctl to install
required: false
default: ""

name: Setup swctl
description: Setup swctl
branding:
icon: book
color: orange
runs:
using: "composite"
steps:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.24
cache-dependency-path: ${{ github.action_path }}/go.sum
- name: Checkout
if: inputs.version != ''
uses: actions/checkout@v4
with:
repository: apache/skywalking-cli
ref: ${{ inputs.version }}
path: skywalking-cli-${{ inputs.version }}
- if: inputs.version == ''
shell: bash -euxo pipefail {0}
run: |
sudo make -C ${GITHUB_ACTION_PATH}/../.. DESTDIR=${{ inputs.install-dir }} install
swctl --version
- if: inputs.version != ''
shell: bash -euxo pipefail {0}
run: |
sudo make -C ${GITHUB_WORKSPACE}/skywalking-cli-${{ inputs.version }} DESTDIR=${{ inputs.install-dir }} install
swctl --version
Loading