notaryproject / notation-action

GitHub Actions for signing and verifying artifacts with Notation
https://notaryproject.dev/
Apache License 2.0
16 stars 7 forks source link

Add architecture and platform check in Notation setup #13

Closed Two-Hearts closed 1 year ago

Two-Hearts commented 1 year ago

For architecture check: https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/about-self-hosted-runners#architectures

For platform check:

function getPlatform(): string {
    const platform: string = os.platform();
    switch (platform) {
        case 'linux':
            return 'linux';
        case 'darwin':
            return 'darwin';
        case 'win32':
            return 'windows';
        default:
            throw new Error(`Unsupported platform: ${platform}`);
    }
}