From 339758d3836c35e87474fcc65a15d49b737e6dae Mon Sep 17 00:00:00 2001 From: Xiaoxuan Wang <103478229+wangxiaoxuan273@users.noreply.github.com> Date: Thu, 6 Jun 2024 11:29:24 +0800 Subject: [PATCH] bump: add oras v1.2.0 to setup-oras (#28) Resolves #29 --------- Signed-off-by: Xiaoxuan Wang --- .github/workflows/test.yml | 2 +- action.yml | 2 +- dist/index.js | 8 +++++- src/lib/data/releases.json | 50 ++++++++++++++++++++++++++++++++++++++ src/lib/release.ts | 8 +++++- 5 files changed, 66 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 110f1e9..ea14efe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,8 +35,8 @@ jobs: matrix: os: [macos-latest, windows-latest, ubuntu-latest] version: - - 1.0.1 - 1.1.0 + - 1.2.0 fail-fast: true steps: - name: Checkout diff --git a/action.yml b/action.yml index a8099c0..710acb8 100644 --- a/action.yml +++ b/action.yml @@ -20,7 +20,7 @@ inputs: version: description: Version of the official ORAS CLI to install required: false - default: 1.1.0 + default: 1.2.0 url: description: URL of the customized ORAS CLI to install required: false diff --git a/dist/index.js b/dist/index.js index 9d20e09..752dde6 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6731,6 +6731,8 @@ function mapPlatform() { return 'darwin'; case 'win32': return 'windows'; + case 'freebsd': + return 'freebsd'; default: throw new Error(`unsupported platform: ${platform}`); } @@ -6746,6 +6748,10 @@ function mapArch() { return 'arm64'; case 'arm64': return 'arm64'; + case 'ppc64': + return 'ppc64le'; + case 'riscv64': + return 'riscv64'; case 's390': return 's390x'; case 'arm': @@ -6984,7 +6990,7 @@ module.exports = require("util"); /***/ ((module) => { "use strict"; -module.exports = JSON.parse('{"1.0.0":{"darwin":{"amd64":{"checksum":"3bce1a83fb518c7bc0afac685601835e5234daa88b3074aafecf768ec80229fe","url":"https://github.com/oras-project/oras/releases/download/v1.0.0/oras_1.0.0_darwin_amd64.tar.gz"},"arm64":{"checksum":"0168a0b8289c202b9dcd57fb4fa3638610245fd5574032e18b1196a20e4100d1","url":"https://github.com/oras-project/oras/releases/download/v1.0.0/oras_1.0.0_darwin_arm64.tar.gz"}},"linux":{"amd64":{"checksum":"8533c9ea1e5a0d5eb1dfc5094c0e8ef106d15462f8a119077548f88937ed2133","url":"https://github.com/oras-project/oras/releases/download/v1.0.0/oras_1.0.0_linux_amd64.tar.gz"},"arm64":{"checksum":"332ba74c043ed590ab0fb61656e6d274243e915cb150d48be4ad64ed591dcc84","url":"https://github.com/oras-project/oras/releases/download/v1.0.0/oras_1.0.0_linux_arm64.tar.gz"},"armv7":{"checksum":"c626893bed0aa26eb37113e11c1bc34552fa213f26af85ef14100a366e6c7c06","url":"https://github.com/oras-project/oras/releases/download/v1.0.0/oras_1.0.0_linux_armv7.tar.gz"},"s390x":{"checksum":"2339f972cbbaa7dc4fed0795c2c37a6124ee524c6e0ed62919c3a0097dd57442","url":"https://github.com/oras-project/oras/releases/download/v1.0.0/oras_1.0.0_linux_s390x.tar.gz"}},"windows":{"amd64":{"checksum":"e47e91fbc72cfe4e5c89321ebc5af953bcafa8a9ecdb0b4fbd53fd136578e03e","url":"https://github.com/oras-project/oras/releases/download/v1.0.0/oras_1.0.0_windows_amd64.zip"}}},"1.0.1":{"darwin":{"amd64":{"checksum":"34f11536dc191f9ad4288649f97ef69b478548f891c932c9732307f064ed3331","url":"https://github.com/oras-project/oras/releases/download/v1.0.1/oras_1.0.1_darwin_amd64.tar.gz"},"arm64":{"checksum":"faa0181799f0e0295d7df188441a1f8869da78a50da4cf7fb03cf35dc746b178","url":"https://github.com/oras-project/oras/releases/download/v1.0.1/oras_1.0.1_darwin_arm64.tar.gz"}},"linux":{"amd64":{"checksum":"6b51b87360d373dd3c19b91d2627d2efd320513380a878b6f06702f72fe8c5ab","url":"https://github.com/oras-project/oras/releases/download/v1.0.1/oras_1.0.1_linux_amd64.tar.gz"},"arm64":{"checksum":"ae1884ae17b7ae7ce694c63d51a52ab0dac1f2c0ca384163455c1e96c5663db0","url":"https://github.com/oras-project/oras/releases/download/v1.0.1/oras_1.0.1_linux_arm64.tar.gz"},"armv7":{"checksum":"f31bc8eab3ed2f368056df3eb5761f40d90dfbd8272bec58d83961f41ebbf3fb","url":"https://github.com/oras-project/oras/releases/download/v1.0.1/oras_1.0.1_linux_armv7.tar.gz"},"s390x":{"checksum":"2a63313a99dd45c448c022a303941e1f5b47b8fdf3493c593b026de384a284b6","url":"https://github.com/oras-project/oras/releases/download/v1.0.1/oras_1.0.1_linux_s390x.tar.gz"}},"windows":{"amd64":{"checksum":"0b9c50eda7aa384d435b31710264d08c77a5e83ee6560ee6e13ca46a6acec1ba","url":"https://github.com/oras-project/oras/releases/download/v1.0.1/oras_1.0.1_windows_amd64.zip"}}},"1.1.0":{"darwin":{"amd64":{"checksum":"f8ac5dea53dd9331cf080f1025f0612e7b07c5af864a4fd609f97d8946508e45","url":"https://github.com/oras-project/oras/releases/download/v1.1.0/oras_1.1.0_darwin_amd64.tar.gz"},"arm64":{"checksum":"d52d3140b0bb9f7d7e31dcbf2a513f971413769c11f7d7a5599e76cc98e45007","url":"https://github.com/oras-project/oras/releases/download/v1.1.0/oras_1.1.0_darwin_arm64.tar.gz"}},"linux":{"amd64":{"checksum":"e09e85323b24ccc8209a1506f142e3d481e6e809018537c6b3db979c891e6ad7","url":"https://github.com/oras-project/oras/releases/download/v1.1.0/oras_1.1.0_linux_amd64.tar.gz"},"arm64":{"checksum":"e450b081f67f6fda2f16b7046075c67c9a53f3fda92fd20ecc59873b10477ab4","url":"https://github.com/oras-project/oras/releases/download/v1.1.0/oras_1.1.0_linux_arm64.tar.gz"},"armv7":{"checksum":"def86e7f787f8deee50bb57d1c155201099f36aa0c6700d3b525e69ddf8ae49b","url":"https://github.com/oras-project/oras/releases/download/v1.1.0/oras_1.1.0_linux_armv7.tar.gz"},"s390x":{"checksum":"067600d61d5d7c23f7bd184cff168ad558d48bed99f6735615bce0e1068b1d77","url":"https://github.com/oras-project/oras/releases/download/v1.1.0/oras_1.1.0_linux_s390x.tar.gz"}},"windows":{"amd64":{"checksum":"2ac83631181d888445e50784a5f760f7f9d97fba3c089e79b68580c496fe68cf","url":"https://github.com/oras-project/oras/releases/download/v1.1.0/oras_1.1.0_windows_amd64.zip"}}}}'); +module.exports = JSON.parse('{"1.0.0":{"darwin":{"amd64":{"checksum":"3bce1a83fb518c7bc0afac685601835e5234daa88b3074aafecf768ec80229fe","url":"https://github.com/oras-project/oras/releases/download/v1.0.0/oras_1.0.0_darwin_amd64.tar.gz"},"arm64":{"checksum":"0168a0b8289c202b9dcd57fb4fa3638610245fd5574032e18b1196a20e4100d1","url":"https://github.com/oras-project/oras/releases/download/v1.0.0/oras_1.0.0_darwin_arm64.tar.gz"}},"linux":{"amd64":{"checksum":"8533c9ea1e5a0d5eb1dfc5094c0e8ef106d15462f8a119077548f88937ed2133","url":"https://github.com/oras-project/oras/releases/download/v1.0.0/oras_1.0.0_linux_amd64.tar.gz"},"arm64":{"checksum":"332ba74c043ed590ab0fb61656e6d274243e915cb150d48be4ad64ed591dcc84","url":"https://github.com/oras-project/oras/releases/download/v1.0.0/oras_1.0.0_linux_arm64.tar.gz"},"armv7":{"checksum":"c626893bed0aa26eb37113e11c1bc34552fa213f26af85ef14100a366e6c7c06","url":"https://github.com/oras-project/oras/releases/download/v1.0.0/oras_1.0.0_linux_armv7.tar.gz"},"s390x":{"checksum":"2339f972cbbaa7dc4fed0795c2c37a6124ee524c6e0ed62919c3a0097dd57442","url":"https://github.com/oras-project/oras/releases/download/v1.0.0/oras_1.0.0_linux_s390x.tar.gz"}},"windows":{"amd64":{"checksum":"e47e91fbc72cfe4e5c89321ebc5af953bcafa8a9ecdb0b4fbd53fd136578e03e","url":"https://github.com/oras-project/oras/releases/download/v1.0.0/oras_1.0.0_windows_amd64.zip"}}},"1.0.1":{"darwin":{"amd64":{"checksum":"34f11536dc191f9ad4288649f97ef69b478548f891c932c9732307f064ed3331","url":"https://github.com/oras-project/oras/releases/download/v1.0.1/oras_1.0.1_darwin_amd64.tar.gz"},"arm64":{"checksum":"faa0181799f0e0295d7df188441a1f8869da78a50da4cf7fb03cf35dc746b178","url":"https://github.com/oras-project/oras/releases/download/v1.0.1/oras_1.0.1_darwin_arm64.tar.gz"}},"linux":{"amd64":{"checksum":"6b51b87360d373dd3c19b91d2627d2efd320513380a878b6f06702f72fe8c5ab","url":"https://github.com/oras-project/oras/releases/download/v1.0.1/oras_1.0.1_linux_amd64.tar.gz"},"arm64":{"checksum":"ae1884ae17b7ae7ce694c63d51a52ab0dac1f2c0ca384163455c1e96c5663db0","url":"https://github.com/oras-project/oras/releases/download/v1.0.1/oras_1.0.1_linux_arm64.tar.gz"},"armv7":{"checksum":"f31bc8eab3ed2f368056df3eb5761f40d90dfbd8272bec58d83961f41ebbf3fb","url":"https://github.com/oras-project/oras/releases/download/v1.0.1/oras_1.0.1_linux_armv7.tar.gz"},"s390x":{"checksum":"2a63313a99dd45c448c022a303941e1f5b47b8fdf3493c593b026de384a284b6","url":"https://github.com/oras-project/oras/releases/download/v1.0.1/oras_1.0.1_linux_s390x.tar.gz"}},"windows":{"amd64":{"checksum":"0b9c50eda7aa384d435b31710264d08c77a5e83ee6560ee6e13ca46a6acec1ba","url":"https://github.com/oras-project/oras/releases/download/v1.0.1/oras_1.0.1_windows_amd64.zip"}}},"1.1.0":{"darwin":{"amd64":{"checksum":"f8ac5dea53dd9331cf080f1025f0612e7b07c5af864a4fd609f97d8946508e45","url":"https://github.com/oras-project/oras/releases/download/v1.1.0/oras_1.1.0_darwin_amd64.tar.gz"},"arm64":{"checksum":"d52d3140b0bb9f7d7e31dcbf2a513f971413769c11f7d7a5599e76cc98e45007","url":"https://github.com/oras-project/oras/releases/download/v1.1.0/oras_1.1.0_darwin_arm64.tar.gz"}},"linux":{"amd64":{"checksum":"e09e85323b24ccc8209a1506f142e3d481e6e809018537c6b3db979c891e6ad7","url":"https://github.com/oras-project/oras/releases/download/v1.1.0/oras_1.1.0_linux_amd64.tar.gz"},"arm64":{"checksum":"e450b081f67f6fda2f16b7046075c67c9a53f3fda92fd20ecc59873b10477ab4","url":"https://github.com/oras-project/oras/releases/download/v1.1.0/oras_1.1.0_linux_arm64.tar.gz"},"armv7":{"checksum":"def86e7f787f8deee50bb57d1c155201099f36aa0c6700d3b525e69ddf8ae49b","url":"https://github.com/oras-project/oras/releases/download/v1.1.0/oras_1.1.0_linux_armv7.tar.gz"},"s390x":{"checksum":"067600d61d5d7c23f7bd184cff168ad558d48bed99f6735615bce0e1068b1d77","url":"https://github.com/oras-project/oras/releases/download/v1.1.0/oras_1.1.0_linux_s390x.tar.gz"}},"windows":{"amd64":{"checksum":"2ac83631181d888445e50784a5f760f7f9d97fba3c089e79b68580c496fe68cf","url":"https://github.com/oras-project/oras/releases/download/v1.1.0/oras_1.1.0_windows_amd64.zip"}}},"1.2.0":{"darwin":{"amd64":{"checksum":"58a8494f5bce778e21d89d90c82e05bd128e7bb9d84dd190d154f8afdbf30541","url":"https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_darwin_amd64.tar.gz"},"arm64":{"checksum":"fea801b0e02c5342e749ef2860e1faebae03e93ae50e33ed40d227e089cf9435","url":"https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_darwin_arm64.tar.gz"}},"freebsd":{"amd64":{"checksum":"73d3a292dce1f0985df084ff50b38ab2deacbcb01902ceebc008d5bea2f2dee9","url":"https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_freebsd_amd64.tar.gz"}},"linux":{"amd64":{"checksum":"5b3f1cbb86d869eee68120b9b45b9be983f3738442f87ee5f06b00edd0bab336","url":"https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_linux_amd64.tar.gz"},"arm64":{"checksum":"27df680a39fc2fcedc549cb737891623bc696c9a92a03fd341e9356a35836bae","url":"https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_linux_arm64.tar.gz"},"armv7":{"checksum":"054685703cb0c66e51f8143e3bbd3976e217d3d595f0593db43b6dd451e43329","url":"https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_linux_armv7.tar.gz"},"ppc64le":{"checksum":"af5ee50434c7263b1460978af83e7690570e8999678fae9db6c5dbb38467fed5","url":"https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_linux_ppc64le.tar.gz"},"riscv64":{"checksum":"42c7e5f35b72492dd3ee7c68edad0c0da939b39e6ead7f682329015b283e96f8","url":"https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_linux_riscv64.tar.gz"},"s390x":{"checksum":"69d2e842e592f4d990b33d58ff3c298c4e4c0921dd54ad9e65e3b6dd9427a750","url":"https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_linux_s390x.tar.gz"}},"windows":{"amd64":{"checksum":"f110b42a20bd4728fb0428d36ee6ed10de58cd986bba8e95ecc4f0272cb017ba","url":"https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_windows_amd64.zip"}}}}'); /***/ }) diff --git a/src/lib/data/releases.json b/src/lib/data/releases.json index 6745131..af8726b 100644 --- a/src/lib/data/releases.json +++ b/src/lib/data/releases.json @@ -106,5 +106,55 @@ "url": "https://github.com/oras-project/oras/releases/download/v1.1.0/oras_1.1.0_windows_amd64.zip" } } + }, + "1.2.0": { + "darwin": { + "amd64": { + "checksum": "58a8494f5bce778e21d89d90c82e05bd128e7bb9d84dd190d154f8afdbf30541", + "url": "https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_darwin_amd64.tar.gz" + }, + "arm64": { + "checksum": "fea801b0e02c5342e749ef2860e1faebae03e93ae50e33ed40d227e089cf9435", + "url": "https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_darwin_arm64.tar.gz" + } + }, + "freebsd": { + "amd64": { + "checksum": "73d3a292dce1f0985df084ff50b38ab2deacbcb01902ceebc008d5bea2f2dee9", + "url": "https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_freebsd_amd64.tar.gz" + } + }, + "linux": { + "amd64": { + "checksum": "5b3f1cbb86d869eee68120b9b45b9be983f3738442f87ee5f06b00edd0bab336", + "url": "https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_linux_amd64.tar.gz" + }, + "arm64": { + "checksum": "27df680a39fc2fcedc549cb737891623bc696c9a92a03fd341e9356a35836bae", + "url": "https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_linux_arm64.tar.gz" + }, + "armv7": { + "checksum": "054685703cb0c66e51f8143e3bbd3976e217d3d595f0593db43b6dd451e43329", + "url": "https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_linux_armv7.tar.gz" + }, + "ppc64le": { + "checksum": "af5ee50434c7263b1460978af83e7690570e8999678fae9db6c5dbb38467fed5", + "url": "https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_linux_ppc64le.tar.gz" + }, + "riscv64": { + "checksum": "42c7e5f35b72492dd3ee7c68edad0c0da939b39e6ead7f682329015b283e96f8", + "url": "https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_linux_riscv64.tar.gz" + }, + "s390x": { + "checksum": "69d2e842e592f4d990b33d58ff3c298c4e4c0921dd54ad9e65e3b6dd9427a750", + "url": "https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_linux_s390x.tar.gz" + } + }, + "windows": { + "amd64": { + "checksum": "f110b42a20bd4728fb0428d36ee6ed10de58cd986bba8e95ecc4f0272cb017ba", + "url": "https://github.com/oras-project/oras/releases/download/v1.2.0/oras_1.2.0_windows_amd64.zip" + } + } } } \ No newline at end of file diff --git a/src/lib/release.ts b/src/lib/release.ts index c67c233..3569306 100644 --- a/src/lib/release.ts +++ b/src/lib/release.ts @@ -71,6 +71,8 @@ export function mapPlatform(): string { return 'darwin'; case 'win32': return 'windows'; + case 'freebsd': + return 'freebsd'; default: throw new Error(`unsupported platform: ${platform}`); } @@ -85,7 +87,11 @@ export function mapArch(): string { case 'arm64': return 'arm64'; case 'arm64': - return 'arm64'; + return 'arm64'; + case 'ppc64': + return 'ppc64le'; + case 'riscv64': + return 'riscv64'; case 's390': return 's390x'; case 'arm':