Skip to content
Open
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
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ Use GitHub Action:
uses: stellar/stellar-cli@v23.0.1
```

When pinning the action to a full commit SHA, use the SHA in `uses` and
set the CLI release version explicitly:

```yaml
uses: stellar/stellar-cli@<full-commit-sha>
with:
version: '23.0.1'
```

Run with Docker:

```sh
Expand Down
12 changes: 8 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ description: "Install the stellar-cli"
inputs:
version:
description: |
Recommended for use only in testing new versions of the action prior to
release. For regular use, use the version of the action corresponding to
the version of the stellar-cli that should be installed.
Stellar CLI release version to install, with or without a leading v.
Defaults to the action's release tag. Set this input when using a commit
SHA or other non-release ref.
required: false
runs:
using: "composite"
Expand All @@ -32,7 +32,11 @@ runs:
id: version
shell: bash
run: |
version=`echo $VERSION | sed 's/v//'`
version="${VERSION#v}"
if [[ ! "$version" =~ ^[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z.-]+)?(\+[0-9A-Za-z.-]+)?$ ]]; then
echo "::error::Set 'with.version' to a Stellar CLI release version (for example, '28.1.0') when using a commit SHA or another non-release ref."
exit 1
fi
echo "using version: $version"
echo "version=$version" >> "$GITHUB_OUTPUT"
env:
Expand Down