Skip to content

Commit

Permalink
v1 action and orb
Browse files Browse the repository at this point in the history
  • Loading branch information
fujiwara committed Jan 26, 2024
1 parent 5296c4c commit 866ad1b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 23 deletions.
8 changes: 4 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
inputs:
version:
description: "A version to install lamroll"
default: "v0.10.0"
default: "v1.0.0"
runs:
using: "composite"
steps:
- run: |
cd /tmp
mkdir -p /tmp/lambroll-${{ inputs.version }}
cd /tmp/lambroll-${{ inputs.version }}
curl -sL https://github.com/fujiwara/lambroll/releases/download/${{ inputs.version }}/lambroll_${{ inputs.version}}_linux_amd64.tar.gz | tar zxvf -
sudo install lambroll_${{ inputs.version }}_linux_amd64/lambroll /usr/local/bin
rm -rf lambroll_${{ inputs.version }}_linux_amd64/
sudo install lambroll /usr/local/bin
shell: bash
26 changes: 7 additions & 19 deletions circleci-orb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,20 @@ commands:
version:
description: lambroll version
type: string
default: v0.10.0
default: v1.0.0
steps:
- detect/init
- run:
name: "Install lambroll"
command: |
case $OSD_FAMILY in
linux)
PKG_EXT=tar.gz
EXTRACT="tar zxvf"
;;
darwin)
PKG_EXT=zip
EXTRACT="unzip"
;;
*)
echo "Unsupported operating system. $OSD_FAMILY"
exit 1
;;
esac
mkdir -p /tmp/lambroll-<< parameters.version >>
cd /tmp/lambroll-<< parameters.version >>
DIRNAME=lambroll_<< parameters.version >>_${OSD_FAMILY}_amd64
FILENAME=${DIRNAME}.${PKG_EXT}
FILENAME=${DIRNAME}.tar.gz
LAMBROLL_URL=https://github.com/fujiwara/lambroll/releases/download/<< parameters.version >>/${FILENAME}
curl -L $LAMBROLL_URL > /tmp/${FILENAME}
$EXTRACT /tmp/${FILENAME}
sudo install ${DIRNAME}/lambroll /usr/local/bin
curl -L $LAMBROLL_URL ${FILENAME}
tar zxvf ${FILENAME}
sudo install lambroll /usr/local/bin
examples:
install_lambroll:
Expand Down

0 comments on commit 866ad1b

Please sign in to comment.