Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update README to add an example #30

Merged
merged 3 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ steps:
## Advanced Usage

Install a specific version of the `oras` CLI by specifying the input `version` without the prefix `v`.
Supported versions can be found at [`oras` releases](https://github.com/oras-project/oras/releases).
Stable versions (not `beta` or `rc` versions) that can be found at [`oras` releases](https://github.com/oras-project/oras/releases) are supported.
wangxiaoxuan273 marked this conversation as resolved.
Show resolved Hide resolved

For example, install `oras` version `v1.0.0`.

Expand All @@ -31,6 +31,24 @@ steps:
- run: oras version
```

You can also download `oras` CLI from a customized link, by specifying the inputs `url`
wangxiaoxuan273 marked this conversation as resolved.
Show resolved Hide resolved
and `checksum`. This can be used to download a `beta` or `rc` version, or download
wangxiaoxuan273 marked this conversation as resolved.
Show resolved Hide resolved
from a proxy. Both inputs must be provided.
wangxiaoxuan273 marked this conversation as resolved.
Show resolved Hide resolved

When both `url` and `checksum` are provided, the `version` value is ignored and the
download will be from `url` and checked against `checksum`.
wangxiaoxuan273 marked this conversation as resolved.
Show resolved Hide resolved

For example, install `oras` version `v1.2.0-beta.1`.

```yaml
steps:
- uses: oras-project/setup-oras@v1
with:
url: https://github.com/oras-project/oras/releases/download/v1.2.0-beta.1/oras_1.2.0-beta.1_linux_amd64.tar.gz
checksum: 37d86f848f7c7c471035cf8218f06372fd72a9fbdca1e10f509738e222b3b2be
- run: oras version
```

## Docs

Documentation for the ORAS CLI is located on
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ inputs:
required: false
default: 1.2.0
url:
description: URL of the customized ORAS CLI to install
description: URL of the customized ORAS CLI to install. Required if 'checksum' is present.
required: false
checksum:
description: SHA256 of the customized ORAS CLI. Required if 'url' is present.
Expand Down
Loading