2024-11-21 18:52:57 +00:00
|
|
|
name: Install pesde
|
|
|
|
description: Installs pesde CLI and authenticates with the registry
|
|
|
|
|
|
|
|
inputs:
|
|
|
|
pesde-token:
|
|
|
|
description: "Token for publishing to the pesde registry"
|
|
|
|
required: false
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: composite
|
|
|
|
steps:
|
|
|
|
- name: Download pesde
|
|
|
|
shell: bash
|
|
|
|
run: |
|
|
|
|
latest_release=$(curl -s https://api.github.com/repos/daimond113/pesde/releases | jq '[.[] | select(.prerelease == true or .prerelease == false)][0]')
|
|
|
|
download_url=$(echo "$latest_release" | jq -r '.assets[] | select(.name | endswith("linux-x86_64.tar.gz")) | .browser_download_url')
|
|
|
|
|
|
|
|
curl -L -o /tmp/pesde.tar.gz "$download_url"
|
|
|
|
tar -xzvf /tmp/pesde.tar.gz
|
|
|
|
chmod +x pesde
|
|
|
|
|
|
|
|
./pesde self-install
|
|
|
|
rm ./pesde
|
|
|
|
echo "$HOME/.pesde/bin" >> $GITHUB_PATH
|
|
|
|
|
|
|
|
- name: Authenticate into pesde registry
|
|
|
|
if: inputs.pesde-token != ''
|
|
|
|
shell: bash
|
2024-11-21 19:06:42 +00:00
|
|
|
run: pesde auth login --token "${{ inputs.pesde-token }}"
|