diff --git a/CHANGELOG.md b/CHANGELOG.md index a8519b00cd..a02a1940ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - feat: Manage log groups via module. When upgrading you have to import the log groups by AWS into your state. See below the example commands for the default example. + ```bash terraform import module.runners.module.runner_binaries.aws_cloudwatch_log_group.syncer "/aws/lambda/default-syncer" terraform import module.runners.module.runners.aws_cloudwatch_log_group.scale_up "/aws/lambda/default-scale-up" @@ -17,6 +18,8 @@ terraform import module.runners.module.runners.aws_cloudwatch_log_group.scale_do terraform import module.runners.module.webhook.aws_cloudwatch_log_group.webhook "/aws/lambda/default-webhook" ``` +- feat: Added option to binaries syncer to upgrade to prereleases, preventing any auto-updating on startup. Option `runner_allow_prerelease_binaries` is disabled by default. (#141, #165) @sjagoe + ## [0.4.0] - 2020-08-10 ### Added diff --git a/README.md b/README.md index 13dba712bf..b5ee6cf6fa 100644 --- a/README.md +++ b/README.md @@ -301,6 +301,7 @@ No requirements. | minimum\_running\_time\_in\_minutes | The time an ec2 action runner should be running at minimum before terminated if non busy. | `number` | `5` | no | | role\_path | The path that will be added to role path for created roles, if not set the environment name will be used. | `string` | `null` | no | | role\_permissions\_boundary | Permissions boundary that will be added to the created roles. | `string` | `null` | no | +| runner\_allow\_prerelease\_binaries | Allow the runners to update to prerelease binaries. | `bool` | `false` | no | | runner\_as\_root | Run the action runner under the root user. | `bool` | `false` | no | | runner\_binaries\_syncer\_lambda\_timeout | Time out of the binaries sync lambda in seconds. | `number` | `300` | no | | runner\_binaries\_syncer\_lambda\_zip | File location of the binaries sync lambda zip file. | `string` | `null` | no | diff --git a/main.tf b/main.tf index f16e4733db..4b5f60c88e 100644 --- a/main.tf +++ b/main.tf @@ -100,7 +100,8 @@ module "runner_binaries" { distribution_bucket_name = "${var.environment}-dist-${random_string.random.result}" - runner_architecture = substr(var.instance_type, 0, 2) == "a1" || substr(var.instance_type, 1, 2) == "6g" ? "arm64" : "x64" + runner_architecture = substr(var.instance_type, 0, 2) == "a1" || substr(var.instance_type, 1, 2) == "6g" ? "arm64" : "x64" + runner_allow_prerelease_binaries = var.runner_allow_prerelease_binaries lambda_zip = var.runner_binaries_syncer_lambda_zip lambda_timeout = var.runner_binaries_syncer_lambda_timeout diff --git a/modules/download-lambda/README.md b/modules/download-lambda/README.md index fad65c4e17..277e769bbd 100644 --- a/modules/download-lambda/README.md +++ b/modules/download-lambda/README.md @@ -25,18 +25,27 @@ module "lambdas" { ``` +## Requirements + +No requirements. + +## Providers + +| Name | Version | +|------|---------| +| null | n/a | ## Inputs -| Name | Description | Type | Default | Required | -| ------- | ------------------------------------- | :----: | :-----: | :------: | -| lambdas | Name and tag for lambdas to download. | object | n/a | yes | +| Name | Description | Type | Default | Required | +|------|-------------|------|---------|:--------:| +| lambdas | Name and tag for lambdas to download. |
list(object({
name = string
tag = string
}))
| n/a | yes | ## Outputs -| Name | Description | -| ----- | ----------- | -| files | | +| Name | Description | +|------|-------------| +| files | n/a | diff --git a/modules/runner-binaries-syncer/README.md b/modules/runner-binaries-syncer/README.md index 6ef83741f0..c124de8863 100644 --- a/modules/runner-binaries-syncer/README.md +++ b/modules/runner-binaries-syncer/README.md @@ -57,6 +57,7 @@ No requirements. | logging\_retention\_in\_days | Specifies the number of days you want to retain log events for the lambda log group. Possible values are: 0, 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, and 3653. | `number` | `7` | no | | role\_path | The path that will be added to the role, if not set the environment name will be used. | `string` | `null` | no | | role\_permissions\_boundary | Permissions boundary that will be added to the created role for the lambda. | `string` | `null` | no | +| runner\_allow\_prerelease\_binaries | Allow the runners to update to prerelease binaries. | `bool` | `false` | no | | runner\_architecture | The platform architecture for the runner instance (x64, arm64), defaults to 'x64' | `string` | `"x64"` | no | | tags | Map of tags that will be added to created resources. By default resources will be tagged with name and environment. | `map(string)` | `{}` | no | diff --git a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/package.json b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/package.json index 2caa8e0f44..ad08c2fbb7 100644 --- a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/package.json +++ b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/package.json @@ -26,5 +26,8 @@ "ts-jest": "^26.2.0", "ts-node-dev": "^1.0.0-pre.60", "typescript": "^3.9.6" + }, + "dependencies": { + "yn": "^4.0.0" } } diff --git a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/src/lambda.ts b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/src/lambda.ts index 9a33e6cbd6..fce0353d69 100644 --- a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/src/lambda.ts +++ b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/src/lambda.ts @@ -1,5 +1,6 @@ import { handle } from './syncer/handler'; +// eslint-disable-next-line module.exports.handler = async (event: any, context: any, callback: any): Promise => { await handle(); return callback(); diff --git a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/src/syncer/handler.test.ts b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/src/syncer/handler.test.ts index cdb4c4932f..34f923f952 100644 --- a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/src/syncer/handler.test.ts +++ b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/src/syncer/handler.test.ts @@ -1,12 +1,12 @@ import { handle } from './handler'; -import latestReleases from '../../test/resources/github-latest-releases.json'; -import latestReleasesEmpty from '../../test/resources/github-latest-releases-empty.json'; -import latestReleasesNoLinux from '../../test/resources/github-latest-releases-no-linux.json'; -import latestReleasesNoArm64 from '../../test/resources/github-latest-releases-no-arm64.json'; +import listReleases from '../../test/resources/github-list-releases.json'; +import listReleasesEmpty from '../../test/resources/github-list-releases-empty-assets.json'; +import listReleasesNoLinux from '../../test/resources/github-list-releases-no-linux.json'; +import listReleasesNoArm64 from '../../test/resources/github-list-releases-no-arm64.json'; const mockOctokit = { repos: { - getLatestRelease: jest.fn(), + listReleases: jest.fn(), }, }; jest.mock('@octokit/rest', () => ({ @@ -31,23 +31,24 @@ describe('Synchronize action distribution.', () => { beforeEach(() => { process.env.S3_BUCKET_NAME = bucketName; process.env.S3_OBJECT_KEY = bucketObjectKey; + process.env.GITHUB_RUNNER_ALLOW_PRERELEASE_BINARIES = 'false'; - mockOctokit.repos.getLatestRelease.mockImplementation(() => ({ - data: latestReleases.data, + mockOctokit.repos.listReleases.mockImplementation(() => ({ + data: listReleases, })); }); - it('Distribution is up-to-date.', async () => { + it('Distribution is up-to-date with latest release.', async () => { mockS3.getObjectTagging.mockImplementation(() => { return { promise() { - return Promise.resolve({ TagSet: [{ Key: 'name', Value: 'actions-runner-linux-x64-2.262.1.tar.gz' }] }); + return Promise.resolve({ TagSet: [{ Key: 'name', Value: 'actions-runner-linux-x64-2.272.0.tar.gz' }] }); }, }; }); await handle(); - expect(mockOctokit.repos.getLatestRelease).toBeCalledTimes(1); + expect(mockOctokit.repos.listReleases).toBeCalledTimes(1); expect(mockS3.getObjectTagging).toBeCalledWith({ Bucket: bucketName, Key: bucketObjectKey, @@ -55,7 +56,26 @@ describe('Synchronize action distribution.', () => { expect(mockS3.upload).toBeCalledTimes(0); }); - it('Distribution should update.', async () => { + it('Distribution is up-to-date with latest prerelease.', async () => { + process.env.GITHUB_RUNNER_ALLOW_PRERELEASE_BINARIES = 'true'; + mockS3.getObjectTagging.mockImplementation(() => { + return { + promise() { + return Promise.resolve({ TagSet: [{ Key: 'name', Value: 'actions-runner-linux-x64-2.273.0.tar.gz' }] }); + }, + }; + }); + + await handle(); + expect(mockOctokit.repos.listReleases).toBeCalledTimes(1); + expect(mockS3.getObjectTagging).toBeCalledWith({ + Bucket: bucketName, + Key: bucketObjectKey, + }); + expect(mockS3.upload).toBeCalledTimes(0); + }); + + it('Distribution should update to release.', async () => { mockS3.getObjectTagging.mockImplementation(() => { return { promise() { @@ -65,12 +85,63 @@ describe('Synchronize action distribution.', () => { }); await handle(); - expect(mockOctokit.repos.getLatestRelease).toBeCalledTimes(1); + expect(mockOctokit.repos.listReleases).toBeCalledTimes(1); expect(mockS3.getObjectTagging).toBeCalledWith({ Bucket: bucketName, Key: bucketObjectKey, }); expect(mockS3.upload).toBeCalledTimes(1); + const s3JsonBody = mockS3.upload.mock.calls[0][0]; + expect(s3JsonBody['Tagging']).toEqual('name=actions-runner-linux-x64-2.272.0.tar.gz'); + }); + + it('Distribution should update to prerelease.', async () => { + process.env.GITHUB_RUNNER_ALLOW_PRERELEASE_BINARIES = 'true'; + mockS3.getObjectTagging.mockImplementation(() => { + return { + promise() { + return Promise.resolve({ TagSet: [{ Key: 'name', Value: 'actions-runner-linux-x64-0.tar.gz' }] }); + }, + }; + }); + + await handle(); + expect(mockOctokit.repos.listReleases).toBeCalledTimes(1); + expect(mockS3.getObjectTagging).toBeCalledWith({ + Bucket: bucketName, + Key: bucketObjectKey, + }); + expect(mockS3.upload).toBeCalledTimes(1); + const s3JsonBody = mockS3.upload.mock.calls[0][0]; + expect(s3JsonBody['Tagging']).toEqual('name=actions-runner-linux-x64-2.273.0.tar.gz'); + }); + + it('Distribution should not update to prerelease if there is a newer release.', async () => { + process.env.GITHUB_RUNNER_ALLOW_PRERELEASE_BINARIES = 'true'; + const releases = listReleases; + releases[0].prerelease = false; + releases[1].prerelease = true; + + mockOctokit.repos.listReleases.mockImplementation(() => ({ + data: releases, + })); + mockS3.getObjectTagging.mockImplementation(() => { + return { + promise() { + return Promise.resolve({ TagSet: [{ Key: 'name', Value: 'actions-runner-linux-x64-0.tar.gz' }] }); + }, + }; + }); + + await handle(); + expect(mockOctokit.repos.listReleases).toBeCalledTimes(1); + expect(mockS3.getObjectTagging).toBeCalledWith({ + Bucket: bucketName, + Key: bucketObjectKey, + }); + expect(mockS3.upload).toBeCalledTimes(1); + const s3JsonBody = mockS3.upload.mock.calls[0][0]; + expect(s3JsonBody['Tagging']).toEqual('name=actions-runner-linux-x64-2.273.0.tar.gz'); }); it('No tag in S3, distribution should update.', async () => { @@ -83,7 +154,7 @@ describe('Synchronize action distribution.', () => { }); await handle(); - expect(mockOctokit.repos.getLatestRelease).toBeCalledTimes(1); + expect(mockOctokit.repos.listReleases).toBeCalledTimes(1); expect(mockS3.getObjectTagging).toBeCalledWith({ Bucket: bucketName, Key: bucketObjectKey, @@ -101,7 +172,7 @@ describe('Synchronize action distribution.', () => { }); await handle(); - expect(mockOctokit.repos.getLatestRelease).toBeCalledTimes(1); + expect(mockOctokit.repos.listReleases).toBeCalledTimes(1); expect(mockS3.getObjectTagging).toBeCalledWith({ Bucket: bucketName, Key: bucketObjectKey, @@ -118,16 +189,16 @@ describe('No release assets found.', () => { }); it('Empty list of assets.', async () => { - mockOctokit.repos.getLatestRelease.mockImplementation(() => ({ - data: latestReleasesEmpty.data, + mockOctokit.repos.listReleases.mockImplementation(() => ({ + data: listReleasesEmpty, })); await expect(handle()).rejects.toThrow(errorMessage); }); it('No linux x64 asset.', async () => { - mockOctokit.repos.getLatestRelease.mockImplementation(() => ({ - data: latestReleasesNoLinux.data, + mockOctokit.repos.listReleases.mockImplementation(() => ({ + data: [listReleasesNoLinux], })); await expect(handle()).rejects.toThrow(errorMessage); @@ -154,18 +225,18 @@ describe('Invalid config', () => { }); describe('Synchronize action distribution for arm64.', () => { - const errorMessage = 'Cannot find GitHub release asset.'; - beforeEach(() => { - process.env.S3_BUCKET_NAME = bucketName; - process.env.S3_OBJECT_KEY = bucketObjectKey; - process.env.GITHUB_RUNNER_ARCHITECTURE = 'arm64'; - }); - - it('No linux arm64 asset.', async () => { - mockOctokit.repos.getLatestRelease.mockImplementation(() => ({ - data: latestReleasesNoArm64.data, - })); - - await expect(handle()).rejects.toThrow(errorMessage); - }); + const errorMessage = 'Cannot find GitHub release asset.'; + beforeEach(() => { + process.env.S3_BUCKET_NAME = bucketName; + process.env.S3_OBJECT_KEY = bucketObjectKey; + process.env.GITHUB_RUNNER_ARCHITECTURE = 'arm64'; + }); + + it('No linux arm64 asset.', async () => { + mockOctokit.repos.listReleases.mockImplementation(() => ({ + data: [listReleasesNoArm64], + })); + + await expect(handle()).rejects.toThrow(errorMessage); + }); }); diff --git a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/src/syncer/handler.ts b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/src/syncer/handler.ts index 2c002fa96f..721812f263 100644 --- a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/src/syncer/handler.ts +++ b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/src/syncer/handler.ts @@ -3,6 +3,7 @@ import { PassThrough } from 'stream'; import request from 'request'; import { S3 } from 'aws-sdk'; import AWS from 'aws-sdk'; +import yn from 'yn'; const versionKey = 'name'; @@ -31,13 +32,31 @@ interface ReleaseAsset { downloadUrl: string; } -async function getLinuxReleaseAsset(runnerArch = 'x64'): Promise { +async function getLinuxReleaseAsset( + runnerArch = 'x64', + fetchPrereleaseBinaries = false, +): Promise { const githubClient = new Octokit(); - const assets = await githubClient.repos.getLatestRelease({ + const assetsList = await githubClient.repos.listReleases({ owner: 'actions', repo: 'runner', }); - const linuxAssets = assets.data.assets?.filter((a) => a.name?.includes(`actions-runner-linux-${runnerArch}-`)); + if (assetsList.data?.length === 0) { + return undefined; + } + + const latestPrereleaseIndex = assetsList.data.findIndex((a) => a.prerelease === true); + const latestReleaseIndex = assetsList.data.findIndex((a) => a.prerelease === false); + + let asset = undefined; + if (fetchPrereleaseBinaries && latestPrereleaseIndex < latestReleaseIndex) { + asset = assetsList.data[latestPrereleaseIndex]; + } else if (latestReleaseIndex != -1) { + asset = assetsList.data[latestReleaseIndex]; + } else { + return undefined; + } + const linuxAssets = asset.assets?.filter((a) => a.name?.includes(`actions-runner-linux-${runnerArch}-`)); return linuxAssets?.length === 1 ? { name: linuxAssets[0].name, downloadUrl: linuxAssets[0].browser_download_url } @@ -73,7 +92,8 @@ async function uploadToS3(s3: S3, cacheObject: CacheObject, actionRunnerReleaseA export const handle = async (): Promise => { const s3 = new AWS.S3(); - const runnerArch = process.env.GITHUB_RUNNER_ARCHITECTURE || 'x64' + const runnerArch = process.env.GITHUB_RUNNER_ARCHITECTURE || 'x64'; + const fetchPrereleaseBinaries = yn(process.env.GITHUB_RUNNER_ALLOW_PRERELEASE_BINARIES, { default: false }); const cacheObject: CacheObject = { bucket: process.env.S3_BUCKET_NAME as string, @@ -83,7 +103,7 @@ export const handle = async (): Promise => { throw Error('Please check all mandatory variables are set.'); } - const actionRunnerReleaseAsset = await getLinuxReleaseAsset(runnerArch); + const actionRunnerReleaseAsset = await getLinuxReleaseAsset(runnerArch, fetchPrereleaseBinaries); if (actionRunnerReleaseAsset === undefined) { throw Error('Cannot find GitHub release asset.'); } diff --git a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-latest-releases-empty.json b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-latest-releases-empty.json deleted file mode 100644 index 8dc82115b8..0000000000 --- a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-latest-releases-empty.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "status": 200, - "url": "https://api.github.com/repos/actions/runner/releases/latest", - "data": { - "tag_name": "v2.262.1", - "name": "v2.262.1" - } -} diff --git a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-latest-releases-no-arm64.json b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-latest-releases-no-arm64.json deleted file mode 100644 index aded728cc2..0000000000 --- a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-latest-releases-no-arm64.json +++ /dev/null @@ -1,146 +0,0 @@ -{ - "status": 200, - "url": "https://api.github.com/repos/actions/runner/releases/latest", - "data": { - "tag_name": "v2.262.1", - "name": "v2.262.1", - "assets": [ - { - "url": "https://api.github.com/repos/actions/runner/releases/assets/20667279", - "id": 20667279, - "node_id": "MDEyOlJlbGVhc2VBc3NldDIwNjY3Mjc5", - "name": "actions-runner-linux-arm-2.262.1.tar.gz", - "label": "", - "uploader": { - "login": "github-actions[bot]", - "id": 41898282, - "node_id": "MDM6Qm90NDE4OTgyODI=", - "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/github-actions%5Bbot%5D", - "html_url": "https://github.com/apps/github-actions", - "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", - "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", - "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", - "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", - "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", - "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", - "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", - "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", - "type": "Bot", - "site_admin": false - }, - "content_type": "application/octet-stream", - "state": "uploaded", - "size": 56141391, - "download_count": 89, - "created_at": "2020-05-12T20:31:04Z", - "updated_at": "2020-05-12T20:31:05Z", - "browser_download_url": "https://github.com/actions/runner/releases/download/v2.262.1/actions-runner-linux-arm-2.262.1.tar.gz" - }, - { - "url": "https://api.github.com/repos/actions/runner/releases/assets/20667270", - "id": 20667270, - "node_id": "MDEyOlJlbGVhc2VBc3NldDIwNjY3Mjcw", - "name": "actions-runner-linux-x64-2.262.1.tar.gz", - "label": "", - "uploader": { - "login": "github-actions[bot]", - "id": 41898282, - "node_id": "MDM6Qm90NDE4OTgyODI=", - "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/github-actions%5Bbot%5D", - "html_url": "https://github.com/apps/github-actions", - "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", - "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", - "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", - "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", - "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", - "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", - "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", - "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", - "type": "Bot", - "site_admin": false - }, - "content_type": "application/octet-stream", - "state": "uploaded", - "size": 75512630, - "download_count": 4945, - "created_at": "2020-05-12T20:30:45Z", - "updated_at": "2020-05-12T20:30:53Z", - "browser_download_url": "https://github.com/actions/runner/releases/download/v2.262.1/actions-runner-linux-x64-2.262.1.tar.gz" - }, - { - "url": "https://api.github.com/repos/actions/runner/releases/assets/20667275", - "id": 20667275, - "node_id": "MDEyOlJlbGVhc2VBc3NldDIwNjY3Mjc1", - "name": "actions-runner-osx-x64-2.262.1.tar.gz", - "label": "", - "uploader": { - "login": "github-actions[bot]", - "id": 41898282, - "node_id": "MDM6Qm90NDE4OTgyODI=", - "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/github-actions%5Bbot%5D", - "html_url": "https://github.com/apps/github-actions", - "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", - "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", - "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", - "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", - "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", - "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", - "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", - "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", - "type": "Bot", - "site_admin": false - }, - "content_type": "application/octet-stream", - "state": "uploaded", - "size": 52602524, - "download_count": 649, - "created_at": "2020-05-12T20:30:53Z", - "updated_at": "2020-05-12T20:31:03Z", - "browser_download_url": "https://github.com/actions/runner/releases/download/v2.262.1/actions-runner-osx-x64-2.262.1.tar.gz" - }, - { - "url": "https://api.github.com/repos/actions/runner/releases/assets/20667267", - "id": 20667267, - "node_id": "MDEyOlJlbGVhc2VBc3NldDIwNjY3MjY3", - "name": "actions-runner-win-x64-2.262.1.zip", - "label": "", - "uploader": { - "login": "github-actions[bot]", - "id": 41898282, - "node_id": "MDM6Qm90NDE4OTgyODI=", - "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/github-actions%5Bbot%5D", - "html_url": "https://github.com/apps/github-actions", - "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", - "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", - "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", - "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", - "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", - "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", - "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", - "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", - "type": "Bot", - "site_admin": false - }, - "content_type": "application/octet-stream", - "state": "uploaded", - "size": 46812907, - "download_count": 674, - "created_at": "2020-05-12T20:30:42Z", - "updated_at": "2020-05-12T20:30:44Z", - "browser_download_url": "https://github.com/actions/runner/releases/download/v2.262.1/actions-runner-win-x64-2.262.1.zip" - } - ] - } -} diff --git a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-latest-releases-no-linux.json b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-latest-releases-no-linux.json deleted file mode 100644 index 860ce69166..0000000000 --- a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-latest-releases-no-linux.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "status": 200, - "url": "https://api.github.com/repos/actions/runner/releases/latest", - "data": { - "tag_name": "v2.262.1", - "name": "v2.262.1", - "assets": [ - { - "url": "https://api.github.com/repos/actions/runner/releases/assets/20667282", - "id": 20667282, - "node_id": "MDEyOlJlbGVhc2VBc3NldDIwNjY3Mjgy", - "name": "actions-runner-linux-arm64-2.262.1.tar.gz", - "label": "", - "uploader": { - "login": "github-actions[bot]", - "id": 41898282, - "node_id": "MDM6Qm90NDE4OTgyODI=", - "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/github-actions%5Bbot%5D", - "html_url": "https://github.com/apps/github-actions", - "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", - "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", - "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", - "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", - "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", - "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", - "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", - "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", - "type": "Bot", - "site_admin": false - }, - "content_type": "application/octet-stream", - "state": "uploaded", - "size": 56132927, - "download_count": 258, - "created_at": "2020-05-12T20:31:06Z", - "updated_at": "2020-05-12T20:31:08Z", - "browser_download_url": "https://github.com/actions/runner/releases/download/v2.262.1/actions-runner-linux-arm64-2.262.1.tar.gz" - }, - { - "url": "https://api.github.com/repos/actions/runner/releases/assets/20667275", - "id": 20667275, - "node_id": "MDEyOlJlbGVhc2VBc3NldDIwNjY3Mjc1", - "name": "actions-runner-osx-x64-2.262.1.tar.gz", - "label": "", - "uploader": { - "login": "github-actions[bot]", - "id": 41898282, - "node_id": "MDM6Qm90NDE4OTgyODI=", - "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/github-actions%5Bbot%5D", - "html_url": "https://github.com/apps/github-actions", - "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", - "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", - "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", - "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", - "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", - "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", - "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", - "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", - "type": "Bot", - "site_admin": false - }, - "content_type": "application/octet-stream", - "state": "uploaded", - "size": 52602524, - "download_count": 649, - "created_at": "2020-05-12T20:30:53Z", - "updated_at": "2020-05-12T20:31:03Z", - "browser_download_url": "https://github.com/actions/runner/releases/download/v2.262.1/actions-runner-osx-x64-2.262.1.tar.gz" - }, - { - "url": "https://api.github.com/repos/actions/runner/releases/assets/20667267", - "id": 20667267, - "node_id": "MDEyOlJlbGVhc2VBc3NldDIwNjY3MjY3", - "name": "actions-runner-win-x64-2.262.1.zip", - "label": "", - "uploader": { - "login": "github-actions[bot]", - "id": 41898282, - "node_id": "MDM6Qm90NDE4OTgyODI=", - "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/github-actions%5Bbot%5D", - "html_url": "https://github.com/apps/github-actions", - "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", - "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", - "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", - "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", - "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", - "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", - "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", - "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", - "type": "Bot", - "site_admin": false - }, - "content_type": "application/octet-stream", - "state": "uploaded", - "size": 46812907, - "download_count": 674, - "created_at": "2020-05-12T20:30:42Z", - "updated_at": "2020-05-12T20:30:44Z", - "browser_download_url": "https://github.com/actions/runner/releases/download/v2.262.1/actions-runner-win-x64-2.262.1.zip" - } - ] - } -} diff --git a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-latest-releases.json b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-latest-releases.json deleted file mode 100644 index edd71f3aa1..0000000000 --- a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-latest-releases.json +++ /dev/null @@ -1,180 +0,0 @@ -{ - "status": 200, - "url": "https://api.github.com/repos/actions/runner/releases/latest", - "data": { - "tag_name": "v2.262.1", - "name": "v2.262.1", - "assets": [ - { - "url": "https://api.github.com/repos/actions/runner/releases/assets/20667279", - "id": 20667279, - "node_id": "MDEyOlJlbGVhc2VBc3NldDIwNjY3Mjc5", - "name": "actions-runner-linux-arm-2.262.1.tar.gz", - "label": "", - "uploader": { - "login": "github-actions[bot]", - "id": 41898282, - "node_id": "MDM6Qm90NDE4OTgyODI=", - "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/github-actions%5Bbot%5D", - "html_url": "https://github.com/apps/github-actions", - "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", - "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", - "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", - "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", - "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", - "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", - "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", - "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", - "type": "Bot", - "site_admin": false - }, - "content_type": "application/octet-stream", - "state": "uploaded", - "size": 56141391, - "download_count": 89, - "created_at": "2020-05-12T20:31:04Z", - "updated_at": "2020-05-12T20:31:05Z", - "browser_download_url": "https://github.com/actions/runner/releases/download/v2.262.1/actions-runner-linux-arm-2.262.1.tar.gz" - }, - { - "url": "https://api.github.com/repos/actions/runner/releases/assets/20667282", - "id": 20667282, - "node_id": "MDEyOlJlbGVhc2VBc3NldDIwNjY3Mjgy", - "name": "actions-runner-linux-arm64-2.262.1.tar.gz", - "label": "", - "uploader": { - "login": "github-actions[bot]", - "id": 41898282, - "node_id": "MDM6Qm90NDE4OTgyODI=", - "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/github-actions%5Bbot%5D", - "html_url": "https://github.com/apps/github-actions", - "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", - "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", - "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", - "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", - "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", - "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", - "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", - "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", - "type": "Bot", - "site_admin": false - }, - "content_type": "application/octet-stream", - "state": "uploaded", - "size": 56132927, - "download_count": 258, - "created_at": "2020-05-12T20:31:06Z", - "updated_at": "2020-05-12T20:31:08Z", - "browser_download_url": "https://github.com/actions/runner/releases/download/v2.262.1/actions-runner-linux-arm64-2.262.1.tar.gz" - }, - { - "url": "https://api.github.com/repos/actions/runner/releases/assets/20667270", - "id": 20667270, - "node_id": "MDEyOlJlbGVhc2VBc3NldDIwNjY3Mjcw", - "name": "actions-runner-linux-x64-2.262.1.tar.gz", - "label": "", - "uploader": { - "login": "github-actions[bot]", - "id": 41898282, - "node_id": "MDM6Qm90NDE4OTgyODI=", - "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/github-actions%5Bbot%5D", - "html_url": "https://github.com/apps/github-actions", - "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", - "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", - "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", - "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", - "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", - "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", - "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", - "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", - "type": "Bot", - "site_admin": false - }, - "content_type": "application/octet-stream", - "state": "uploaded", - "size": 75512630, - "download_count": 4945, - "created_at": "2020-05-12T20:30:45Z", - "updated_at": "2020-05-12T20:30:53Z", - "browser_download_url": "https://github.com/actions/runner/releases/download/v2.262.1/actions-runner-linux-x64-2.262.1.tar.gz" - }, - { - "url": "https://api.github.com/repos/actions/runner/releases/assets/20667275", - "id": 20667275, - "node_id": "MDEyOlJlbGVhc2VBc3NldDIwNjY3Mjc1", - "name": "actions-runner-osx-x64-2.262.1.tar.gz", - "label": "", - "uploader": { - "login": "github-actions[bot]", - "id": 41898282, - "node_id": "MDM6Qm90NDE4OTgyODI=", - "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/github-actions%5Bbot%5D", - "html_url": "https://github.com/apps/github-actions", - "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", - "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", - "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", - "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", - "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", - "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", - "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", - "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", - "type": "Bot", - "site_admin": false - }, - "content_type": "application/octet-stream", - "state": "uploaded", - "size": 52602524, - "download_count": 649, - "created_at": "2020-05-12T20:30:53Z", - "updated_at": "2020-05-12T20:31:03Z", - "browser_download_url": "https://github.com/actions/runner/releases/download/v2.262.1/actions-runner-osx-x64-2.262.1.tar.gz" - }, - { - "url": "https://api.github.com/repos/actions/runner/releases/assets/20667267", - "id": 20667267, - "node_id": "MDEyOlJlbGVhc2VBc3NldDIwNjY3MjY3", - "name": "actions-runner-win-x64-2.262.1.zip", - "label": "", - "uploader": { - "login": "github-actions[bot]", - "id": 41898282, - "node_id": "MDM6Qm90NDE4OTgyODI=", - "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", - "gravatar_id": "", - "url": "https://api.github.com/users/github-actions%5Bbot%5D", - "html_url": "https://github.com/apps/github-actions", - "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", - "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", - "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", - "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", - "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", - "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", - "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", - "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", - "type": "Bot", - "site_admin": false - }, - "content_type": "application/octet-stream", - "state": "uploaded", - "size": 46812907, - "download_count": 674, - "created_at": "2020-05-12T20:30:42Z", - "updated_at": "2020-05-12T20:30:44Z", - "browser_download_url": "https://github.com/actions/runner/releases/download/v2.262.1/actions-runner-win-x64-2.262.1.zip" - } - ] - } -} diff --git a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-list-releases-empty-assets.json b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-list-releases-empty-assets.json new file mode 100644 index 0000000000..4d70665d84 --- /dev/null +++ b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-list-releases-empty-assets.json @@ -0,0 +1,41 @@ +[ + { + "url": "https://api.github.com/repos/actions/runner/releases/29868800", + "assets_url": "https://api.github.com/repos/actions/runner/releases/29868800/assets", + "upload_url": "https://uploads.github.com/repos/actions/runner/releases/29868800/assets{?name,label}", + "html_url": "https://github.com/actions/runner/releases/tag/v2.273.0", + "id": 29868800, + "node_id": "MDc6UmVsZWFzZTI5ODY4ODAw", + "tag_name": "v2.273.0", + "target_commitish": "1d68b0448c8b517e82c7eebbc4f226e6ed088e3d", + "name": "v2.273.0", + "draft": false, + "author": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "prerelease": false, + "created_at": "2020-08-19T14:47:07Z", + "published_at": "2020-08-19T14:52:48Z", + "assets": [], + "tarball_url": "https://api.github.com/repos/actions/runner/tarball/v2.273.0", + "zipball_url": "https://api.github.com/repos/actions/runner/zipball/v2.273.0", + "body": "## Features\r\n - Continued improvements to Composite Actions code and documentation (#616, #625, #626, #641, #645, #657, #658)\r\n\r\n## Bugs\r\n - Fix feature flag check; omit context for generated context names (#638)\r\n - Fix endgroup maker (#640)\r\n\r\n## Misc\r\n - Adding help text for the new runnergroup feature (#626)\r\n - Updating virtual environment terminology in readme.md (#651)\r\n\r\n## Windows x64\r\nWe recommend configuring the runner in a root folder of the Windows drive (e.g. \"C:\\actions-runner\"). This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows.\r\n\r\nThe following snipped needs to be run on `powershell`:\r\n``` powershell\r\n# Create a folder under the drive root\r\nmkdir \\actions-runner ; cd \\actions-runner\r\n# Download the latest runner package\r\nInvoke-WebRequest -Uri https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-win-x64-2.273.0.zip -OutFile actions-runner-win-x64-2.273.0.zip\r\n# Extract the installer\r\nAdd-Type -AssemblyName System.IO.Compression.FileSystem ; \r\n[System.IO.Compression.ZipFile]::ExtractToDirectory(\"$PWD\\actions-runner-win-x64-2.273.0.zip\", \"$PWD\")\r\n```\r\n\r\n## OSX\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-osx-x64-2.273.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-osx-x64-2.273.0.tar.gz\r\n```\r\n\r\n## Linux x64\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-linux-x64-2.273.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-x64-2.273.0.tar.gz\r\n```\r\n\r\n## Linux arm64 (Pre-release)\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-linux-arm64-2.273.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-arm64-2.273.0.tar.gz\r\n```\r\n\r\n## Linux arm (Pre-release)\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-linux-arm-2.273.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-arm-2.273.0.tar.gz\r\n```\r\n\r\n## Using your self hosted runner\r\nFor additional details about configuring, running, or shutting down the runner please check out our [product docs.](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/adding-self-hosted-runners)" + } +] diff --git a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-list-releases-no-arm64.json b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-list-releases-no-arm64.json new file mode 100644 index 0000000000..338bbe10c7 --- /dev/null +++ b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-list-releases-no-arm64.json @@ -0,0 +1,388 @@ +[ + { + "url": "https://api.github.com/repos/actions/runner/releases/29868800", + "assets_url": "https://api.github.com/repos/actions/runner/releases/29868800/assets", + "upload_url": "https://uploads.github.com/repos/actions/runner/releases/29868800/assets{?name,label}", + "html_url": "https://github.com/actions/runner/releases/tag/v2.273.0", + "id": 29868800, + "node_id": "MDc6UmVsZWFzZTI5ODY4ODAw", + "tag_name": "v2.273.0", + "target_commitish": "1d68b0448c8b517e82c7eebbc4f226e6ed088e3d", + "name": "v2.273.0", + "draft": false, + "author": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "prerelease": true, + "created_at": "2020-08-19T14:47:07Z", + "published_at": "2020-08-19T14:52:48Z", + "assets": [ + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/24086217", + "id": 24086217, + "node_id": "MDEyOlJlbGVhc2VBc3NldDI0MDg2MjE3", + "name": "actions-runner-linux-arm-2.273.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 56188191, + "download_count": 63, + "created_at": "2020-08-19T14:52:54Z", + "updated_at": "2020-08-19T14:52:56Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-linux-arm-2.273.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/24086215", + "id": 24086215, + "node_id": "MDEyOlJlbGVhc2VBc3NldDI0MDg2MjE1", + "name": "actions-runner-linux-x64-2.273.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 75556117, + "download_count": 5913, + "created_at": "2020-08-19T14:52:51Z", + "updated_at": "2020-08-19T14:52:52Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-linux-x64-2.273.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/24086216", + "id": 24086216, + "node_id": "MDEyOlJlbGVhc2VBc3NldDI0MDg2MjE2", + "name": "actions-runner-osx-x64-2.273.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 52630785, + "download_count": 2717, + "created_at": "2020-08-19T14:52:53Z", + "updated_at": "2020-08-19T14:52:54Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-osx-x64-2.273.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/24086212", + "id": 24086212, + "node_id": "MDEyOlJlbGVhc2VBc3NldDI0MDg2MjEy", + "name": "actions-runner-win-x64-2.273.0.zip", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 46839054, + "download_count": 496, + "created_at": "2020-08-19T14:52:49Z", + "updated_at": "2020-08-19T14:52:50Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-win-x64-2.273.0.zip" + } + ], + "tarball_url": "https://api.github.com/repos/actions/runner/tarball/v2.273.0", + "zipball_url": "https://api.github.com/repos/actions/runner/zipball/v2.273.0", + "body": "## Features\r\n - Continued improvements to Composite Actions code and documentation (#616, #625, #626, #641, #645, #657, #658)\r\n\r\n## Bugs\r\n - Fix feature flag check; omit context for generated context names (#638)\r\n - Fix endgroup maker (#640)\r\n\r\n## Misc\r\n - Adding help text for the new runnergroup feature (#626)\r\n - Updating virtual environment terminology in readme.md (#651)\r\n\r\n## Windows x64\r\nWe recommend configuring the runner in a root folder of the Windows drive (e.g. \"C:\\actions-runner\"). This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows.\r\n\r\nThe following snipped needs to be run on `powershell`:\r\n``` powershell\r\n# Create a folder under the drive root\r\nmkdir \\actions-runner ; cd \\actions-runner\r\n# Download the latest runner package\r\nInvoke-WebRequest -Uri https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-win-x64-2.273.0.zip -OutFile actions-runner-win-x64-2.273.0.zip\r\n# Extract the installer\r\nAdd-Type -AssemblyName System.IO.Compression.FileSystem ; \r\n[System.IO.Compression.ZipFile]::ExtractToDirectory(\"$PWD\\actions-runner-win-x64-2.273.0.zip\", \"$PWD\")\r\n```\r\n\r\n## OSX\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-osx-x64-2.273.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-osx-x64-2.273.0.tar.gz\r\n```\r\n\r\n## Linux x64\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-linux-x64-2.273.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-x64-2.273.0.tar.gz\r\n```\r\n\r\n## Linux arm64 (Pre-release)\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-linux-arm64-2.273.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-arm64-2.273.0.tar.gz\r\n```\r\n\r\n## Linux arm (Pre-release)\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-linux-arm-2.273.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-arm-2.273.0.tar.gz\r\n```\r\n\r\n## Using your self hosted runner\r\nFor additional details about configuring, running, or shutting down the runner please check out our [product docs.](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/adding-self-hosted-runners)" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/29088097", + "assets_url": "https://api.github.com/repos/actions/runner/releases/29088097/assets", + "upload_url": "https://uploads.github.com/repos/actions/runner/releases/29088097/assets{?name,label}", + "html_url": "https://github.com/actions/runner/releases/tag/v2.272.0", + "id": 29088097, + "node_id": "MDc6UmVsZWFzZTI5MDg4MDk3", + "tag_name": "v2.272.0", + "target_commitish": "ae543d59756d8440d9b450f3ca74ada6a1b8aefc", + "name": "v2.272.0", + "draft": false, + "author": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "prerelease": false, + "created_at": "2020-07-29T19:32:44Z", + "published_at": "2020-07-29T19:37:38Z", + "assets": [ + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/23380495", + "id": 23380495, + "node_id": "MDEyOlJlbGVhc2VBc3NldDIzMzgwNDk1", + "name": "actions-runner-linux-arm-2.272.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 56138014, + "download_count": 256, + "created_at": "2020-07-29T19:37:45Z", + "updated_at": "2020-07-29T19:37:46Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-linux-arm-2.272.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/23380497", + "id": 23380497, + "node_id": "MDEyOlJlbGVhc2VBc3NldDIzMzgwNDk3", + "name": "actions-runner-linux-arm64-2.272.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 56141617, + "download_count": 265, + "created_at": "2020-07-29T19:37:46Z", + "updated_at": "2020-07-29T19:37:48Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-linux-arm64-2.272.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/23380493", + "id": 23380493, + "node_id": "MDEyOlJlbGVhc2VBc3NldDIzMzgwNDkz", + "name": "actions-runner-linux-x64-2.272.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 75519583, + "download_count": 31840, + "created_at": "2020-07-29T19:37:40Z", + "updated_at": "2020-07-29T19:37:42Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-linux-x64-2.272.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/23380494", + "id": 23380494, + "node_id": "MDEyOlJlbGVhc2VBc3NldDIzMzgwNDk0", + "name": "actions-runner-osx-x64-2.272.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 52631099, + "download_count": 3785, + "created_at": "2020-07-29T19:37:43Z", + "updated_at": "2020-07-29T19:37:44Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-osx-x64-2.272.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/23380491", + "id": 23380491, + "node_id": "MDEyOlJlbGVhc2VBc3NldDIzMzgwNDkx", + "name": "actions-runner-win-x64-2.272.0.zip", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 46838837, + "download_count": 3323, + "created_at": "2020-07-29T19:37:39Z", + "updated_at": "2020-07-29T19:37:40Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-win-x64-2.272.0.zip" + } + ], + "tarball_url": "https://api.github.com/repos/actions/runner/tarball/v2.272.0", + "zipball_url": "https://api.github.com/repos/actions/runner/zipball/v2.272.0", + "body": "## Features\r\n - Composite Actions Support for Multiple Run Steps (#549, #557, #564, #568, #569, #578, #591, #599, #605, #609, #610, #615, #624) \r\n - Prepare to switch GITHUB_ACTION to use ContextName instead of refname (#593)\r\n - Fold logs for intermediate docker commands (#608)\r\n - Add ability to register a runner to the non-default self-hosted runner group (#613)\r\n \r\n## Bugs\r\n - Double quotes around variable so CD works if path contains spaces (#602)\r\n - Bump lodash in /src/Misc/expressionFunc/hashFiles (#603) \r\n - Fix poor performance of process spawned from svc daemon (#614)\r\n## Misc\r\n - Move shared ExecutionContext properties under .Global (#594)\r\n\r\n## Windows x64\r\nWe recommend configuring the runner in a root folder of the Windows drive (e.g. \"C:\\actions-runner\"). This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows.\r\n\r\nThe following snipped needs to be run on `powershell`:\r\n``` powershell\r\n# Create a folder under the drive root\r\nmkdir \\actions-runner ; cd \\actions-runner\r\n# Download the latest runner package\r\nInvoke-WebRequest -Uri https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-win-x64-2.272.0.zip -OutFile actions-runner-win-x64-2.272.0.zip\r\n# Extract the installer\r\nAdd-Type -AssemblyName System.IO.Compression.FileSystem ; \r\n[System.IO.Compression.ZipFile]::ExtractToDirectory(\"$PWD\\actions-runner-win-x64-2.272.0.zip\", \"$PWD\")\r\n```\r\n\r\n## OSX\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-osx-x64-2.272.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-osx-x64-2.272.0.tar.gz\r\n```\r\n\r\n## Linux x64\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-linux-x64-2.272.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-x64-2.272.0.tar.gz\r\n```\r\n\r\n## Linux arm64 (Pre-release)\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-linux-arm64-2.272.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-arm64-2.272.0.tar.gz\r\n```\r\n\r\n## Linux arm (Pre-release)\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-linux-arm-2.272.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-arm-2.272.0.tar.gz\r\n```\r\n\r\n## Using your self hosted runner\r\nFor additional details about configuring, running, or shutting down the runner please check out our [product docs.](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/adding-self-hosted-runners)" + } +] diff --git a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-list-releases-no-linux.json b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-list-releases-no-linux.json new file mode 100644 index 0000000000..cfa702ae72 --- /dev/null +++ b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-list-releases-no-linux.json @@ -0,0 +1,388 @@ +[ + { + "url": "https://api.github.com/repos/actions/runner/releases/29868800", + "assets_url": "https://api.github.com/repos/actions/runner/releases/29868800/assets", + "upload_url": "https://uploads.github.com/repos/actions/runner/releases/29868800/assets{?name,label}", + "html_url": "https://github.com/actions/runner/releases/tag/v2.273.0", + "id": 29868800, + "node_id": "MDc6UmVsZWFzZTI5ODY4ODAw", + "tag_name": "v2.273.0", + "target_commitish": "1d68b0448c8b517e82c7eebbc4f226e6ed088e3d", + "name": "v2.273.0", + "draft": false, + "author": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "prerelease": true, + "created_at": "2020-08-19T14:47:07Z", + "published_at": "2020-08-19T14:52:48Z", + "assets": [ + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/24086217", + "id": 24086217, + "node_id": "MDEyOlJlbGVhc2VBc3NldDI0MDg2MjE3", + "name": "actions-runner-linux-arm-2.273.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 56188191, + "download_count": 63, + "created_at": "2020-08-19T14:52:54Z", + "updated_at": "2020-08-19T14:52:56Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-linux-arm-2.273.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/24086218", + "id": 24086218, + "node_id": "MDEyOlJlbGVhc2VBc3NldDI0MDg2MjE4", + "name": "actions-runner-linux-arm64-2.273.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 56182491, + "download_count": 97, + "created_at": "2020-08-19T14:52:56Z", + "updated_at": "2020-08-19T14:52:58Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-linux-arm64-2.273.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/24086216", + "id": 24086216, + "node_id": "MDEyOlJlbGVhc2VBc3NldDI0MDg2MjE2", + "name": "actions-runner-osx-x64-2.273.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 52630785, + "download_count": 2717, + "created_at": "2020-08-19T14:52:53Z", + "updated_at": "2020-08-19T14:52:54Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-osx-x64-2.273.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/24086212", + "id": 24086212, + "node_id": "MDEyOlJlbGVhc2VBc3NldDI0MDg2MjEy", + "name": "actions-runner-win-x64-2.273.0.zip", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 46839054, + "download_count": 496, + "created_at": "2020-08-19T14:52:49Z", + "updated_at": "2020-08-19T14:52:50Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-win-x64-2.273.0.zip" + } + ], + "tarball_url": "https://api.github.com/repos/actions/runner/tarball/v2.273.0", + "zipball_url": "https://api.github.com/repos/actions/runner/zipball/v2.273.0", + "body": "## Features\r\n - Continued improvements to Composite Actions code and documentation (#616, #625, #626, #641, #645, #657, #658)\r\n\r\n## Bugs\r\n - Fix feature flag check; omit context for generated context names (#638)\r\n - Fix endgroup maker (#640)\r\n\r\n## Misc\r\n - Adding help text for the new runnergroup feature (#626)\r\n - Updating virtual environment terminology in readme.md (#651)\r\n\r\n## Windows x64\r\nWe recommend configuring the runner in a root folder of the Windows drive (e.g. \"C:\\actions-runner\"). This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows.\r\n\r\nThe following snipped needs to be run on `powershell`:\r\n``` powershell\r\n# Create a folder under the drive root\r\nmkdir \\actions-runner ; cd \\actions-runner\r\n# Download the latest runner package\r\nInvoke-WebRequest -Uri https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-win-x64-2.273.0.zip -OutFile actions-runner-win-x64-2.273.0.zip\r\n# Extract the installer\r\nAdd-Type -AssemblyName System.IO.Compression.FileSystem ; \r\n[System.IO.Compression.ZipFile]::ExtractToDirectory(\"$PWD\\actions-runner-win-x64-2.273.0.zip\", \"$PWD\")\r\n```\r\n\r\n## OSX\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-osx-x64-2.273.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-osx-x64-2.273.0.tar.gz\r\n```\r\n\r\n## Linux x64\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-linux-x64-2.273.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-x64-2.273.0.tar.gz\r\n```\r\n\r\n## Linux arm64 (Pre-release)\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-linux-arm64-2.273.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-arm64-2.273.0.tar.gz\r\n```\r\n\r\n## Linux arm (Pre-release)\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-linux-arm-2.273.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-arm-2.273.0.tar.gz\r\n```\r\n\r\n## Using your self hosted runner\r\nFor additional details about configuring, running, or shutting down the runner please check out our [product docs.](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/adding-self-hosted-runners)" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/29088097", + "assets_url": "https://api.github.com/repos/actions/runner/releases/29088097/assets", + "upload_url": "https://uploads.github.com/repos/actions/runner/releases/29088097/assets{?name,label}", + "html_url": "https://github.com/actions/runner/releases/tag/v2.272.0", + "id": 29088097, + "node_id": "MDc6UmVsZWFzZTI5MDg4MDk3", + "tag_name": "v2.272.0", + "target_commitish": "ae543d59756d8440d9b450f3ca74ada6a1b8aefc", + "name": "v2.272.0", + "draft": false, + "author": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "prerelease": false, + "created_at": "2020-07-29T19:32:44Z", + "published_at": "2020-07-29T19:37:38Z", + "assets": [ + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/23380495", + "id": 23380495, + "node_id": "MDEyOlJlbGVhc2VBc3NldDIzMzgwNDk1", + "name": "actions-runner-linux-arm-2.272.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 56138014, + "download_count": 256, + "created_at": "2020-07-29T19:37:45Z", + "updated_at": "2020-07-29T19:37:46Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-linux-arm-2.272.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/23380497", + "id": 23380497, + "node_id": "MDEyOlJlbGVhc2VBc3NldDIzMzgwNDk3", + "name": "actions-runner-linux-arm64-2.272.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 56141617, + "download_count": 265, + "created_at": "2020-07-29T19:37:46Z", + "updated_at": "2020-07-29T19:37:48Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-linux-arm64-2.272.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/23380493", + "id": 23380493, + "node_id": "MDEyOlJlbGVhc2VBc3NldDIzMzgwNDkz", + "name": "actions-runner-linux-x64-2.272.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 75519583, + "download_count": 31840, + "created_at": "2020-07-29T19:37:40Z", + "updated_at": "2020-07-29T19:37:42Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-linux-x64-2.272.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/23380494", + "id": 23380494, + "node_id": "MDEyOlJlbGVhc2VBc3NldDIzMzgwNDk0", + "name": "actions-runner-osx-x64-2.272.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 52631099, + "download_count": 3785, + "created_at": "2020-07-29T19:37:43Z", + "updated_at": "2020-07-29T19:37:44Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-osx-x64-2.272.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/23380491", + "id": 23380491, + "node_id": "MDEyOlJlbGVhc2VBc3NldDIzMzgwNDkx", + "name": "actions-runner-win-x64-2.272.0.zip", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 46838837, + "download_count": 3323, + "created_at": "2020-07-29T19:37:39Z", + "updated_at": "2020-07-29T19:37:40Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-win-x64-2.272.0.zip" + } + ], + "tarball_url": "https://api.github.com/repos/actions/runner/tarball/v2.272.0", + "zipball_url": "https://api.github.com/repos/actions/runner/zipball/v2.272.0", + "body": "## Features\r\n - Composite Actions Support for Multiple Run Steps (#549, #557, #564, #568, #569, #578, #591, #599, #605, #609, #610, #615, #624) \r\n - Prepare to switch GITHUB_ACTION to use ContextName instead of refname (#593)\r\n - Fold logs for intermediate docker commands (#608)\r\n - Add ability to register a runner to the non-default self-hosted runner group (#613)\r\n \r\n## Bugs\r\n - Double quotes around variable so CD works if path contains spaces (#602)\r\n - Bump lodash in /src/Misc/expressionFunc/hashFiles (#603) \r\n - Fix poor performance of process spawned from svc daemon (#614)\r\n## Misc\r\n - Move shared ExecutionContext properties under .Global (#594)\r\n\r\n## Windows x64\r\nWe recommend configuring the runner in a root folder of the Windows drive (e.g. \"C:\\actions-runner\"). This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows.\r\n\r\nThe following snipped needs to be run on `powershell`:\r\n``` powershell\r\n# Create a folder under the drive root\r\nmkdir \\actions-runner ; cd \\actions-runner\r\n# Download the latest runner package\r\nInvoke-WebRequest -Uri https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-win-x64-2.272.0.zip -OutFile actions-runner-win-x64-2.272.0.zip\r\n# Extract the installer\r\nAdd-Type -AssemblyName System.IO.Compression.FileSystem ; \r\n[System.IO.Compression.ZipFile]::ExtractToDirectory(\"$PWD\\actions-runner-win-x64-2.272.0.zip\", \"$PWD\")\r\n```\r\n\r\n## OSX\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-osx-x64-2.272.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-osx-x64-2.272.0.tar.gz\r\n```\r\n\r\n## Linux x64\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-linux-x64-2.272.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-x64-2.272.0.tar.gz\r\n```\r\n\r\n## Linux arm64 (Pre-release)\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-linux-arm64-2.272.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-arm64-2.272.0.tar.gz\r\n```\r\n\r\n## Linux arm (Pre-release)\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-linux-arm-2.272.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-arm-2.272.0.tar.gz\r\n```\r\n\r\n## Using your self hosted runner\r\nFor additional details about configuring, running, or shutting down the runner please check out our [product docs.](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/adding-self-hosted-runners)" + } +] diff --git a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-list-releases.json b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-list-releases.json new file mode 100644 index 0000000000..41762d9b87 --- /dev/null +++ b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/test/resources/github-list-releases.json @@ -0,0 +1,422 @@ +[ + { + "url": "https://api.github.com/repos/actions/runner/releases/29868800", + "assets_url": "https://api.github.com/repos/actions/runner/releases/29868800/assets", + "upload_url": "https://uploads.github.com/repos/actions/runner/releases/29868800/assets{?name,label}", + "html_url": "https://github.com/actions/runner/releases/tag/v2.273.0", + "id": 29868800, + "node_id": "MDc6UmVsZWFzZTI5ODY4ODAw", + "tag_name": "v2.273.0", + "target_commitish": "1d68b0448c8b517e82c7eebbc4f226e6ed088e3d", + "name": "v2.273.0", + "draft": false, + "author": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "prerelease": true, + "created_at": "2020-08-19T14:47:07Z", + "published_at": "2020-08-19T14:52:48Z", + "assets": [ + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/24086217", + "id": 24086217, + "node_id": "MDEyOlJlbGVhc2VBc3NldDI0MDg2MjE3", + "name": "actions-runner-linux-arm-2.273.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 56188191, + "download_count": 63, + "created_at": "2020-08-19T14:52:54Z", + "updated_at": "2020-08-19T14:52:56Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-linux-arm-2.273.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/24086218", + "id": 24086218, + "node_id": "MDEyOlJlbGVhc2VBc3NldDI0MDg2MjE4", + "name": "actions-runner-linux-arm64-2.273.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 56182491, + "download_count": 97, + "created_at": "2020-08-19T14:52:56Z", + "updated_at": "2020-08-19T14:52:58Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-linux-arm64-2.273.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/24086215", + "id": 24086215, + "node_id": "MDEyOlJlbGVhc2VBc3NldDI0MDg2MjE1", + "name": "actions-runner-linux-x64-2.273.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 75556117, + "download_count": 5913, + "created_at": "2020-08-19T14:52:51Z", + "updated_at": "2020-08-19T14:52:52Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-linux-x64-2.273.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/24086216", + "id": 24086216, + "node_id": "MDEyOlJlbGVhc2VBc3NldDI0MDg2MjE2", + "name": "actions-runner-osx-x64-2.273.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 52630785, + "download_count": 2717, + "created_at": "2020-08-19T14:52:53Z", + "updated_at": "2020-08-19T14:52:54Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-osx-x64-2.273.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/24086212", + "id": 24086212, + "node_id": "MDEyOlJlbGVhc2VBc3NldDI0MDg2MjEy", + "name": "actions-runner-win-x64-2.273.0.zip", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 46839054, + "download_count": 496, + "created_at": "2020-08-19T14:52:49Z", + "updated_at": "2020-08-19T14:52:50Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-win-x64-2.273.0.zip" + } + ], + "tarball_url": "https://api.github.com/repos/actions/runner/tarball/v2.273.0", + "zipball_url": "https://api.github.com/repos/actions/runner/zipball/v2.273.0", + "body": "## Features\r\n - Continued improvements to Composite Actions code and documentation (#616, #625, #626, #641, #645, #657, #658)\r\n\r\n## Bugs\r\n - Fix feature flag check; omit context for generated context names (#638)\r\n - Fix endgroup maker (#640)\r\n\r\n## Misc\r\n - Adding help text for the new runnergroup feature (#626)\r\n - Updating virtual environment terminology in readme.md (#651)\r\n\r\n## Windows x64\r\nWe recommend configuring the runner in a root folder of the Windows drive (e.g. \"C:\\actions-runner\"). This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows.\r\n\r\nThe following snipped needs to be run on `powershell`:\r\n``` powershell\r\n# Create a folder under the drive root\r\nmkdir \\actions-runner ; cd \\actions-runner\r\n# Download the latest runner package\r\nInvoke-WebRequest -Uri https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-win-x64-2.273.0.zip -OutFile actions-runner-win-x64-2.273.0.zip\r\n# Extract the installer\r\nAdd-Type -AssemblyName System.IO.Compression.FileSystem ; \r\n[System.IO.Compression.ZipFile]::ExtractToDirectory(\"$PWD\\actions-runner-win-x64-2.273.0.zip\", \"$PWD\")\r\n```\r\n\r\n## OSX\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-osx-x64-2.273.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-osx-x64-2.273.0.tar.gz\r\n```\r\n\r\n## Linux x64\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-linux-x64-2.273.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-x64-2.273.0.tar.gz\r\n```\r\n\r\n## Linux arm64 (Pre-release)\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-linux-arm64-2.273.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-arm64-2.273.0.tar.gz\r\n```\r\n\r\n## Linux arm (Pre-release)\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.273.0/actions-runner-linux-arm-2.273.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-arm-2.273.0.tar.gz\r\n```\r\n\r\n## Using your self hosted runner\r\nFor additional details about configuring, running, or shutting down the runner please check out our [product docs.](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/adding-self-hosted-runners)" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/29088097", + "assets_url": "https://api.github.com/repos/actions/runner/releases/29088097/assets", + "upload_url": "https://uploads.github.com/repos/actions/runner/releases/29088097/assets{?name,label}", + "html_url": "https://github.com/actions/runner/releases/tag/v2.272.0", + "id": 29088097, + "node_id": "MDc6UmVsZWFzZTI5MDg4MDk3", + "tag_name": "v2.272.0", + "target_commitish": "ae543d59756d8440d9b450f3ca74ada6a1b8aefc", + "name": "v2.272.0", + "draft": false, + "author": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "prerelease": false, + "created_at": "2020-07-29T19:32:44Z", + "published_at": "2020-07-29T19:37:38Z", + "assets": [ + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/23380495", + "id": 23380495, + "node_id": "MDEyOlJlbGVhc2VBc3NldDIzMzgwNDk1", + "name": "actions-runner-linux-arm-2.272.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 56138014, + "download_count": 256, + "created_at": "2020-07-29T19:37:45Z", + "updated_at": "2020-07-29T19:37:46Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-linux-arm-2.272.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/23380497", + "id": 23380497, + "node_id": "MDEyOlJlbGVhc2VBc3NldDIzMzgwNDk3", + "name": "actions-runner-linux-arm64-2.272.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 56141617, + "download_count": 265, + "created_at": "2020-07-29T19:37:46Z", + "updated_at": "2020-07-29T19:37:48Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-linux-arm64-2.272.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/23380493", + "id": 23380493, + "node_id": "MDEyOlJlbGVhc2VBc3NldDIzMzgwNDkz", + "name": "actions-runner-linux-x64-2.272.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 75519583, + "download_count": 31840, + "created_at": "2020-07-29T19:37:40Z", + "updated_at": "2020-07-29T19:37:42Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-linux-x64-2.272.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/23380494", + "id": 23380494, + "node_id": "MDEyOlJlbGVhc2VBc3NldDIzMzgwNDk0", + "name": "actions-runner-osx-x64-2.272.0.tar.gz", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 52631099, + "download_count": 3785, + "created_at": "2020-07-29T19:37:43Z", + "updated_at": "2020-07-29T19:37:44Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-osx-x64-2.272.0.tar.gz" + }, + { + "url": "https://api.github.com/repos/actions/runner/releases/assets/23380491", + "id": 23380491, + "node_id": "MDEyOlJlbGVhc2VBc3NldDIzMzgwNDkx", + "name": "actions-runner-win-x64-2.272.0.zip", + "label": "", + "uploader": { + "login": "github-actions[bot]", + "id": 41898282, + "node_id": "MDM6Qm90NDE4OTgyODI=", + "avatar_url": "https://avatars2.githubusercontent.com/in/15368?v=4", + "gravatar_id": "", + "url": "https://api.github.com/users/github-actions%5Bbot%5D", + "html_url": "https://github.com/apps/github-actions", + "followers_url": "https://api.github.com/users/github-actions%5Bbot%5D/followers", + "following_url": "https://api.github.com/users/github-actions%5Bbot%5D/following{/other_user}", + "gists_url": "https://api.github.com/users/github-actions%5Bbot%5D/gists{/gist_id}", + "starred_url": "https://api.github.com/users/github-actions%5Bbot%5D/starred{/owner}{/repo}", + "subscriptions_url": "https://api.github.com/users/github-actions%5Bbot%5D/subscriptions", + "organizations_url": "https://api.github.com/users/github-actions%5Bbot%5D/orgs", + "repos_url": "https://api.github.com/users/github-actions%5Bbot%5D/repos", + "events_url": "https://api.github.com/users/github-actions%5Bbot%5D/events{/privacy}", + "received_events_url": "https://api.github.com/users/github-actions%5Bbot%5D/received_events", + "type": "Bot", + "site_admin": false + }, + "content_type": "application/octet-stream", + "state": "uploaded", + "size": 46838837, + "download_count": 3323, + "created_at": "2020-07-29T19:37:39Z", + "updated_at": "2020-07-29T19:37:40Z", + "browser_download_url": "https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-win-x64-2.272.0.zip" + } + ], + "tarball_url": "https://api.github.com/repos/actions/runner/tarball/v2.272.0", + "zipball_url": "https://api.github.com/repos/actions/runner/zipball/v2.272.0", + "body": "## Features\r\n - Composite Actions Support for Multiple Run Steps (#549, #557, #564, #568, #569, #578, #591, #599, #605, #609, #610, #615, #624) \r\n - Prepare to switch GITHUB_ACTION to use ContextName instead of refname (#593)\r\n - Fold logs for intermediate docker commands (#608)\r\n - Add ability to register a runner to the non-default self-hosted runner group (#613)\r\n \r\n## Bugs\r\n - Double quotes around variable so CD works if path contains spaces (#602)\r\n - Bump lodash in /src/Misc/expressionFunc/hashFiles (#603) \r\n - Fix poor performance of process spawned from svc daemon (#614)\r\n## Misc\r\n - Move shared ExecutionContext properties under .Global (#594)\r\n\r\n## Windows x64\r\nWe recommend configuring the runner in a root folder of the Windows drive (e.g. \"C:\\actions-runner\"). This will help avoid issues related to service identity folder permissions and long file path restrictions on Windows.\r\n\r\nThe following snipped needs to be run on `powershell`:\r\n``` powershell\r\n# Create a folder under the drive root\r\nmkdir \\actions-runner ; cd \\actions-runner\r\n# Download the latest runner package\r\nInvoke-WebRequest -Uri https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-win-x64-2.272.0.zip -OutFile actions-runner-win-x64-2.272.0.zip\r\n# Extract the installer\r\nAdd-Type -AssemblyName System.IO.Compression.FileSystem ; \r\n[System.IO.Compression.ZipFile]::ExtractToDirectory(\"$PWD\\actions-runner-win-x64-2.272.0.zip\", \"$PWD\")\r\n```\r\n\r\n## OSX\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-osx-x64-2.272.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-osx-x64-2.272.0.tar.gz\r\n```\r\n\r\n## Linux x64\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-linux-x64-2.272.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-x64-2.272.0.tar.gz\r\n```\r\n\r\n## Linux arm64 (Pre-release)\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-linux-arm64-2.272.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-arm64-2.272.0.tar.gz\r\n```\r\n\r\n## Linux arm (Pre-release)\r\n\r\n``` bash\r\n# Create a folder\r\nmkdir actions-runner && cd actions-runner\r\n# Download the latest runner package\r\ncurl -O -L https://github.com/actions/runner/releases/download/v2.272.0/actions-runner-linux-arm-2.272.0.tar.gz\r\n# Extract the installer\r\ntar xzf ./actions-runner-linux-arm-2.272.0.tar.gz\r\n```\r\n\r\n## Using your self hosted runner\r\nFor additional details about configuring, running, or shutting down the runner please check out our [product docs.](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/adding-self-hosted-runners)" + } +] diff --git a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/yarn.lock b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/yarn.lock index dee81187c2..cae0a3454f 100644 --- a/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/yarn.lock +++ b/modules/runner-binaries-syncer/lambdas/runner-binaries-syncer/yarn.lock @@ -4734,3 +4734,8 @@ yn@3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/yn/-/yn-3.1.1.tgz#1e87401a09d767c1d5eab26a6e4c185182d2eb50" integrity sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q== + +yn@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yn/-/yn-4.0.0.tgz#611480051ea43b510da1dfdbe177ed159f00a979" + integrity sha512-huWiiCS4TxKc4SfgmTwW1K7JmXPPAmuXWYy4j9qjQo4+27Kni8mGhAAi1cloRWmBe2EqcLgt3IGqQoRL/MtPgg== diff --git a/modules/runner-binaries-syncer/runner-binaries-syncer.tf b/modules/runner-binaries-syncer/runner-binaries-syncer.tf index 28929d4bc4..f42aaf2a9a 100644 --- a/modules/runner-binaries-syncer/runner-binaries-syncer.tf +++ b/modules/runner-binaries-syncer/runner-binaries-syncer.tf @@ -14,9 +14,10 @@ resource "aws_lambda_function" "syncer" { environment { variables = { - S3_BUCKET_NAME = aws_s3_bucket.action_dist.id - S3_OBJECT_KEY = local.action_runner_distribution_object_key - GITHUB_RUNNER_ARCHITECTURE = var.runner_architecture + S3_BUCKET_NAME = aws_s3_bucket.action_dist.id + S3_OBJECT_KEY = local.action_runner_distribution_object_key + GITHUB_RUNNER_ARCHITECTURE = var.runner_architecture + GITHUB_RUNNER_ALLOW_PRERELEASE_BINARIES = var.runner_allow_prerelease_binaries } } diff --git a/modules/runner-binaries-syncer/variables.tf b/modules/runner-binaries-syncer/variables.tf index d8e6c7a48f..dc6c7ce95e 100644 --- a/modules/runner-binaries-syncer/variables.tf +++ b/modules/runner-binaries-syncer/variables.tf @@ -60,3 +60,9 @@ variable "logging_retention_in_days" { type = number default = 7 } + +variable "runner_allow_prerelease_binaries" { + description = "Allow the runners to update to prerelease binaries." + type = bool + default = false +} diff --git a/modules/setup-iam-permissions/README.md b/modules/setup-iam-permissions/README.md index f5254ab6cc..69177eef61 100644 --- a/modules/setup-iam-permissions/README.md +++ b/modules/setup-iam-permissions/README.md @@ -37,20 +37,30 @@ output "boundary" { Next execute the created Terraform code `terraform init && terraform apply` The module will. You can use the created role in your terraform provider with assume role and the boundary as well the namespace needs to be set to the root module. +## Requirements + +No requirements. + +## Providers + +| Name | Version | +|------|---------| +| aws | n/a | + ## Inputs | Name | Description | Type | Default | Required | -|------|-------------|:----:|:-----:|:-----:| -| account\_id | The module allows to switch to the created role from the provided account id. | string | n/a | yes | -| environment | A name that identifies the environment, used as prefix and for tagging. | string | n/a | yes | -| namespaces | The role will be only allowed to create roles, policies and instance profiles in the given namespace / path. All policies in the boundaries namespace cannot be modified by this role. | object | n/a | yes | +|------|-------------|------|---------|:--------:| +| account\_id | The module allows to switch to the created role from the provided account id. | `string` | n/a | yes | +| environment | A name that identifies the environment, used as prefix and for tagging. | `string` | n/a | yes | +| namespaces | The role will be only allowed to create roles, policies and instance profiles in the given namespace / path. All policies in the boundaries namespace cannot be modified by this role. |
object({
boundary_namespace = string
role_namespace = string
policy_namespace = string
instance_profile_namespace = string
})
| n/a | yes | ## Outputs | Name | Description | |------|-------------| -| boundary | | -| role | | +| boundary | n/a | +| role | n/a | diff --git a/variables.tf b/variables.tf index 80217edb0e..4917457ca1 100644 --- a/variables.tf +++ b/variables.tf @@ -186,3 +186,9 @@ variable "logging_retention_in_days" { type = number default = 7 } + +variable "runner_allow_prerelease_binaries" { + description = "Allow the runners to update to prerelease binaries." + type = bool + default = false +}