1
0
Fork 0

Set main as the default branch (#527)

* set main as the default branch

* revert change to tool-cache default branch

* use versions where applicable
pull/530/head
Thomas Boop 2020-07-21 11:33:05 -04:00 committed by GitHub
parent cb18a3df6b
commit ccad19055e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
25 changed files with 42 additions and 42 deletions

View File

@ -2,7 +2,7 @@ name: artifact-unit-tests
on:
push:
branches:
- master
- main
paths-ignore:
- '**.md'
pull_request:

View File

@ -2,7 +2,7 @@ name: toolkit-audit
on:
push:
branches:
- master
- main
paths-ignore:
- '**.md'
pull_request:

View File

@ -2,7 +2,7 @@ name: cache-unit-tests
on:
push:
branches:
- master
- main
paths-ignore:
- '**.md'
pull_request:

View File

@ -2,7 +2,7 @@ name: toolkit-unit-tests
on:
push:
branches:
- master
- main
paths-ignore:
- '**.md'
pull_request:

View File

@ -37,7 +37,7 @@ jobs:
script: |
github.pulls.create(
{
base: "master",
base: "main",
owner: "${{github.repository_owner}}",
repo: "toolkit",
title: "Update Octokit dependencies",

View File

@ -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.

View File

@ -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.

View File

@ -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.

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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",

View File

@ -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')

View File

@ -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",

View File

@ -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<string> {
const IS_WINDOWS = process.platform === 'win32'

View File

@ -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",

View File

@ -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",

View File

@ -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)
})

View File

@ -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

View File

@ -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",

View File

@ -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'

View File

@ -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",

View File

@ -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",

View File

@ -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'

View File

@ -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",