notaryproject / notation-action

GitHub Actions for signing and verifying artifacts with Notation

Home Page:https://notaryproject.dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add architecture and platform check in Notation setup

Two-Hearts opened this issue · comments

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}`);
    }
}