Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5e716dcfd6 | ||
|
|
a83788eef0 | ||
|
|
d0d9a72195 | ||
|
|
a8165e7b70 | ||
|
|
a024221c60 | ||
|
|
4c3fce4ab2 | ||
|
|
7c965aebec | ||
|
|
7932f6210d | ||
|
|
70deadb37a | ||
|
|
165fe681b8 | ||
|
|
2d305372c4 | ||
|
|
c252a3bb80 | ||
|
|
4661366cb8 | ||
|
|
03d7e8ebf0 | ||
|
|
22f6533f7c | ||
|
|
b30c61b0de | ||
|
|
51cc8966ea | ||
|
|
db8b80b0d3 | ||
|
|
39a1a82492 | ||
|
|
c77919d12e | ||
|
|
341de1b1a5 | ||
|
|
8c0edbc76e | ||
|
|
1fb9cbdb32 | ||
|
|
693fdd6ca6 | ||
|
|
fe4c1ac86d | ||
|
|
c74574e6c8 | ||
|
|
2d0cf98781 | ||
|
|
5f1d4ea81f | ||
|
|
59b5ed6124 | ||
|
|
bd61d52837 | ||
|
|
f6efb5fcbb | ||
|
|
2dfca373f3 |
Binary file not shown.
|
Before Width: | Height: | Size: 13 KiB |
@@ -305,9 +305,13 @@ jobs:
|
|||||||
platforms: ${{ matrix.qemu-platforms }}
|
platforms: ${{ matrix.qemu-platforms }}
|
||||||
-
|
-
|
||||||
name: Set up Docker Buildx
|
name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
version: ${{ matrix.buildx-version }}
|
version: ${{ matrix.buildx-version }}
|
||||||
|
-
|
||||||
|
name: List builder platforms
|
||||||
|
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||||
|
|
||||||
build-ref:
|
build-ref:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -416,3 +420,47 @@ jobs:
|
|||||||
echo "::error::Should have failed"
|
echo "::error::Should have failed"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
append:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
-
|
||||||
|
name: Create dummy contexts
|
||||||
|
run: |
|
||||||
|
docker context create ctxbuilder2
|
||||||
|
docker context create ctxbuilder3
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
append: |
|
||||||
|
- name: builder2
|
||||||
|
endpoint: ctxbuilder2
|
||||||
|
platforms: linux/amd64
|
||||||
|
driver-opts:
|
||||||
|
- image=moby/buildkit:master
|
||||||
|
- network=host
|
||||||
|
- endpoint: ctxbuilder3
|
||||||
|
platforms: linux/arm64
|
||||||
|
-
|
||||||
|
name: List builder platforms
|
||||||
|
run: echo ${{ steps.buildx.outputs.platforms }}
|
||||||
|
|
||||||
|
platforms:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
-
|
||||||
|
name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v2
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
platforms: linux/amd64
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ jobs:
|
|||||||
uses: docker/bake-action@v2
|
uses: docker/bake-action@v2
|
||||||
with:
|
with:
|
||||||
targets: test
|
targets: test
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
-
|
-
|
||||||
name: Upload coverage
|
name: Upload coverage
|
||||||
uses: codecov/codecov-action@v3
|
uses: codecov/codecov-action@v3
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[](https://github.com/docker/setup-buildx-action/releases/latest)
|
[](https://github.com/docker/setup-buildx-action/releases/latest)
|
||||||
[](https://github.com/marketplace/actions/docker-setup-buildx)
|
[](https://github.com/marketplace/actions/docker-setup-buildx)
|
||||||
[](https://github.com/docker/setup-buildx-action/actions?workflow=ci)
|
[](https://github.com/docker/setup-buildx-action/actions?workflow=ci)
|
||||||
[](https://github.com/docker/setup-buildx-action/actions?workflow=test)
|
[](https://github.com/docker/setup-buildx-action/actions?workflow=test)
|
||||||
[](https://codecov.io/gh/docker/setup-buildx-action)
|
[](https://codecov.io/gh/docker/setup-buildx-action)
|
||||||
|
|
||||||
## About
|
## About
|
||||||
@@ -19,11 +19,8 @@ a [BuildKit](https://github.com/moby/buildkit) container.
|
|||||||
___
|
___
|
||||||
|
|
||||||
* [Usage](#usage)
|
* [Usage](#usage)
|
||||||
* [Advanced usage](#advanced-usage)
|
* [Configuring your builder](#configuring-your-builder)
|
||||||
* [Authentication support](docs/advanced/auth.md)
|
* [Version pinning](#version-pinning)
|
||||||
* [Install by default](docs/advanced/install-default.md)
|
|
||||||
* [BuildKit daemon configuration](docs/advanced/buildkit-config.md)
|
|
||||||
* [Standalone mode](docs/advanced/standalone.md)
|
|
||||||
* [Customizing](#customizing)
|
* [Customizing](#customizing)
|
||||||
* [inputs](#inputs)
|
* [inputs](#inputs)
|
||||||
* [outputs](#outputs)
|
* [outputs](#outputs)
|
||||||
@@ -31,7 +28,8 @@ ___
|
|||||||
* [Notes](#notes)
|
* [Notes](#notes)
|
||||||
* [`nodes` output](#nodes-output)
|
* [`nodes` output](#nodes-output)
|
||||||
* [BuildKit container logs](#buildkit-container-logs)
|
* [BuildKit container logs](#buildkit-container-logs)
|
||||||
* [Keep up-to-date with GitHub Dependabot](#keep-up-to-date-with-github-dependabot)
|
* [Using on GHES](#using-on-ghes)
|
||||||
|
* [Contributing](#contributing)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@@ -58,43 +56,71 @@ jobs:
|
|||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
```
|
```
|
||||||
|
|
||||||
## Advanced usage
|
## Configuring your builder
|
||||||
|
|
||||||
* [Authentication support](docs/advanced/auth.md)
|
See https://docs.docker.com/build/ci/github-actions/configure-builder/
|
||||||
* [Install by default](docs/advanced/install-default.md)
|
|
||||||
* [BuildKit daemon configuration](docs/advanced/buildkit-config.md)
|
## Version pinning
|
||||||
* [Standalone mode](docs/advanced/standalone.md)
|
|
||||||
|
This action builds images using [Buildx](https://github.com/docker/buildx) and
|
||||||
|
[BuildKit](https://github.com/moby/buildkit). By default, the action will
|
||||||
|
attempt to use the latest version of Buildx available on the GitHub Runner
|
||||||
|
(the build client) and the latest release of BuildKit (the build server).
|
||||||
|
|
||||||
|
To pin to a specific version of Buildx, use the `version` input. For example,
|
||||||
|
to pin to Buildx v0.10.0:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
version: v0.10.0
|
||||||
|
```
|
||||||
|
|
||||||
|
To pin to a specific version of BuildKit, use the `image` option in the
|
||||||
|
`driver-opts` input. For example, to pin to BuildKit v0.11.0:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
with:
|
||||||
|
driver-opts: image=moby/buildkit:v0.11.0
|
||||||
|
```
|
||||||
|
|
||||||
## Customizing
|
## Customizing
|
||||||
|
|
||||||
### inputs
|
### inputs
|
||||||
|
|
||||||
Following inputs can be used as `step.with` keys
|
Following inputs can be used as `step.with` keys:
|
||||||
|
|
||||||
| Name | Type | Description |
|
> `List` type is a newline-delimited string
|
||||||
|-------------------|--------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|
||||||
| `version` | String | [Buildx](https://github.com/docker/buildx) version. (eg. `v0.3.0`, `latest`, `https://github.com/docker/buildx.git#master`) |
|
|
||||||
| `driver` | String | Sets the [builder driver](https://docs.docker.com/engine/reference/commandline/buildx_create/#driver) to be used (default `docker-container`) |
|
|
||||||
| `driver-opts` | CSV | List of additional [driver-specific options](https://docs.docker.com/engine/reference/commandline/buildx_create/#driver-opt) (eg. `image=moby/buildkit:master`) |
|
|
||||||
| `buildkitd-flags` | String | [Flags for buildkitd](https://docs.docker.com/engine/reference/commandline/buildx_create/#buildkitd-flags) daemon (since [buildx v0.3.0](https://github.com/docker/buildx/releases/tag/v0.3.0)) |
|
|
||||||
| `install` | Bool | Sets up `docker build` command as an alias to `docker buildx` (default `false`) |
|
|
||||||
| `use` | Bool | Switch to this builder instance (default `true`) |
|
|
||||||
| `endpoint` | String | [Optional address for docker socket](https://docs.docker.com/engine/reference/commandline/buildx_create/#description) or context from `docker context ls` |
|
|
||||||
| `config`¹ | String | [BuildKit config file](https://docs.docker.com/engine/reference/commandline/buildx_create/#config) |
|
|
||||||
| `config-inline`¹ | String | Same as `config` but inline |
|
|
||||||
|
|
||||||
> * ¹ `config` and `config-inline` are mutually exclusive
|
|
||||||
|
|
||||||
> `CSV` type must be a newline-delimited string
|
|
||||||
> ```yaml
|
|
||||||
> driver-opts: image=moby/buildkit:master
|
|
||||||
> ```
|
|
||||||
> ```yaml
|
> ```yaml
|
||||||
> driver-opts: |
|
> driver-opts: |
|
||||||
> image=moby/buildkit:master
|
> image=moby/buildkit:master
|
||||||
> network=host
|
> network=host
|
||||||
> ```
|
> ```
|
||||||
|
|
||||||
|
> `CSV` type must be a newline-delimited string
|
||||||
|
> ```yaml
|
||||||
|
> platforms: linux/amd64,linux/arm64
|
||||||
|
> ```
|
||||||
|
|
||||||
|
| Name | Type | Description |
|
||||||
|
|-------------------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
|
| `version` | String | [Buildx](https://github.com/docker/buildx) version. (eg. `v0.3.0`, `latest`, `https://github.com/docker/buildx.git#master`) |
|
||||||
|
| `driver` | String | Sets the [builder driver](https://docs.docker.com/engine/reference/commandline/buildx_create/#driver) to be used (default `docker-container`) |
|
||||||
|
| `driver-opts` | List | List of additional [driver-specific options](https://docs.docker.com/engine/reference/commandline/buildx_create/#driver-opt) (eg. `image=moby/buildkit:master`) |
|
||||||
|
| `buildkitd-flags` | String | [Flags for buildkitd](https://docs.docker.com/engine/reference/commandline/buildx_create/#buildkitd-flags) daemon (since [buildx v0.3.0](https://github.com/docker/buildx/releases/tag/v0.3.0)) |
|
||||||
|
| `install` | Bool | Sets up `docker build` command as an alias to `docker buildx` (default `false`) |
|
||||||
|
| `use` | Bool | Switch to this builder instance (default `true`) |
|
||||||
|
| `endpoint` | String | [Optional address for docker socket](https://docs.docker.com/engine/reference/commandline/buildx_create/#description) or context from `docker context ls` |
|
||||||
|
| `platforms` | List/CSV | Fixed [platforms](https://docs.docker.com/engine/reference/commandline/buildx_create/#platform) for current node. If not empty, values take priority over the detected ones. |
|
||||||
|
| `config`¹ | String | [BuildKit config file](https://docs.docker.com/engine/reference/commandline/buildx_create/#config) |
|
||||||
|
| `config-inline`¹ | String | Same as `config` but inline |
|
||||||
|
| `append` | YAML | [Append additional nodes](docs/advanced/append-nodes.md) to the builder |
|
||||||
|
|
||||||
|
> * ¹ `config` and `config-inline` are mutually exclusive
|
||||||
|
|
||||||
### outputs
|
### outputs
|
||||||
|
|
||||||
Following outputs are available
|
Following outputs are available
|
||||||
@@ -147,33 +173,38 @@ The following [official docker environment variables](https://docs.docker.com/en
|
|||||||
|
|
||||||
### BuildKit container logs
|
### BuildKit container logs
|
||||||
|
|
||||||
To display BuildKit container logs (when `docker-container` driver is used) you have to [enable step debug logging](https://docs.github.com/en/actions/managing-workflow-runs/enabling-debug-logging#enabling-step-debug-logging),
|
See https://docs.docker.com/build/ci/github-actions/configure-builder/#buildkit-container-logs
|
||||||
or you can also enable debugging in the [setup-buildx action step](https://github.com/docker/setup-buildx-action):
|
|
||||||
|
## Using on GHES
|
||||||
|
|
||||||
|
GitHub Runners come [pre-installed with Docker Buildx](https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md)
|
||||||
|
following your virtual environment. If you specify a version or `latest` of
|
||||||
|
Docker Buildx in your workflow, the version will be downloaded from [GitHub Releases in `docker/buildx`](https://github.com/docker/buildx/releases)
|
||||||
|
repository. These calls to `docker/buildx` are made via unauthenticated requests,
|
||||||
|
which are limited to [60 requests per hour per IP](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting).
|
||||||
|
|
||||||
|
If more requests are made within the time frame, then you will start to see
|
||||||
|
rate-limit errors during downloading that looks like:
|
||||||
|
|
||||||
|
```
|
||||||
|
##[error]API rate limit exceeded for...
|
||||||
|
```
|
||||||
|
|
||||||
|
To get a higher rate limit, you can [generate a personal access token on github.com](https://github.com/settings/tokens/new)
|
||||||
|
and pass it as the `github_token` input for the action:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
-
|
uses: docker/setup-buildx-action@v3
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
with:
|
with:
|
||||||
buildkitd-flags: --debug
|
github_token: ${{ secrets.GH_DOTCOM_TOKEN }}
|
||||||
|
version: v0.10.1
|
||||||
```
|
```
|
||||||
|
|
||||||
Logs will be available at the end of a job:
|
If the runner is not able to access `github.com`, it will take the default one
|
||||||
|
available on the GitHub Runner or runner's tool cache. See "[Setting up the tool cache on self-hosted runners without internet access](https://docs.github.com/en/[email protected]/admin/github-actions/managing-access-to-actions-from-githubcom/setting-up-the-tool-cache-on-self-hosted-runners-without-internet-access)"
|
||||||
|
for more information.
|
||||||
|
|
||||||

|
## Contributing
|
||||||
|
|
||||||
## Keep up-to-date with GitHub Dependabot
|
Want to contribute? Awesome! You can find information about contributing to
|
||||||
|
this project in the [CONTRIBUTING.md](/.github/CONTRIBUTING.md)
|
||||||
Since [Dependabot](https://docs.github.com/en/github/administering-a-repository/keeping-your-actions-up-to-date-with-github-dependabot)
|
|
||||||
has [native GitHub Actions support](https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates#package-ecosystem),
|
|
||||||
to enable it on your GitHub repo all you need to do is add the `.github/dependabot.yml` file:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
version: 2
|
|
||||||
updates:
|
|
||||||
# Maintain dependencies for GitHub Actions
|
|
||||||
- package-ecosystem: "github-actions"
|
|
||||||
directory: "/"
|
|
||||||
schedule:
|
|
||||||
interval: "daily"
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ describe('install', () => {
|
|||||||
])(
|
])(
|
||||||
'acquires %p of buildx (standalone: %p)',
|
'acquires %p of buildx (standalone: %p)',
|
||||||
async (version, standalone) => {
|
async (version, standalone) => {
|
||||||
const buildxBin = await buildx.install(version, tmpDir, standalone);
|
const buildxBin = await buildx.install(version, process.env.GITHUB_TOKEN || '', tmpDir, standalone);
|
||||||
expect(fs.existsSync(buildxBin)).toBe(true);
|
expect(fs.existsSync(buildxBin)).toBe(true);
|
||||||
},
|
},
|
||||||
100000
|
100000
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import * as os from 'os';
|
|||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as uuid from 'uuid';
|
import * as uuid from 'uuid';
|
||||||
import * as context from '../src/context';
|
import * as context from '../src/context';
|
||||||
|
import * as nodes from '../src/nodes';
|
||||||
|
|
||||||
const tmpdir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-setup-buildx-')).split(path.sep).join(path.posix.sep);
|
const tmpdir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-setup-buildx-')).split(path.sep).join(path.posix.sep);
|
||||||
jest.spyOn(context, 'tmpDir').mockImplementation((): string => {
|
jest.spyOn(context, 'tmpDir').mockImplementation((): string => {
|
||||||
@@ -90,6 +91,54 @@ describe('getCreateArgs', () => {
|
|||||||
'tls://foo:1234'
|
'tls://foo:1234'
|
||||||
]
|
]
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
4,
|
||||||
|
new Map<string, string>([
|
||||||
|
['driver', 'remote'],
|
||||||
|
['platforms', 'linux/arm64,linux/arm/v7'],
|
||||||
|
['endpoint', 'tls://foo:1234'],
|
||||||
|
['install', 'false'],
|
||||||
|
['use', 'true'],
|
||||||
|
]),
|
||||||
|
[
|
||||||
|
'create',
|
||||||
|
'--name', 'builder-9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d',
|
||||||
|
'--driver', 'remote',
|
||||||
|
'--platform', 'linux/arm64,linux/arm/v7',
|
||||||
|
'--use',
|
||||||
|
'tls://foo:1234'
|
||||||
|
]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
5,
|
||||||
|
new Map<string, string>([
|
||||||
|
['install', 'false'],
|
||||||
|
['use', 'false'],
|
||||||
|
['driver-opts', `"env.no_proxy=localhost,127.0.0.1,.mydomain"`],
|
||||||
|
]),
|
||||||
|
[
|
||||||
|
'create',
|
||||||
|
'--name', 'builder-9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d',
|
||||||
|
'--driver', 'docker-container',
|
||||||
|
'--driver-opt', '"env.no_proxy=localhost,127.0.0.1,.mydomain"',
|
||||||
|
'--buildkitd-flags', '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host'
|
||||||
|
]
|
||||||
|
],
|
||||||
|
[
|
||||||
|
6,
|
||||||
|
new Map<string, string>([
|
||||||
|
['install', 'false'],
|
||||||
|
['use', 'false'],
|
||||||
|
['platforms', 'linux/amd64\n"linux/arm64,linux/arm/v7"'],
|
||||||
|
]),
|
||||||
|
[
|
||||||
|
'create',
|
||||||
|
'--name', 'builder-9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d',
|
||||||
|
'--driver', 'docker-container',
|
||||||
|
'--buildkitd-flags', '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host',
|
||||||
|
'--platform', 'linux/amd64,linux/arm64,linux/arm/v7'
|
||||||
|
]
|
||||||
|
],
|
||||||
])(
|
])(
|
||||||
'[%d] given %p as inputs, returns %p',
|
'[%d] given %p as inputs, returns %p',
|
||||||
async (num: number, inputs: Map<string, string>, expected: Array<string>) => {
|
async (num: number, inputs: Map<string, string>, expected: Array<string>) => {
|
||||||
@@ -103,6 +152,57 @@ describe('getCreateArgs', () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('getAppendArgs', () => {
|
||||||
|
beforeEach(() => {
|
||||||
|
process.env = Object.keys(process.env).reduce((object, key) => {
|
||||||
|
if (!key.startsWith('INPUT_')) {
|
||||||
|
object[key] = process.env[key];
|
||||||
|
}
|
||||||
|
return object;
|
||||||
|
}, {});
|
||||||
|
});
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
|
test.each([
|
||||||
|
[
|
||||||
|
0,
|
||||||
|
new Map<string, string>([
|
||||||
|
['install', 'false'],
|
||||||
|
['use', 'true'],
|
||||||
|
]),
|
||||||
|
{
|
||||||
|
"name": "aws_graviton2",
|
||||||
|
"endpoint": "ssh://me@graviton2",
|
||||||
|
"driver-opts": [
|
||||||
|
"image=moby/buildkit:latest"
|
||||||
|
],
|
||||||
|
"buildkitd-flags": "--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host",
|
||||||
|
"platforms": "linux/arm64"
|
||||||
|
},
|
||||||
|
[
|
||||||
|
'create',
|
||||||
|
'--name', 'builder-9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d',
|
||||||
|
'--append',
|
||||||
|
'--node', 'aws_graviton2',
|
||||||
|
'--driver-opt', 'image=moby/buildkit:latest',
|
||||||
|
'--buildkitd-flags', '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host',
|
||||||
|
'--platform', 'linux/arm64',
|
||||||
|
'ssh://me@graviton2'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
])(
|
||||||
|
'[%d] given %p as inputs, returns %p',
|
||||||
|
async (num: number, inputs: Map<string, string>, node: nodes.Node, expected: Array<string>) => {
|
||||||
|
inputs.forEach((value: string, name: string) => {
|
||||||
|
setInput(name, value);
|
||||||
|
});
|
||||||
|
const inp = await context.getInputs();
|
||||||
|
const res = await context.getAppendArgs(inp, node, '0.9.0');
|
||||||
|
expect(res).toEqual(expected);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
describe('getInputList', () => {
|
describe('getInputList', () => {
|
||||||
it('handles single line correctly', async () => {
|
it('handles single line correctly', async () => {
|
||||||
await setInput('foo', 'bar');
|
await setInput('foo', 'bar');
|
||||||
|
|||||||
@@ -3,14 +3,18 @@ import * as github from '../src/github';
|
|||||||
|
|
||||||
describe('github', () => {
|
describe('github', () => {
|
||||||
it('returns latest buildx GitHub release', async () => {
|
it('returns latest buildx GitHub release', async () => {
|
||||||
const release = await github.getRelease('latest');
|
const release = await github.getLatestRelease(process.env.GITHUB_TOKEN || '');
|
||||||
expect(release).not.toBeNull();
|
expect(release).not.toBeNull();
|
||||||
expect(release?.tag_name).not.toEqual('');
|
expect(release?.tag_name).not.toEqual('');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('returns v0.2.2 buildx GitHub release', async () => {
|
it('returns v0.2.2 buildx GitHub release', async () => {
|
||||||
const release = await github.getRelease('v0.2.2');
|
const release = await github.getReleaseTag('v0.2.2', process.env.GITHUB_TOKEN || '');
|
||||||
expect(release).not.toBeNull();
|
expect(release).not.toBeNull();
|
||||||
expect(release?.tag_name).toEqual('v0.2.2');
|
expect(release?.tag_name).toEqual('v0.2.2');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('unknown release', async () => {
|
||||||
|
await expect(github.getReleaseTag('foo', process.env.GITHUB_TOKEN || '')).rejects.toThrowError(new Error('Cannot get release foo: HttpError: Not Found'));
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
+15
@@ -32,12 +32,27 @@ inputs:
|
|||||||
endpoint:
|
endpoint:
|
||||||
description: 'Optional address for docker socket or context from `docker context ls`'
|
description: 'Optional address for docker socket or context from `docker context ls`'
|
||||||
required: false
|
required: false
|
||||||
|
platforms:
|
||||||
|
description: 'Fixed platforms for current node. If not empty, values take priority over the detected ones'
|
||||||
|
required: false
|
||||||
config:
|
config:
|
||||||
description: 'BuildKit config file'
|
description: 'BuildKit config file'
|
||||||
required: false
|
required: false
|
||||||
config-inline:
|
config-inline:
|
||||||
description: 'Inline BuildKit config'
|
description: 'Inline BuildKit config'
|
||||||
required: false
|
required: false
|
||||||
|
append:
|
||||||
|
description: 'Append additional nodes to the builder'
|
||||||
|
required: false
|
||||||
|
github_token:
|
||||||
|
# https://github.com/actions/setup-go/blob/21459d0b7b1d63741429b748885bf5a4974593b4/action.yml#L12-L14
|
||||||
|
description: >
|
||||||
|
Used to verifiy the Git tag exists on docker/buildx repo. Since there's a
|
||||||
|
default, this is typically not supplied by the user. When running this
|
||||||
|
action on github.com, the default value is sufficient. When running on
|
||||||
|
GHES, you can pass a personal access token for github.com if you are
|
||||||
|
experiencing rate limiting.
|
||||||
|
default: ${{ github.server_url == 'https://github.com' && github.token || '' }}
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
name:
|
name:
|
||||||
|
|||||||
+2
-1
@@ -72,7 +72,8 @@ RUN --mount=type=bind,target=.,rw \
|
|||||||
--mount=type=cache,target=/src/node_modules \
|
--mount=type=cache,target=/src/node_modules \
|
||||||
--mount=type=bind,from=docker,source=/usr/local/bin/docker,target=/usr/bin/docker \
|
--mount=type=bind,from=docker,source=/usr/local/bin/docker,target=/usr/bin/docker \
|
||||||
--mount=type=bind,from=buildx,source=/buildx,target=/usr/libexec/docker/cli-plugins/docker-buildx \
|
--mount=type=bind,from=buildx,source=/buildx,target=/usr/libexec/docker/cli-plugins/docker-buildx \
|
||||||
yarn run test --coverageDirectory=/tmp/coverage
|
--mount=type=secret,id=GITHUB_TOKEN \
|
||||||
|
GITHUB_TOKEN=$(cat /run/secrets/GITHUB_TOKEN) yarn run test --coverageDirectory=/tmp/coverage
|
||||||
|
|
||||||
FROM scratch AS test-coverage
|
FROM scratch AS test-coverage
|
||||||
COPY --from=test /tmp/coverage /
|
COPY --from=test /tmp/coverage /
|
||||||
|
|||||||
+8
-2
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+574
File diff suppressed because it is too large
Load Diff
@@ -50,4 +50,5 @@ target "test" {
|
|||||||
dockerfile = "dev.Dockerfile"
|
dockerfile = "dev.Dockerfile"
|
||||||
target = "test-coverage"
|
target = "test-coverage"
|
||||||
output = ["./coverage"]
|
output = ["./coverage"]
|
||||||
|
secret = ["id=GITHUB_TOKEN,env=GITHUB_TOKEN"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
# Append additional nodes to the builder
|
||||||
|
|
||||||
|
This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/configure-builder/#append-additional-nodes-to-the-builder)
|
||||||
+1
-67
@@ -1,69 +1,3 @@
|
|||||||
# Authentication support
|
# Authentication support
|
||||||
|
|
||||||
## SSH authentication
|
This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/configure-builder/#authentication-for-remote-builders)
|
||||||
|
|
||||||
To be able to connect to an SSH endpoint using the [`docker-container` driver](https://docs.docker.com/build/building/drivers/docker-container/),
|
|
||||||
you have to set up the SSH private key and configuration on the GitHub Runner:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
name: ci
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
buildx:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Set up SSH
|
|
||||||
uses: MrSquaare/ssh-setup-action@523473d91581ccbf89565e12b40faba93f2708bd # v1.1.0
|
|
||||||
with:
|
|
||||||
host: graviton2
|
|
||||||
private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
||||||
private-key-name: aws_graviton2
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
with:
|
|
||||||
endpoint: ssh://me@graviton2
|
|
||||||
```
|
|
||||||
|
|
||||||
## TLS authentication
|
|
||||||
|
|
||||||
You can also [set up a remote BuildKit instance](https://docs.docker.com/build/building/drivers/remote/#remote-buildkit-in-docker-container)
|
|
||||||
using the remote driver. To ease the integration in your workflow, we put in
|
|
||||||
place environment variables that will set up authentication using the BuildKit
|
|
||||||
client certificates for the `tcp://` endpoint where `<idx>` is the position of
|
|
||||||
the node in the list of nodes:
|
|
||||||
|
|
||||||
* `BUILDER_NODE_<idx>_AUTH_TLS_CACERT`
|
|
||||||
* `BUILDER_NODE_<idx>_AUTH_TLS_CERT`
|
|
||||||
* `BUILDER_NODE_<idx>_AUTH_TLS_KEY`
|
|
||||||
|
|
||||||
> **Note**
|
|
||||||
>
|
|
||||||
> The index is always `0` at the moment as we don't support (yet) appending new
|
|
||||||
> nodes with this action.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
name: ci
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
buildx:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
with:
|
|
||||||
driver: remote
|
|
||||||
endpoint: tcp://graviton2:1234
|
|
||||||
env:
|
|
||||||
BUILDER_NODE_0_AUTH_TLS_CACERT: ${{ secrets.GRAVITON2_CA }}
|
|
||||||
BUILDER_NODE_0_AUTH_TLS_CERT: ${{ secrets.GRAVITON2_CERT }}
|
|
||||||
BUILDER_NODE_0_AUTH_TLS_KEY: ${{ secrets.GRAVITON2_KEY }}
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -1,67 +1,3 @@
|
|||||||
# BuildKit daemon configuration
|
# BuildKit daemon configuration
|
||||||
|
|
||||||
You can provide a [BuildKit configuration](https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md)
|
This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/configure-builder/#daemon-configuration)
|
||||||
to your builder if you're using the [`docker-container` driver](https://docs.docker.com/build/building/drivers/docker-container/)
|
|
||||||
(default) with the `config` or `config-inline` inputs:
|
|
||||||
|
|
||||||
## Registry mirror
|
|
||||||
|
|
||||||
You can configure a registry mirror using an inline block directly in your
|
|
||||||
workflow with the `config-inline` input:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
name: ci
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
buildx:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
with:
|
|
||||||
config-inline: |
|
|
||||||
[registry."docker.io"]
|
|
||||||
mirrors = ["mirror.gcr.io"]
|
|
||||||
```
|
|
||||||
|
|
||||||
## Max parallelism
|
|
||||||
|
|
||||||
You can limit the parallelism of the BuildKit solver which is particularly
|
|
||||||
useful for low-powered machines.
|
|
||||||
|
|
||||||
You can use the `config-inline` input like the previous example, or you can use
|
|
||||||
a dedicated BuildKit config file from your repo if you want with the
|
|
||||||
`config` input:
|
|
||||||
|
|
||||||
```toml
|
|
||||||
# .github/buildkitd.toml
|
|
||||||
[worker.oci]
|
|
||||||
max-parallelism = 4
|
|
||||||
```
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
name: ci
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
buildx:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
with:
|
|
||||||
config: .github/buildkitd.toml
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -1,28 +0,0 @@
|
|||||||
# Install by default
|
|
||||||
|
|
||||||
If you want set up the `docker build` command as an alias to
|
|
||||||
`docker buildx build`:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
name: ci
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
buildx:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
with:
|
|
||||||
install: true
|
|
||||||
-
|
|
||||||
name: Build
|
|
||||||
run: |
|
|
||||||
docker build . # will run buildx
|
|
||||||
```
|
|
||||||
@@ -1,29 +1,3 @@
|
|||||||
# Standalone mode
|
# Standalone mode
|
||||||
|
|
||||||
If you don't have the Docker CLI installed on the GitHub Runner, Buildx binary
|
This page has moved to [Docker Docs website](https://docs.docker.com/build/ci/github-actions/configure-builder/#standalone-mode)
|
||||||
is invoked directly, instead of calling it as a docker plugin. This can be
|
|
||||||
useful if you want to use the `kubernetes` driver in your self-hosted runner:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
name: ci
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
buildx:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
-
|
|
||||||
name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
-
|
|
||||||
name: Set up Docker Buildx
|
|
||||||
uses: docker/setup-buildx-action@v2
|
|
||||||
with:
|
|
||||||
driver: kubernetes
|
|
||||||
-
|
|
||||||
name: Build
|
|
||||||
run: |
|
|
||||||
buildx build .
|
|
||||||
```
|
|
||||||
|
|||||||
+5
-2
@@ -1,10 +1,13 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
clearMocks: true,
|
clearMocks: true,
|
||||||
moduleFileExtensions: ['js', 'ts'],
|
moduleFileExtensions: ['js', 'ts'],
|
||||||
setupFiles: ["dotenv/config"],
|
setupFiles: ['dotenv/config'],
|
||||||
testMatch: ['**/*.test.ts'],
|
testMatch: ['**/*.test.ts'],
|
||||||
transform: {
|
transform: {
|
||||||
'^.+\\.ts$': 'ts-jest'
|
'^.+\\.ts$': 'ts-jest'
|
||||||
},
|
},
|
||||||
|
moduleNameMapper: {
|
||||||
|
'^csv-parse/sync': '<rootDir>/node_modules/csv-parse/dist/cjs/sync.cjs'
|
||||||
|
},
|
||||||
verbose: true
|
verbose: true
|
||||||
}
|
};
|
||||||
|
|||||||
+3
-1
@@ -29,8 +29,10 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
"@actions/http-client": "^2.0.1",
|
"@actions/github": "^5.1.1",
|
||||||
"@actions/tool-cache": "^2.0.1",
|
"@actions/tool-cache": "^2.0.1",
|
||||||
|
"csv-parse": "^5.3.3",
|
||||||
|
"js-yaml": "^4.1.0",
|
||||||
"semver": "^7.3.7",
|
"semver": "^7.3.7",
|
||||||
"tmp": "^0.2.1",
|
"tmp": "^0.2.1",
|
||||||
"uuid": "^9.0.0"
|
"uuid": "^9.0.0"
|
||||||
|
|||||||
+6
-4
@@ -237,10 +237,12 @@ export async function build(inputBuildRef: string, dest: string, standalone: boo
|
|||||||
return setPlugin(toolPath, dest);
|
return setPlugin(toolPath, dest);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function install(inputVersion: string, dest: string, standalone: boolean): Promise<string> {
|
export async function install(inputVersion: string, githubToken: string, dest: string, standalone: boolean): Promise<string> {
|
||||||
const release: github.GitHubRelease | null = await github.getRelease(inputVersion);
|
let release: github.Release;
|
||||||
if (!release) {
|
if (inputVersion == 'latest') {
|
||||||
throw new Error(`Cannot find buildx ${inputVersion} release`);
|
release = await github.getLatestRelease(githubToken);
|
||||||
|
} else {
|
||||||
|
release = await github.getReleaseTag(inputVersion, githubToken);
|
||||||
}
|
}
|
||||||
core.debug(`Release ${release.tag_name} found`);
|
core.debug(`Release ${release.tag_name} found`);
|
||||||
const version = release.tag_name.replace(/^v+|v+$/g, '');
|
const version = release.tag_name.replace(/^v+|v+$/g, '');
|
||||||
|
|||||||
+60
-7
@@ -3,7 +3,9 @@ import * as os from 'os';
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import * as tmp from 'tmp';
|
import * as tmp from 'tmp';
|
||||||
import * as uuid from 'uuid';
|
import * as uuid from 'uuid';
|
||||||
|
import {parse} from 'csv-parse/sync';
|
||||||
import * as buildx from './buildx';
|
import * as buildx from './buildx';
|
||||||
|
import * as nodes from './nodes';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
|
|
||||||
let _tmpDir: string;
|
let _tmpDir: string;
|
||||||
@@ -27,11 +29,14 @@ export interface Inputs {
|
|||||||
driver: string;
|
driver: string;
|
||||||
driverOpts: string[];
|
driverOpts: string[];
|
||||||
buildkitdFlags: string;
|
buildkitdFlags: string;
|
||||||
|
platforms: string[];
|
||||||
install: boolean;
|
install: boolean;
|
||||||
use: boolean;
|
use: boolean;
|
||||||
endpoint: string;
|
endpoint: string;
|
||||||
config: string;
|
config: string;
|
||||||
configInline: string;
|
configInline: string;
|
||||||
|
append: string;
|
||||||
|
githubToken: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getInputs(): Promise<Inputs> {
|
export async function getInputs(): Promise<Inputs> {
|
||||||
@@ -41,11 +46,14 @@ export async function getInputs(): Promise<Inputs> {
|
|||||||
driver: core.getInput('driver') || 'docker-container',
|
driver: core.getInput('driver') || 'docker-container',
|
||||||
driverOpts: await getInputList('driver-opts', true),
|
driverOpts: await getInputList('driver-opts', true),
|
||||||
buildkitdFlags: core.getInput('buildkitd-flags') || '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host',
|
buildkitdFlags: core.getInput('buildkitd-flags') || '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host',
|
||||||
|
platforms: await getInputList('platforms', false, true),
|
||||||
install: core.getBooleanInput('install'),
|
install: core.getBooleanInput('install'),
|
||||||
use: core.getBooleanInput('use'),
|
use: core.getBooleanInput('use'),
|
||||||
endpoint: core.getInput('endpoint'),
|
endpoint: core.getInput('endpoint'),
|
||||||
config: core.getInput('config'),
|
config: core.getInput('config'),
|
||||||
configInline: core.getInput('config-inline')
|
configInline: core.getInput('config-inline'),
|
||||||
|
append: core.getInput('append'),
|
||||||
|
githubToken: core.getInput('github_token')
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -63,6 +71,9 @@ export async function getCreateArgs(inputs: Inputs, buildxVersion: string): Prom
|
|||||||
args.push('--buildkitd-flags', inputs.buildkitdFlags);
|
args.push('--buildkitd-flags', inputs.buildkitdFlags);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (inputs.platforms.length > 0) {
|
||||||
|
args.push('--platform', inputs.platforms.join(','));
|
||||||
|
}
|
||||||
if (inputs.use) {
|
if (inputs.use) {
|
||||||
args.push('--use');
|
args.push('--use');
|
||||||
}
|
}
|
||||||
@@ -79,6 +90,28 @@ export async function getCreateArgs(inputs: Inputs, buildxVersion: string): Prom
|
|||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function getAppendArgs(inputs: Inputs, node: nodes.Node, buildxVersion: string): Promise<Array<string>> {
|
||||||
|
const args: Array<string> = ['create', '--name', inputs.name, '--append'];
|
||||||
|
if (node.name) {
|
||||||
|
args.push('--node', node.name);
|
||||||
|
}
|
||||||
|
if (node['driver-opts'] && buildx.satisfies(buildxVersion, '>=0.3.0')) {
|
||||||
|
await asyncForEach(node['driver-opts'], async driverOpt => {
|
||||||
|
args.push('--driver-opt', driverOpt);
|
||||||
|
});
|
||||||
|
if (inputs.driver != 'remote' && node['buildkitd-flags']) {
|
||||||
|
args.push('--buildkitd-flags', node['buildkitd-flags']);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (node.platforms) {
|
||||||
|
args.push('--platform', node.platforms);
|
||||||
|
}
|
||||||
|
if (node.endpoint) {
|
||||||
|
args.push(node.endpoint);
|
||||||
|
}
|
||||||
|
return args;
|
||||||
|
}
|
||||||
|
|
||||||
export async function getInspectArgs(inputs: Inputs, buildxVersion: string): Promise<Array<string>> {
|
export async function getInspectArgs(inputs: Inputs, buildxVersion: string): Promise<Array<string>> {
|
||||||
const args: Array<string> = ['inspect', '--bootstrap'];
|
const args: Array<string> = ['inspect', '--bootstrap'];
|
||||||
if (buildx.satisfies(buildxVersion, '>=0.4.0')) {
|
if (buildx.satisfies(buildxVersion, '>=0.4.0')) {
|
||||||
@@ -87,15 +120,35 @@ export async function getInspectArgs(inputs: Inputs, buildxVersion: string): Pro
|
|||||||
return args;
|
return args;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getInputList(name: string, ignoreComma?: boolean): Promise<string[]> {
|
export async function getInputList(name: string, ignoreComma?: boolean, escapeQuotes?: boolean): Promise<string[]> {
|
||||||
|
const res: Array<string> = [];
|
||||||
|
|
||||||
const items = core.getInput(name);
|
const items = core.getInput(name);
|
||||||
if (items == '') {
|
if (items == '') {
|
||||||
return [];
|
return res;
|
||||||
}
|
}
|
||||||
return items
|
|
||||||
.split(/\r?\n/)
|
const records = parse(items, {
|
||||||
.filter(x => x)
|
columns: false,
|
||||||
.reduce<string[]>((acc, line) => acc.concat(!ignoreComma ? line.split(',').filter(x => x) : line).map(pat => pat.trim()), []);
|
relaxQuotes: true,
|
||||||
|
comment: '#',
|
||||||
|
relaxColumnCount: true,
|
||||||
|
skipEmptyLines: true,
|
||||||
|
quote: escapeQuotes ? `"` : false
|
||||||
|
});
|
||||||
|
|
||||||
|
for (const record of records as Array<string[]>) {
|
||||||
|
if (record.length == 1) {
|
||||||
|
res.push(record[0]);
|
||||||
|
continue;
|
||||||
|
} else if (!ignoreComma) {
|
||||||
|
res.push(...record);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
res.push(record.join(','));
|
||||||
|
}
|
||||||
|
|
||||||
|
return res.filter(item => item).map(pat => pat.trim());
|
||||||
}
|
}
|
||||||
|
|
||||||
export const asyncForEach = async (array, callback) => {
|
export const asyncForEach = async (array, callback) => {
|
||||||
|
|||||||
+35
-6
@@ -1,12 +1,41 @@
|
|||||||
import * as httpm from '@actions/http-client';
|
import * as github from '@actions/github';
|
||||||
|
|
||||||
export interface GitHubRelease {
|
export interface Release {
|
||||||
id: number;
|
id: number;
|
||||||
tag_name: string;
|
tag_name: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getRelease = async (version: string): Promise<GitHubRelease | null> => {
|
const [owner, repo] = 'docker/buildx'.split('/');
|
||||||
const url = `https://github.com/docker/buildx/releases/${version}`;
|
|
||||||
const http: httpm.HttpClient = new httpm.HttpClient('setup-buildx');
|
export const getReleaseTag = async (tag: string, githubToken: string): Promise<Release> => {
|
||||||
return (await http.getJson<GitHubRelease>(url)).result;
|
return (
|
||||||
|
await github
|
||||||
|
.getOctokit(githubToken, {
|
||||||
|
baseUrl: 'https://api.github.com'
|
||||||
|
})
|
||||||
|
.rest.repos.getReleaseByTag({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
tag
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
throw new Error(`Cannot get release ${tag}: ${error}`);
|
||||||
|
})
|
||||||
|
).data as Release;
|
||||||
|
};
|
||||||
|
|
||||||
|
export const getLatestRelease = async (githubToken: string): Promise<Release> => {
|
||||||
|
return (
|
||||||
|
await github
|
||||||
|
.getOctokit(githubToken, {
|
||||||
|
baseUrl: 'https://api.github.com'
|
||||||
|
})
|
||||||
|
.rest.repos.getLatestRelease({
|
||||||
|
owner,
|
||||||
|
repo
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
throw new Error(`Cannot get latest release: ${error}`);
|
||||||
|
})
|
||||||
|
).data as Release;
|
||||||
};
|
};
|
||||||
|
|||||||
+27
-2
@@ -5,6 +5,7 @@ import * as auth from './auth';
|
|||||||
import * as buildx from './buildx';
|
import * as buildx from './buildx';
|
||||||
import * as context from './context';
|
import * as context from './context';
|
||||||
import * as docker from './docker';
|
import * as docker from './docker';
|
||||||
|
import * as nodes from './nodes';
|
||||||
import * as stateHelper from './state-helper';
|
import * as stateHelper from './state-helper';
|
||||||
import * as util from './util';
|
import * as util from './util';
|
||||||
import * as core from '@actions/core';
|
import * as core from '@actions/core';
|
||||||
@@ -41,7 +42,7 @@ async function run(): Promise<void> {
|
|||||||
core.endGroup();
|
core.endGroup();
|
||||||
} else if (!(await buildx.isAvailable(standalone)) || inputs.version) {
|
} else if (!(await buildx.isAvailable(standalone)) || inputs.version) {
|
||||||
core.startGroup(`Download and install buildx`);
|
core.startGroup(`Download and install buildx`);
|
||||||
await buildx.install(inputs.version || 'latest', standalone ? context.tmpDir() : dockerConfigHome, standalone);
|
await buildx.install(inputs.version || 'latest', inputs.githubToken, standalone ? context.tmpDir() : dockerConfigHome, standalone);
|
||||||
core.endGroup();
|
core.endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -71,6 +72,21 @@ async function run(): Promise<void> {
|
|||||||
core.endGroup();
|
core.endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (inputs.append) {
|
||||||
|
core.startGroup(`Appending node(s) to builder`);
|
||||||
|
let nodeIndex = 1;
|
||||||
|
for (const node of nodes.Parse(inputs.append)) {
|
||||||
|
const authOpts = auth.setCredentials(credsdir, nodeIndex, inputs.driver, node.endpoint || '');
|
||||||
|
if (authOpts.length > 0) {
|
||||||
|
node['driver-opts'] = [...(node['driver-opts'] || []), ...authOpts];
|
||||||
|
}
|
||||||
|
const appendCmd = buildx.getCommand(await context.getAppendArgs(inputs, node, buildxVersion), standalone);
|
||||||
|
await exec.exec(appendCmd.commandLine, appendCmd.args);
|
||||||
|
nodeIndex++;
|
||||||
|
}
|
||||||
|
core.endGroup();
|
||||||
|
}
|
||||||
|
|
||||||
core.startGroup(`Booting builder`);
|
core.startGroup(`Booting builder`);
|
||||||
const inspectCmd = buildx.getCommand(await context.getInspectArgs(inputs, buildxVersion), standalone);
|
const inspectCmd = buildx.getCommand(await context.getInspectArgs(inputs, buildxVersion), standalone);
|
||||||
await exec.exec(inspectCmd.commandLine, inspectCmd.args);
|
await exec.exec(inspectCmd.commandLine, inspectCmd.args);
|
||||||
@@ -88,9 +104,18 @@ async function run(): Promise<void> {
|
|||||||
core.startGroup(`Inspect builder`);
|
core.startGroup(`Inspect builder`);
|
||||||
const builder = await buildx.inspect(inputs.name, standalone);
|
const builder = await buildx.inspect(inputs.name, standalone);
|
||||||
const firstNode = builder.nodes[0];
|
const firstNode = builder.nodes[0];
|
||||||
|
const reducedPlatforms: Array<string> = [];
|
||||||
|
for (const node of builder.nodes) {
|
||||||
|
for (const platform of node.platforms?.split(',') || []) {
|
||||||
|
if (reducedPlatforms.indexOf(platform) > -1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
reducedPlatforms.push(platform);
|
||||||
|
}
|
||||||
|
}
|
||||||
core.info(JSON.stringify(builder, undefined, 2));
|
core.info(JSON.stringify(builder, undefined, 2));
|
||||||
core.setOutput('driver', builder.driver);
|
core.setOutput('driver', builder.driver);
|
||||||
core.setOutput('platforms', firstNode.platforms);
|
core.setOutput('platforms', reducedPlatforms.join(','));
|
||||||
core.setOutput('nodes', JSON.stringify(builder.nodes, undefined, 2));
|
core.setOutput('nodes', JSON.stringify(builder.nodes, undefined, 2));
|
||||||
core.setOutput('endpoint', firstNode.endpoint); // TODO: deprecated, to be removed in a later version
|
core.setOutput('endpoint', firstNode.endpoint); // TODO: deprecated, to be removed in a later version
|
||||||
core.setOutput('status', firstNode.status); // TODO: deprecated, to be removed in a later version
|
core.setOutput('status', firstNode.status); // TODO: deprecated, to be removed in a later version
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import * as yaml from 'js-yaml';
|
||||||
|
|
||||||
|
export type Node = {
|
||||||
|
name?: string;
|
||||||
|
endpoint?: string;
|
||||||
|
'driver-opts'?: Array<string>;
|
||||||
|
'buildkitd-flags'?: string;
|
||||||
|
platforms?: string;
|
||||||
|
};
|
||||||
|
|
||||||
|
export function Parse(data: string): Node[] {
|
||||||
|
return yaml.load(data) as Node[];
|
||||||
|
}
|
||||||
@@ -17,6 +17,16 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@actions/io" "^1.0.1"
|
"@actions/io" "^1.0.1"
|
||||||
|
|
||||||
|
"@actions/github@^5.1.1":
|
||||||
|
version "5.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@actions/github/-/github-5.1.1.tgz#40b9b9e1323a5efcf4ff7dadd33d8ea51651bbcb"
|
||||||
|
integrity sha512-Nk59rMDoJaV+mHCOJPXuvB1zIbomlKS0dmSIqPGxd0enAXBnOfn4VWF+CGtRCwXZG9Epa54tZA7VIRlJDS8A6g==
|
||||||
|
dependencies:
|
||||||
|
"@actions/http-client" "^2.0.1"
|
||||||
|
"@octokit/core" "^3.6.0"
|
||||||
|
"@octokit/plugin-paginate-rest" "^2.17.0"
|
||||||
|
"@octokit/plugin-rest-endpoint-methods" "^5.13.0"
|
||||||
|
|
||||||
"@actions/http-client@^2.0.1":
|
"@actions/http-client@^2.0.1":
|
||||||
version "2.0.1"
|
version "2.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-2.0.1.tgz#873f4ca98fe32f6839462a6f046332677322f99c"
|
resolved "https://registry.yarnpkg.com/@actions/http-client/-/http-client-2.0.1.tgz#873f4ca98fe32f6839462a6f046332677322f99c"
|
||||||
@@ -801,6 +811,92 @@
|
|||||||
"@nodelib/fs.scandir" "2.1.5"
|
"@nodelib/fs.scandir" "2.1.5"
|
||||||
fastq "^1.6.0"
|
fastq "^1.6.0"
|
||||||
|
|
||||||
|
"@octokit/auth-token@^2.4.4":
|
||||||
|
version "2.5.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.5.0.tgz#27c37ea26c205f28443402477ffd261311f21e36"
|
||||||
|
integrity sha512-r5FVUJCOLl19AxiuZD2VRZ/ORjp/4IN98Of6YJoJOkY75CIBuYfmiNHGrDwXr+aLGG55igl9QrxX3hbiXlLb+g==
|
||||||
|
dependencies:
|
||||||
|
"@octokit/types" "^6.0.3"
|
||||||
|
|
||||||
|
"@octokit/core@^3.6.0":
|
||||||
|
version "3.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@octokit/core/-/core-3.6.0.tgz#3376cb9f3008d9b3d110370d90e0a1fcd5fe6085"
|
||||||
|
integrity sha512-7RKRKuA4xTjMhY+eG3jthb3hlZCsOwg3rztWh75Xc+ShDWOfDDATWbeZpAHBNRpm4Tv9WgBMOy1zEJYXG6NJ7Q==
|
||||||
|
dependencies:
|
||||||
|
"@octokit/auth-token" "^2.4.4"
|
||||||
|
"@octokit/graphql" "^4.5.8"
|
||||||
|
"@octokit/request" "^5.6.3"
|
||||||
|
"@octokit/request-error" "^2.0.5"
|
||||||
|
"@octokit/types" "^6.0.3"
|
||||||
|
before-after-hook "^2.2.0"
|
||||||
|
universal-user-agent "^6.0.0"
|
||||||
|
|
||||||
|
"@octokit/endpoint@^6.0.1":
|
||||||
|
version "6.0.12"
|
||||||
|
resolved "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.12.tgz#3b4d47a4b0e79b1027fb8d75d4221928b2d05658"
|
||||||
|
integrity sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==
|
||||||
|
dependencies:
|
||||||
|
"@octokit/types" "^6.0.3"
|
||||||
|
is-plain-object "^5.0.0"
|
||||||
|
universal-user-agent "^6.0.0"
|
||||||
|
|
||||||
|
"@octokit/graphql@^4.5.8":
|
||||||
|
version "4.8.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.8.0.tgz#664d9b11c0e12112cbf78e10f49a05959aa22cc3"
|
||||||
|
integrity sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==
|
||||||
|
dependencies:
|
||||||
|
"@octokit/request" "^5.6.0"
|
||||||
|
"@octokit/types" "^6.0.3"
|
||||||
|
universal-user-agent "^6.0.0"
|
||||||
|
|
||||||
|
"@octokit/openapi-types@^12.11.0":
|
||||||
|
version "12.11.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-12.11.0.tgz#da5638d64f2b919bca89ce6602d059f1b52d3ef0"
|
||||||
|
integrity sha512-VsXyi8peyRq9PqIz/tpqiL2w3w80OgVMwBHltTml3LmVvXiphgeqmY9mvBw9Wu7e0QWk/fqD37ux8yP5uVekyQ==
|
||||||
|
|
||||||
|
"@octokit/plugin-paginate-rest@^2.17.0":
|
||||||
|
version "2.21.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz#7f12532797775640dbb8224da577da7dc210c87e"
|
||||||
|
integrity sha512-aCZTEf0y2h3OLbrgKkrfFdjRL6eSOo8komneVQJnYecAxIej7Bafor2xhuDJOIFau4pk0i/P28/XgtbyPF0ZHw==
|
||||||
|
dependencies:
|
||||||
|
"@octokit/types" "^6.40.0"
|
||||||
|
|
||||||
|
"@octokit/plugin-rest-endpoint-methods@^5.13.0":
|
||||||
|
version "5.16.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz#7ee8bf586df97dd6868cf68f641354e908c25342"
|
||||||
|
integrity sha512-8QFz29Fg5jDuTPXVtey05BLm7OB+M8fnvE64RNegzX7U+5NUXcOcnpTIK0YfSHBg8gYd0oxIq3IZTe9SfPZiRw==
|
||||||
|
dependencies:
|
||||||
|
"@octokit/types" "^6.39.0"
|
||||||
|
deprecation "^2.3.1"
|
||||||
|
|
||||||
|
"@octokit/request-error@^2.0.5", "@octokit/request-error@^2.1.0":
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.1.0.tgz#9e150357831bfc788d13a4fd4b1913d60c74d677"
|
||||||
|
integrity sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==
|
||||||
|
dependencies:
|
||||||
|
"@octokit/types" "^6.0.3"
|
||||||
|
deprecation "^2.0.0"
|
||||||
|
once "^1.4.0"
|
||||||
|
|
||||||
|
"@octokit/request@^5.6.0", "@octokit/request@^5.6.3":
|
||||||
|
version "5.6.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.3.tgz#19a022515a5bba965ac06c9d1334514eb50c48b0"
|
||||||
|
integrity sha512-bFJl0I1KVc9jYTe9tdGGpAMPy32dLBXXo1dS/YwSCTL/2nd9XeHsY616RE3HPXDVk+a+dBuzyz5YdlXwcDTr2A==
|
||||||
|
dependencies:
|
||||||
|
"@octokit/endpoint" "^6.0.1"
|
||||||
|
"@octokit/request-error" "^2.1.0"
|
||||||
|
"@octokit/types" "^6.16.1"
|
||||||
|
is-plain-object "^5.0.0"
|
||||||
|
node-fetch "^2.6.7"
|
||||||
|
universal-user-agent "^6.0.0"
|
||||||
|
|
||||||
|
"@octokit/types@^6.0.3", "@octokit/types@^6.16.1", "@octokit/types@^6.39.0", "@octokit/types@^6.40.0":
|
||||||
|
version "6.41.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@octokit/types/-/types-6.41.0.tgz#e58ef78d78596d2fb7df9c6259802464b5f84a04"
|
||||||
|
integrity sha512-eJ2jbzjdijiL3B4PrSQaSjuF2sPEQPVCPzBvTHJD9Nz+9dw2SGH4K4xeQJ77YfTq5bRQ+bD8wT11JbeDPmxmGg==
|
||||||
|
dependencies:
|
||||||
|
"@octokit/openapi-types" "^12.11.0"
|
||||||
|
|
||||||
"@sinonjs/commons@^1.7.0":
|
"@sinonjs/commons@^1.7.0":
|
||||||
version "1.8.3"
|
version "1.8.3"
|
||||||
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d"
|
resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-1.8.3.tgz#3802ddd21a50a949b6721ddd72da36e67e7f1b2d"
|
||||||
@@ -1234,6 +1330,11 @@ balanced-match@^1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
|
||||||
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
|
||||||
|
|
||||||
|
before-after-hook@^2.2.0:
|
||||||
|
version "2.2.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c"
|
||||||
|
integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==
|
||||||
|
|
||||||
brace-expansion@^1.1.7:
|
brace-expansion@^1.1.7:
|
||||||
version "1.1.11"
|
version "1.1.11"
|
||||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||||
@@ -1410,7 +1511,7 @@ combined-stream@^1.0.8:
|
|||||||
[email protected]:
|
[email protected]:
|
||||||
version "0.0.1"
|
version "0.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
|
||||||
integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=
|
integrity sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==
|
||||||
|
|
||||||
convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0:
|
convert-source-map@^1.4.0, convert-source-map@^1.6.0, convert-source-map@^1.7.0:
|
||||||
version "1.8.0"
|
version "1.8.0"
|
||||||
@@ -1450,6 +1551,11 @@ cssstyle@^2.3.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
cssom "~0.3.6"
|
cssom "~0.3.6"
|
||||||
|
|
||||||
|
csv-parse@^5.3.3:
|
||||||
|
version "5.3.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/csv-parse/-/csv-parse-5.3.3.tgz#3b75d2279e2edb550cbc54c65b25cbbf3d0033ad"
|
||||||
|
integrity sha512-kEWkAPleNEdhFNkHQpFHu9RYPogsFj3dx6bCxL847fsiLgidzWg0z/O0B1kVWMJUc5ky64zGp18LX2T3DQrOfw==
|
||||||
|
|
||||||
data-urls@^2.0.0:
|
data-urls@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b"
|
resolved "https://registry.yarnpkg.com/data-urls/-/data-urls-2.0.0.tgz#156485a72963a970f5d5821aaf642bef2bf2db9b"
|
||||||
@@ -1503,6 +1609,11 @@ delayed-stream@~1.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
|
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
|
||||||
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
|
integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk=
|
||||||
|
|
||||||
|
deprecation@^2.0.0, deprecation@^2.3.1:
|
||||||
|
version "2.3.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/deprecation/-/deprecation-2.3.1.tgz#6368cbdb40abf3373b525ac87e4a260c3a700919"
|
||||||
|
integrity sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==
|
||||||
|
|
||||||
detect-newline@^3.0.0:
|
detect-newline@^3.0.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
|
resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651"
|
||||||
@@ -2094,6 +2205,11 @@ is-number@^7.0.0:
|
|||||||
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
|
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
|
||||||
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
|
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
|
||||||
|
|
||||||
|
is-plain-object@^5.0.0:
|
||||||
|
version "5.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344"
|
||||||
|
integrity sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==
|
||||||
|
|
||||||
is-potential-custom-element-name@^1.0.1:
|
is-potential-custom-element-name@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5"
|
resolved "https://registry.yarnpkg.com/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz#171ed6f19e3ac554394edf78caa05784a45bebb5"
|
||||||
@@ -2640,11 +2756,9 @@ json-stable-stringify-without-jsonify@^1.0.1:
|
|||||||
integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=
|
integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=
|
||||||
|
|
||||||
[email protected], json5@^2.1.2:
|
[email protected], json5@^2.1.2:
|
||||||
version "2.2.0"
|
version "2.2.3"
|
||||||
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3"
|
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283"
|
||||||
integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==
|
integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==
|
||||||
dependencies:
|
|
||||||
minimist "^1.2.5"
|
|
||||||
|
|
||||||
kleur@^3.0.3:
|
kleur@^3.0.3:
|
||||||
version "3.0.3"
|
version "3.0.3"
|
||||||
@@ -2761,17 +2875,12 @@ mimic-fn@^2.1.0:
|
|||||||
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
|
integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==
|
||||||
|
|
||||||
minimatch@^3.0.4:
|
minimatch@^3.0.4:
|
||||||
version "3.0.4"
|
version "3.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
|
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b"
|
||||||
integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
|
integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==
|
||||||
dependencies:
|
dependencies:
|
||||||
brace-expansion "^1.1.7"
|
brace-expansion "^1.1.7"
|
||||||
|
|
||||||
minimist@^1.2.5:
|
|
||||||
version "1.2.6"
|
|
||||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
|
|
||||||
integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==
|
|
||||||
|
|
||||||
[email protected]:
|
[email protected]:
|
||||||
version "2.1.2"
|
version "2.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
|
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
|
||||||
@@ -2782,6 +2891,13 @@ natural-compare@^1.4.0:
|
|||||||
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
|
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
|
||||||
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
|
integrity sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=
|
||||||
|
|
||||||
|
node-fetch@^2.6.7:
|
||||||
|
version "2.6.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.8.tgz#a68d30b162bc1d8fd71a367e81b997e1f4d4937e"
|
||||||
|
integrity sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==
|
||||||
|
dependencies:
|
||||||
|
whatwg-url "^5.0.0"
|
||||||
|
|
||||||
node-int64@^0.4.0:
|
node-int64@^0.4.0:
|
||||||
version "0.4.0"
|
version "0.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
|
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
|
||||||
@@ -2814,7 +2930,7 @@ nwsapi@^2.2.0:
|
|||||||
resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7"
|
resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.2.0.tgz#204879a9e3d068ff2a55139c2c772780681a38b7"
|
||||||
integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==
|
integrity sha512-h2AatdwYH+JHiZpv7pt/gSX1XoRGb7L/qSIeuqA6GwYoF9w1vP1cw42TO0aI2pNyshRK5893hNSl+1//vHK7hQ==
|
||||||
|
|
||||||
once@^1.3.0:
|
once@^1.3.0, once@^1.4.0:
|
||||||
version "1.4.0"
|
version "1.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||||
integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
|
integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
|
||||||
@@ -3307,6 +3423,11 @@ tr46@^2.1.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
punycode "^2.1.1"
|
punycode "^2.1.1"
|
||||||
|
|
||||||
|
tr46@~0.0.3:
|
||||||
|
version "0.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
|
||||||
|
integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==
|
||||||
|
|
||||||
ts-jest@^27.1.2:
|
ts-jest@^27.1.2:
|
||||||
version "27.1.3"
|
version "27.1.3"
|
||||||
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.1.3.tgz#1f723e7e74027c4da92c0ffbd73287e8af2b2957"
|
resolved "https://registry.yarnpkg.com/ts-jest/-/ts-jest-27.1.3.tgz#1f723e7e74027c4da92c0ffbd73287e8af2b2957"
|
||||||
@@ -3398,6 +3519,11 @@ typescript@^4.4.4:
|
|||||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.2.tgz#fe12d2727b708f4eef40f51598b3398baa9611d4"
|
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.2.tgz#fe12d2727b708f4eef40f51598b3398baa9611d4"
|
||||||
integrity sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==
|
integrity sha512-HM/hFigTBHZhLXshn9sN37H085+hQGeJHJ/X7LpBWLID/fbc2acUMfU+lGD98X81sKP+pFa9f0DZmCwB9GnbAg==
|
||||||
|
|
||||||
|
universal-user-agent@^6.0.0:
|
||||||
|
version "6.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee"
|
||||||
|
integrity sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==
|
||||||
|
|
||||||
universalify@^0.1.2:
|
universalify@^0.1.2:
|
||||||
version "0.1.2"
|
version "0.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
|
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
|
||||||
@@ -3465,6 +3591,11 @@ walker@^1.0.7:
|
|||||||
dependencies:
|
dependencies:
|
||||||
makeerror "1.0.x"
|
makeerror "1.0.x"
|
||||||
|
|
||||||
|
webidl-conversions@^3.0.0:
|
||||||
|
version "3.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"
|
||||||
|
integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==
|
||||||
|
|
||||||
webidl-conversions@^5.0.0:
|
webidl-conversions@^5.0.0:
|
||||||
version "5.0.0"
|
version "5.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff"
|
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-5.0.0.tgz#ae59c8a00b121543a2acc65c0434f57b0fc11aff"
|
||||||
@@ -3487,6 +3618,14 @@ whatwg-mimetype@^2.3.0:
|
|||||||
resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf"
|
resolved "https://registry.yarnpkg.com/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz#3d4b1e0312d2079879f826aff18dbeeca5960fbf"
|
||||||
integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==
|
integrity sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==
|
||||||
|
|
||||||
|
whatwg-url@^5.0.0:
|
||||||
|
version "5.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d"
|
||||||
|
integrity sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==
|
||||||
|
dependencies:
|
||||||
|
tr46 "~0.0.3"
|
||||||
|
webidl-conversions "^3.0.0"
|
||||||
|
|
||||||
whatwg-url@^8.0.0, whatwg-url@^8.5.0:
|
whatwg-url@^8.0.0, whatwg-url@^8.5.0:
|
||||||
version "8.6.0"
|
version "8.6.0"
|
||||||
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.6.0.tgz#27c0205a4902084b872aecb97cf0f2a7a3011f4c"
|
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-8.6.0.tgz#27c0205a4902084b872aecb97cf0f2a7a3011f4c"
|
||||||
|
|||||||
Reference in New Issue
Block a user