diff --git a/.github/workflows/artifact-tests.yml b/.github/workflows/artifact-tests.yml index 7125ca9f..ef9a17d1 100644 --- a/.github/workflows/artifact-tests.yml +++ b/.github/workflows/artifact-tests.yml @@ -2,7 +2,7 @@ name: artifact-unit-tests on: push: branches: - - master + - main paths-ignore: - '**.md' pull_request: diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index 669b4b49..6c9f1124 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -2,7 +2,7 @@ name: toolkit-audit on: push: branches: - - master + - main paths-ignore: - '**.md' pull_request: diff --git a/.github/workflows/cache-tests.yml b/.github/workflows/cache-tests.yml index a2daa7eb..dab446bb 100644 --- a/.github/workflows/cache-tests.yml +++ b/.github/workflows/cache-tests.yml @@ -2,7 +2,7 @@ name: cache-unit-tests on: push: branches: - - master + - main paths-ignore: - '**.md' pull_request: diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index efe5c435..f5bcb340 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -2,7 +2,7 @@ name: toolkit-unit-tests on: push: branches: - - master + - main paths-ignore: - '**.md' pull_request: diff --git a/.github/workflows/update-github.yaml b/.github/workflows/update-github.yaml index 2d6b0280..f41e254e 100644 --- a/.github/workflows/update-github.yaml +++ b/.github/workflows/update-github.yaml @@ -37,7 +37,7 @@ jobs: script: | github.pulls.create( { - base: "master", + base: "main", owner: "${{github.repository_owner}}", repo: "toolkit", title: "Update Octokit dependencies", diff --git a/docs/action-types.md b/docs/action-types.md index f0926d15..56310931 100644 --- a/docs/action-types.md +++ b/docs/action-types.md @@ -32,14 +32,14 @@ jobs: os: [ubuntu-16.04, windows-2019] runs-on: ${{matrix.os}} actions: - - uses: actions/setup-node@master + - uses: actions/setup-node@v1 with: version: ${{matrix.node}} - run: | npm install - run: | npm test - - uses: actions/custom-action@master + - uses: actions/custom-action@v1 ``` JavaScript actions work on any environment that host action runtime is supported on which is currently node 12. However, a host action that runs a toolset expects the environment that it's running on to have that toolset in its PATH or using a setup-* action to acquire it on demand. diff --git a/docs/action-versioning.md b/docs/action-versioning.md index 4a8e8168..b1847424 100644 --- a/docs/action-versioning.md +++ b/docs/action-versioning.md @@ -17,13 +17,13 @@ Binding to a major version is the latest of that major version ( e.g. `v1` == "1 Major versions should guarantee compatibility. A major version can add net new capabilities but should not break existing input compatibility or break existing workflows. -Major version binding allows you to take advantage of bug fixes and critical functionality and security fixes. The `master` branch has the latest code and is unstable to bind to since changes get committed to master and released to the market place by creating a tag. In addition, a new major version carrying breaking changes will get implemented in master after branching off the previous major version. +Major version binding allows you to take advantage of bug fixes and critical functionality and security fixes. The `main` branch has the latest code and is unstable to bind to since changes get committed to main and released to the market place by creating a tag. In addition, a new major version carrying breaking changes will get implemented in main after branching off the previous major version. -> Warning: do not reference `master` since that is the latest code and can be carrying breaking changes of the next major version. +> Warning: do not reference `main` since that is the latest code and can be carrying breaking changes of the next major version. ```yaml steps: - - uses: actions/javascript-action@master # do not do this + - uses: actions/javascript-action@main # do not do this ``` Binding to the immutable full sha1 may offer more reliability. However, note that the hosted images toolsets (e.g. ubuntu-latest) move forward and if there is a tool breaking issue, actions may react with a patch to a major version to compensate so binding to a specific SHA may prevent you from getting fixes. diff --git a/docs/commands.md b/docs/commands.md index 0edf2f07..30d58d94 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -1,6 +1,6 @@ # :: Commands -The [core toolkit package](https://github.com/actions/toolkit/tree/master/packages/core) offers a number of convenience functions for +The [core toolkit package](https://github.com/actions/toolkit/tree/main/packages/core) offers a number of convenience functions for setting results, logging, registering secrets and exporting variables across actions. Sometimes, however, its useful to be able to do these things in a script or other tool. diff --git a/docs/container-action.md b/docs/container-action.md index 05cc934d..4c1adf2b 100644 --- a/docs/container-action.md +++ b/docs/container-action.md @@ -18,7 +18,7 @@ e.g. To use https://github.com/actions/setup-node, users will author: ```yaml steps: - using: actions/setup-node@master + using: actions/setup-node@v1 ``` # Define Metadata diff --git a/docs/problem-matchers.md b/docs/problem-matchers.md index f8867849..50bcd1e1 100644 --- a/docs/problem-matchers.md +++ b/docs/problem-matchers.md @@ -111,10 +111,10 @@ Registering two problem-matchers with the same owner will result in only the pro ## Examples Some of the starter actions are already using problem matchers, for example: -- [setup-node](https://github.com/actions/setup-node/tree/master/.github) -- [setup-python](https://github.com/actions/setup-python/tree/master/.github) -- [setup-go](https://github.com/actions/setup-go/tree/master/.github) -- [setup-dotnet](https://github.com/actions/setup-dotnet/tree/master/.github) +- [setup-node](https://github.com/actions/setup-node/tree/main/.github) +- [setup-python](https://github.com/actions/setup-python/tree/main/.github) +- [setup-go](https://github.com/actions/setup-go/tree/main/.github) +- [setup-dotnet](https://github.com/actions/setup-dotnet/tree/main/.github) ## Troubleshooting diff --git a/packages/artifact/README.md b/packages/artifact/README.md index 197f80a5..ac67b5cd 100644 --- a/packages/artifact/README.md +++ b/packages/artifact/README.md @@ -203,6 +203,6 @@ Check out [implementation-details](docs/implementation-details.md) for extra inf ## Contributions -See [contributor guidelines](https://github.com/actions/toolkit/blob/master/.github/CONTRIBUTING.md) for general guidelines and information about toolkit contributions. +See [contributor guidelines](https://github.com/actions/toolkit/blob/main/.github/CONTRIBUTING.md) for general guidelines and information about toolkit contributions. For contributions related to this package, see [artifact contributions](CONTRIBUTIONS.md) for more information. diff --git a/packages/artifact/package.json b/packages/artifact/package.json index 42891a15..926786c3 100644 --- a/packages/artifact/package.json +++ b/packages/artifact/package.json @@ -8,7 +8,7 @@ "actions", "artifact" ], - "homepage": "https://github.com/actions/toolkit/tree/master/packages/artifact", + "homepage": "https://github.com/actions/toolkit/tree/main/packages/artifact", "license": "MIT", "main": "lib/artifact-client.js", "types": "lib/artifact-client.d.ts", diff --git a/packages/cache/__tests__/restoreCache.test.ts b/packages/cache/__tests__/restoreCache.test.ts index c8a52ea4..5095947c 100644 --- a/packages/cache/__tests__/restoreCache.test.ts +++ b/packages/cache/__tests__/restoreCache.test.ts @@ -104,7 +104,7 @@ test('restore with gzip compressed cache found', async () => { const cacheEntry: ArtifactCacheEntry = { cacheKey: key, - scope: 'refs/heads/master', + scope: 'refs/heads/main', archiveLocation: 'www.actionscache.test/download' } const getCacheMock = jest.spyOn(cacheHttpClient, 'getCacheEntry') @@ -166,7 +166,7 @@ test('restore with zstd compressed cache found', async () => { const cacheEntry: ArtifactCacheEntry = { cacheKey: key, - scope: 'refs/heads/master', + scope: 'refs/heads/main', archiveLocation: 'www.actionscache.test/download' } const getCacheMock = jest.spyOn(cacheHttpClient, 'getCacheEntry') @@ -223,7 +223,7 @@ test('restore with cache found for restore key', async () => { const cacheEntry: ArtifactCacheEntry = { cacheKey: restoreKey, - scope: 'refs/heads/master', + scope: 'refs/heads/main', archiveLocation: 'www.actionscache.test/download' } const getCacheMock = jest.spyOn(cacheHttpClient, 'getCacheEntry') diff --git a/packages/cache/package.json b/packages/cache/package.json index 630229da..c41de866 100644 --- a/packages/cache/package.json +++ b/packages/cache/package.json @@ -8,7 +8,7 @@ "actions", "cache" ], - "homepage": "https://github.com/actions/toolkit/tree/master/packages/cache", + "homepage": "https://github.com/actions/toolkit/tree/main/packages/cache", "license": "MIT", "main": "lib/cache.js", "types": "lib/cache.d.ts", diff --git a/packages/cache/src/internal/cacheUtils.ts b/packages/cache/src/internal/cacheUtils.ts index 0628ffa4..bdcef88d 100644 --- a/packages/cache/src/internal/cacheUtils.ts +++ b/packages/cache/src/internal/cacheUtils.ts @@ -9,7 +9,7 @@ import * as util from 'util' import {v4 as uuidV4} from 'uuid' import {CacheFilename, CompressionMethod} from './constants' -// From https://github.com/actions/toolkit/blob/master/packages/tool-cache/src/tool-cache.ts#L23 +// From https://github.com/actions/toolkit/blob/main/packages/tool-cache/src/tool-cache.ts#L23 export async function createTempDirectory(): Promise { const IS_WINDOWS = process.platform === 'win32' diff --git a/packages/core/package.json b/packages/core/package.json index 05f03cb9..f45b48b6 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -7,7 +7,7 @@ "actions", "core" ], - "homepage": "https://github.com/actions/toolkit/tree/master/packages/core", + "homepage": "https://github.com/actions/toolkit/tree/main/packages/core", "license": "MIT", "main": "lib/core.js", "types": "lib/core.d.ts", diff --git a/packages/exec/package.json b/packages/exec/package.json index fde021d3..d800aa46 100644 --- a/packages/exec/package.json +++ b/packages/exec/package.json @@ -7,7 +7,7 @@ "actions", "exec" ], - "homepage": "https://github.com/actions/toolkit/tree/master/packages/exec", + "homepage": "https://github.com/actions/toolkit/tree/main/packages/exec", "license": "MIT", "main": "lib/exec.js", "types": "lib/exec.d.ts", diff --git a/packages/github/__tests__/github.proxy.test.ts b/packages/github/__tests__/github.proxy.test.ts index 5da06582..1dd38387 100644 --- a/packages/github/__tests__/github.proxy.test.ts +++ b/packages/github/__tests__/github.proxy.test.ts @@ -52,9 +52,9 @@ describe('@actions/github', () => { const branch = await octokit.repos.getBranch({ owner: 'actions', repo: 'toolkit', - branch: 'master' + branch: 'main' }) - expect(branch.data.name).toBe('master') + expect(branch.data.name).toBe('main') expect(proxyConnects).toEqual(['api.github.com:443']) }) @@ -88,9 +88,9 @@ describe('@actions/github', () => { const branch = await octokit.repos.getBranch({ owner: 'actions', repo: 'toolkit', - branch: 'master' + branch: 'main' }) - expect(branch.data.name).toBe('master') + expect(branch.data.name).toBe('main') expect(proxyConnects).toHaveLength(0) }) diff --git a/packages/github/__tests__/github.test.ts b/packages/github/__tests__/github.test.ts index 4e02c7b3..b4abfc4c 100644 --- a/packages/github/__tests__/github.test.ts +++ b/packages/github/__tests__/github.test.ts @@ -48,9 +48,9 @@ describe('@actions/github', () => { const branch = await octokit.repos.getBranch({ owner: 'actions', repo: 'toolkit', - branch: 'master' + branch: 'main' }) - expect(branch.data.name).toBe('master') + expect(branch.data.name).toBe('main') expect(proxyConnects).toHaveLength(0) }) @@ -63,9 +63,9 @@ describe('@actions/github', () => { const branch = await octokit.repos.getBranch({ owner: 'actions', repo: 'toolkit', - branch: 'master' + branch: 'main' }) - expect(branch.data.name).toBe('master') + expect(branch.data.name).toBe('main') expect(proxyConnects).toHaveLength(0) }) @@ -80,9 +80,9 @@ describe('@actions/github', () => { const branch = await octokit.repos.getBranch({ owner: 'actions', repo: 'toolkit', - branch: 'master' + branch: 'main' }) - expect(branch.data.name).toBe('master') + expect(branch.data.name).toBe('main') expect(proxyConnects).toHaveLength(0) // Invalid token @@ -92,7 +92,7 @@ describe('@actions/github', () => { await octokit.repos.getBranch({ owner: 'actions', repo: 'toolkit', - branch: 'master' + branch: 'main' }) } catch (err) { failed = true diff --git a/packages/github/package.json b/packages/github/package.json index c7f89931..96803f39 100644 --- a/packages/github/package.json +++ b/packages/github/package.json @@ -6,7 +6,7 @@ "github", "actions" ], - "homepage": "https://github.com/actions/toolkit/tree/master/packages/github", + "homepage": "https://github.com/actions/toolkit/tree/main/packages/github", "license": "MIT", "main": "lib/github.js", "types": "lib/github.d.ts", diff --git a/packages/github/src/context.ts b/packages/github/src/context.ts index 52efabb0..4eb70543 100644 --- a/packages/github/src/context.ts +++ b/packages/github/src/context.ts @@ -1,4 +1,4 @@ -// Originally pulled from https://github.com/JasonEtco/actions-toolkit/blob/master/src/context.ts +// Originally pulled from https://github.com/JasonEtco/actions-toolkit/blob/main/src/context.ts import {WebhookPayload} from './interfaces' import {readFileSync, existsSync} from 'fs' import {EOL} from 'os' diff --git a/packages/glob/package.json b/packages/glob/package.json index e75dae1c..bafb0d40 100644 --- a/packages/glob/package.json +++ b/packages/glob/package.json @@ -8,7 +8,7 @@ "actions", "glob" ], - "homepage": "https://github.com/actions/toolkit/tree/master/packages/glob", + "homepage": "https://github.com/actions/toolkit/tree/main/packages/glob", "license": "MIT", "main": "lib/glob.js", "types": "lib/glob.d.ts", diff --git a/packages/io/package.json b/packages/io/package.json index 9d4213e1..9ef283f8 100644 --- a/packages/io/package.json +++ b/packages/io/package.json @@ -7,7 +7,7 @@ "actions", "io" ], - "homepage": "https://github.com/actions/toolkit/tree/master/packages/io", + "homepage": "https://github.com/actions/toolkit/tree/main/packages/io", "license": "MIT", "main": "lib/io.js", "types": "lib/io.d.ts", diff --git a/packages/tool-cache/__tests__/manifest.test.ts b/packages/tool-cache/__tests__/manifest.test.ts index 1c93b627..51707694 100644 --- a/packages/tool-cache/__tests__/manifest.test.ts +++ b/packages/tool-cache/__tests__/manifest.test.ts @@ -8,7 +8,7 @@ import osm = require('os') import cp = require('child_process') //import {coerce} from 'semver' -// we fetch the manifest file from master of a repo +// we fetch the manifest file from main of a repo const owner = 'actions' const repo = 'some-tool' const fakeToken = 'notrealtoken' diff --git a/packages/tool-cache/package.json b/packages/tool-cache/package.json index 2a6cca2f..4ff76d32 100644 --- a/packages/tool-cache/package.json +++ b/packages/tool-cache/package.json @@ -7,7 +7,7 @@ "actions", "exec" ], - "homepage": "https://github.com/actions/toolkit/tree/master/packages/tool-cache", + "homepage": "https://github.com/actions/toolkit/tree/main/packages/tool-cache", "license": "MIT", "main": "lib/tool-cache.js", "types": "lib/tool-cache.d.ts",