From 6b125869724debb218ff0cac40934dd9aa6bbc64 Mon Sep 17 00:00:00 2001 From: Xiaoxuan Wang Date: Thu, 6 Jun 2024 06:39:31 +0000 Subject: [PATCH 1/3] chore: update README to add an example Signed-off-by: Xiaoxuan Wang --- README.md | 20 +++++++++++++++++++- action.yml | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8d25a20..13564a6 100644 --- a/README.md +++ b/README.md @@ -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. For example, install `oras` version `v1.0.0`. @@ -31,6 +31,24 @@ steps: - run: oras version ``` +You can also download `oras` CLI from a customized link, by specifying the inputs `url` +and `checksum`. This can be used to download a `beta` or `rc` version, or download +from a proxy. Both inputs must be provided. + +When both `url` and `checksum` are provided, the `version` value is ignored and the +download will be from `url` and checked against `checksum`. + +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 diff --git a/action.yml b/action.yml index 710acb8..af3b35e 100644 --- a/action.yml +++ b/action.yml @@ -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. From 22433512f41c674948f72ed1fae14df02d7e9079 Mon Sep 17 00:00:00 2001 From: Xiaoxuan Wang Date: Thu, 6 Jun 2024 07:08:56 +0000 Subject: [PATCH 2/3] resolve comments Signed-off-by: Xiaoxuan Wang --- README.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 13564a6..9068f92 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,7 @@ steps: ## Advanced Usage -Install a specific version of the `oras` CLI by specifying the input `version` without the prefix `v`. -Stable versions (not `beta` or `rc` versions) that can be found at [`oras` releases](https://github.com/oras-project/oras/releases) are supported. +Install a specific version of the `oras` CLI by specifying the input `version` without the prefix `v`. Stable versions (not pre-release versions) are supported and can be found at [`oras` releases](https://github.com/oras-project/oras/releases). For example, install `oras` version `v1.0.0`. @@ -31,12 +30,7 @@ steps: - run: oras version ``` -You can also download `oras` CLI from a customized link, by specifying the inputs `url` -and `checksum`. This can be used to download a `beta` or `rc` version, or download -from a proxy. Both inputs must be provided. - -When both `url` and `checksum` are provided, the `version` value is ignored and the -download will be from `url` and checked against `checksum`. +You can also download `oras` CLI from any preferred trusted source, by specifying link of the source via `url` and the SHA256 checksum via `checksum`. This can be used to download a `beta` or `rc` version, or download from a proxy. For example, install `oras` version `v1.2.0-beta.1`. From 25d0661c2fc86925f3d03b1c758a56175647cba3 Mon Sep 17 00:00:00 2001 From: Xiaoxuan Wang Date: Thu, 6 Jun 2024 07:24:42 +0000 Subject: [PATCH 3/3] resolve Signed-off-by: Xiaoxuan Wang --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9068f92..0e3938d 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ steps: - run: oras version ``` -You can also download `oras` CLI from any preferred trusted source, by specifying link of the source via `url` and the SHA256 checksum via `checksum`. This can be used to download a `beta` or `rc` version, or download from a proxy. +You can also download `oras` CLI from any preferred trusted source, by specifying link of the source via `url` and the SHA256 checksum via `checksum`. This can be used to download a pre-release version or download from a proxy other than `github.com`. For example, install `oras` version `v1.2.0-beta.1`.