33 Commits

Author SHA1 Message Date
5bddaa4323 Merge pull request #66 from crazy-max/dependabot/npm_and_yarn/docker/actions-toolkit-0.21.1
build(deps): bump @docker/actions-toolkit from 0.18.0 to 0.21.1
2024-04-25 11:39:39 +02:00
17819a1af9 chore: update generated content 2024-04-25 11:23:13 +02:00
d20884258e build(deps): bump @docker/actions-toolkit from 0.18.0 to 0.21.1
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.18.0 to 0.21.1.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.18.0...v0.21.1)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-25 09:06:09 +00:00
b74351ab97 Merge pull request #68 from MatthewCane/truncate-rundir-path-name
truncate runDir path name
2024-04-25 10:33:54 +02:00
0f5a011c3d Merge pull request #69 from crazy-max/pin-macos-vers
ci: pin to macos-13
2024-04-25 10:33:11 +02:00
99cad45695 readme: instruction for macos arm runners 2024-04-25 10:32:43 +02:00
aceee1722e ci: pin to macos-13 2024-04-25 10:32:43 +02:00
0cb459c59a chore: update generated content 2024-04-24 13:24:26 +01:00
81886c7276 Truncate runDir path name 2024-04-24 11:49:01 +01:00
fdc6583d4e Merge pull request #64 from crazy-max/ci-codecov-token
ci: set CODECOV_TOKEN
2024-04-08 09:49:45 +02:00
a4b15f09d5 ci: set CODECOV_TOKEN 2024-04-08 09:48:20 +02:00
c2351bbd0b Merge pull request #59 from crazy-max/ci-concurrency
ci: concurrency checks
2024-02-29 16:41:57 +01:00
c14b6e1c32 ci: concurrency checks 2024-02-29 16:40:39 +01:00
f1d16883d0 Merge pull request #58 from crazy-max/set-host
set-host input to set DOCKER_HOST env var
2024-02-29 16:39:12 +01:00
5de1d6bef5 chore: update generated content 2024-02-29 16:37:35 +01:00
7d4fd999a5 set-host input to set DOCKER_HOST env var 2024-02-29 16:37:34 +01:00
38c07112bd Merge pull request #57 from crazy-max/sock-output
sock output to get docker socket path
2024-02-29 16:31:31 +01:00
c6f8a8a2ba ci: bump default docker version 2024-02-29 16:30:20 +01:00
2960188cea chore: update generated content 2024-02-29 16:26:07 +01:00
8e060aa468 sock output to get docker socket path 2024-02-29 16:20:43 +01:00
fc6fa62ba9 Merge pull request #56 from crazy-max/dependabot/npm_and_yarn/docker/actions-toolkit-0.18.0
build(deps): bump @docker/actions-toolkit from 0.16.1 to 0.18.0
2024-02-29 16:16:29 +01:00
7864da88cb chore: update generated content 2024-02-29 16:05:35 +01:00
36eedea576 build(deps): bump @docker/actions-toolkit from 0.16.1 to 0.18.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.16.1 to 0.18.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.16.1...v0.18.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-29 15:03:59 +00:00
95a170fa60 Merge pull request #52 from crazy-max/dependabot/github_actions/codecov/codecov-action-4
build(deps): bump codecov/codecov-action from 3 to 4
2024-02-02 09:44:29 +01:00
1ea15ee881 build(deps): bump codecov/codecov-action from 3 to 4
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-01 10:21:57 +00:00
729d91c21f Merge pull request #51 from crazy-max/dependabot/npm_and_yarn/docker/actions-toolkit-0.16.1
build(deps): bump @docker/actions-toolkit from 0.16.0 to 0.16.1
2024-01-26 10:50:18 +01:00
c553dd0c3f build(deps): bump @docker/actions-toolkit from 0.16.0 to 0.16.1
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.16.0 to 0.16.1.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.16.0...v0.16.1)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-22 10:16:31 +00:00
a307846a9f Merge pull request #50 from crazy-max/bump
bump to v3
2023-12-18 11:10:50 +01:00
57929789e6 bump to v3 2023-12-18 11:10:28 +01:00
d9be6cade4 Merge pull request #49 from crazy-max/dependabot/npm_and_yarn/docker/actions-toolkit-0.16.0
build(deps): bump @docker/actions-toolkit from 0.14.0 to 0.16.0
2023-12-18 11:03:33 +01:00
e1c24ba1f0 switch to lima 2023-12-18 10:41:37 +01:00
979d352bf6 chore: update generated content 2023-12-18 10:41:22 +01:00
db8a75eba6 build(deps): bump @docker/actions-toolkit from 0.14.0 to 0.16.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.14.0 to 0.16.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.14.0...v0.16.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-18 09:38:10 +00:00
14 changed files with 1024 additions and 282 deletions

View File

@ -1,5 +1,9 @@
name: ci
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
workflow_dispatch:
schedule:
@ -13,7 +17,7 @@ on:
pull_request:
env:
DOCKER_VERSION: v23.0.6
DOCKER_VERSION: v24.0.9
jobs:
main:
@ -23,8 +27,8 @@ jobs:
matrix:
os:
- ubuntu-latest
#- macos-14 # no virt: https://github.com/docker/actions-toolkit/issues/317
- macos-13
- macos-latest
- windows-latest
version:
- pinned
@ -57,7 +61,8 @@ jobs:
matrix:
os:
- ubuntu-latest
- macos-latest
#- macos-14 # no virt: https://github.com/docker/actions-toolkit/issues/317
- macos-13
- windows-latest
steps:
-
@ -67,7 +72,7 @@ jobs:
name: Set up Docker
uses: ./
with:
version: v23.0.0-rc.4
version: v24.0.0-rc.4
channel: test
-
name: Dump context
@ -81,7 +86,8 @@ jobs:
matrix:
os:
- ubuntu-latest
- macos-latest
#- macos-14 # no virt: https://github.com/docker/actions-toolkit/issues/317
- macos-13
- windows-latest
steps:
-
@ -110,7 +116,8 @@ jobs:
matrix:
os:
- ubuntu-latest
- macos-latest
#- macos-14 # no virt: https://github.com/docker/actions-toolkit/issues/317
- macos-13
- windows-latest
steps:
-
@ -131,8 +138,9 @@ jobs:
if: always()
uses: crazy-max/ghaction-dump-context@v2
colima-start-args:
runs-on: macos-latest
lima-start-args:
#runs-on: macos-14 # no virt: https://github.com/docker/actions-toolkit/issues/317
runs-on: macos-13
steps:
-
name: Checkout
@ -141,7 +149,7 @@ jobs:
name: Set up Docker
uses: ./
env:
COLIMA_START_ARGS: --cpu 4 --memory 8 --disk 32 --dns 1.1.1.1 --dns 8.8.8.8 --dns-host example.com=1.2.3.4
LIMA_START_ARGS: --cpus 4 --memory 8
build-linux:
runs-on: ubuntu-latest
@ -187,8 +195,9 @@ jobs:
fail-fast: false
matrix:
os:
#- macos-14 # no virt: https://github.com/docker/actions-toolkit/issues/317
- macos-13
- macos-latest
- macos-12
steps:
-
name: Checkout
@ -249,3 +258,23 @@ jobs:
name: Dump context
if: always()
uses: crazy-max/ghaction-dump-context@v2
set-host:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker
uses: ./
with:
set-host: true
-
name: List contexts
run: |
docker context ls
-
name: Dump context
if: always()
uses: crazy-max/ghaction-dump-context@v2

View File

@ -1,5 +1,9 @@
name: test
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
@ -21,6 +25,7 @@ jobs:
targets: test
-
name: Upload coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: ./coverage/clover.xml
token: ${{ secrets.CODECOV_TOKEN }}

View File

@ -1,5 +1,9 @@
name: validate
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:

View File

@ -9,6 +9,11 @@
GitHub Action to set up (download and install) [Docker CE](https://docs.docker.com/engine/).
Works on Linux, macOS and Windows.
> [!WARNING]
> Does not work on macOS runners with ARM architecture (no nested virtualization):
> * https://github.com/crazy-max/ghaction-setup-docker/pull/53
> * https://github.com/docker/actions-toolkit/issues/317
![Screenshot](.github/setup-docker-action.png)
___
@ -16,9 +21,10 @@ ___
* [Usage](#usage)
* [Quick start](#quick-start)
* [Daemon configuration](#daemon-configuration)
* [Define custom `colima start` arguments (macOS)](#define-custom-colima-start-arguments-macos)
* [Define custom `limactl start` arguments (macOS)](#define-custom-limactl-start-arguments-macos)
* [Customizing](#customizing)
* [inputs](#inputs)
* [outputs](#outputs)
* [Contributing](#contributing)
* [License](#license)
@ -38,7 +44,7 @@ jobs:
steps:
-
name: Set up Docker
uses: crazy-max/ghaction-setup-docker@v2
uses: crazy-max/ghaction-setup-docker@v3
```
### Daemon configuration
@ -60,7 +66,7 @@ jobs:
steps:
-
name: Set up Docker
uses: crazy-max/ghaction-setup-docker@v2
uses: crazy-max/ghaction-setup-docker@v3
with:
daemon-config: |
{
@ -71,10 +77,10 @@ jobs:
}
```
### Define custom `colima start` arguments (macOS)
### Define custom `limactl start` arguments (macOS)
You can define custom [`colima start` arguments](https://github.com/abiosoft/colima#customizing-the-vm)
using the `COLIMA_START_ARGS` environment variable to customize the VM:
You can define custom [`limactl start` arguments](https://lima-vm.io/docs/reference/limactl_start/)
using the `LIMA_START_ARGS` environment variable to customize the VM:
```yaml
name: ci
@ -88,16 +94,16 @@ jobs:
steps:
-
name: Set up Docker
uses: crazy-max/ghaction-setup-docker@v2
uses: crazy-max/ghaction-setup-docker@v3
env:
COLIMA_START_ARGS: --cpu 4 --memory 8 --disk 32
LIMA_START_ARGS: --cpus 4 --memory 8
```
## Customizing
### inputs
Following inputs can be used as `step.with` keys
The following inputs can be used as `step.with` keys
| Name | Type | Default | Description |
|-----------------|--------|-----------------------|-----------------------------------------------------------------------------------------------------------------------------|
@ -105,6 +111,15 @@ Following inputs can be used as `step.with` keys
| `channel` | String | `stable` | Docker CE [channel](https://download.docker.com/linux/static/) (e.g, `stable`, `edge` or `test`). |
| `daemon-config` | String | | [Docker daemon JSON configuration](https://docs.docker.com/engine/reference/commandline/dockerd/#daemon-configuration-file) |
| `context` | String | `setup-docker-action` | Docker context name. |
| `set-host` | Bool | `false` | Set `DOCKER_HOST` environment variable to docker socket path. |
### outputs
The following outputs are available
| Name | Type | Description |
|--------|--------|--------------------|
| `sock` | String | Docker socket path |
## Contributing

View File

@ -1,56 +0,0 @@
# Troubleshooting
## macOS: `qemu[stderr]: qemu-system-x86_64: Unknown Error`
Colima may fail to start with the following error:
```
time="2023-08-26T06:30:33Z" level=info msg="[hostagent] Starting QEMU (hint: to watch the boot progress, see \"/Users/runner/.lima/colima/serial*.log\")"
time="2023-08-26T06:30:34Z" level=info msg="SSH Local Port: 49209"
time="2023-08-26T06:30:34Z" level=info msg="[hostagent] Waiting for the essential requirement 1 of 3: \"ssh\""
time="2023-08-26T06:30:34Z" level=info msg="[hostagent] Driver stopped due to error: \"exit status 255\""
time="2023-08-26T06:30:34Z" level=info msg="[hostagent] Shutting down the host agent"
time="2023-08-26T06:30:34Z" level=warning msg="[hostagent] failed to exit SSH master"
time="2023-08-26T06:30:34Z" level=info msg="[hostagent] Shutting down QEMU with ACPI"
time="2023-08-26T06:30:34Z" level=warning msg="[hostagent] failed to open the QMP socket \"/Users/runner/.lima/colima/qmp.sock\", forcibly killing QEMU"
time="2023-08-26T06:30:34Z" level=info msg="[hostagent] QEMU has already exited"
time="2023-08-26T06:30:34Z" level=fatal msg="exiting, status={Running:false Degraded:false Exiting:true Errors:[] SSHLocalPort:0} (hint: see \"/Users/runner/.lima/colima/ha.stderr.log\")"
time="2023-08-26T06:30:34Z" level=fatal msg="error starting vm: error at 'creating and starting': exit status 1"
```
```
{"level":"debug","msg":"executing [ssh-keygen -t ed25519 -q -N -f /Users/runner/.lima/_config/user]","time":"2023-08-26T07:16:40Z"}
{"level":"debug","msg":"Creating iso file /Users/runner/.lima/colima/cidata.iso","time":"2023-08-26T07:16:41Z"}
{"level":"debug","msg":"Using /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/diskfs_iso3418167253 as workspace","time":"2023-08-26T07:16:41Z"}
{"level":"debug","msg":"OpenSSH version 8.6.1 detected","time":"2023-08-26T07:16:41Z"}
{"level":"debug","msg":"AES accelerator seems available, prioritizing aes128-gcm@openssh.com and aes256-gcm@openssh.com","time":"2023-08-26T07:16:41Z"}
{"level":"debug","msg":"QEMU version 8.0.4 detected","time":"2023-08-26T07:16:43Z"}
{"level":"debug","msg":"firmware candidates = [/Users/runner/.local/share/qemu/edk2-x86_64-code.fd /Users/runner/.colima/_wrapper/4e1b408f843d1c63afbbdcf80c40e4c88d33509f/share/qemu/edk2-x86_64-code.fd /usr/share/OVMF/OVMF_CODE.fd /usr/share/qemu/ovmf-x86_64-code.bin /usr/share/edk2-ovmf/x64/OVMF_CODE.fd]","time":"2023-08-26T07:16:43Z"}
{"level":"info","msg":"Starting QEMU (hint: to watch the boot progress, see \"/Users/runner/.lima/colima/serial*.log\")","time":"2023-08-26T07:16:43Z"}
{"level":"debug","msg":"qCmd.Args: [/Users/runner/.colima/_wrapper/4e1b408f843d1c63afbbdcf80c40e4c88d33509f/bin/qemu-system-x86_64 -m 2048 -cpu host,-pdpe1gb -machine q35,accel=hvf -smp 2,sockets=1,cores=2,threads=1 -drive if=pflash,format=raw,readonly=on,file=/Users/runner/.colima/_wrapper/4e1b408f843d1c63afbbdcf80c40e4c88d33509f/share/qemu/edk2-x86_64-code.fd -boot order=d,splash-time=0,menu=on -drive file=/Users/runner/.lima/colima/basedisk,format=raw,media=cdrom,readonly=on -drive file=/Users/runner/.lima/colima/diffdisk,if=virtio,discard=on -drive id=cdrom0,if=none,format=raw,readonly=on,file=/Users/runner/.lima/colima/cidata.iso -device virtio-scsi-pci,id=scsi0 -device scsi-cd,bus=scsi0.0,drive=cdrom0 -netdev user,id=net0,net=192.168.5.0/24,dhcpstart=192.168.5.15,hostfwd=tcp:127.0.0.1:49168-:22 -device virtio-net-pci,netdev=net0,mac=52:55:55:be:6e:dd -device virtio-rng-pci -display none -device virtio-vga -device virtio-keyboard-pci -device virtio-mouse-pci -device qemu-xhci,id=usb-bus -parallel none -chardev socket,id=char-serial,path=/Users/runner/.lima/colima/serial.sock,server=on,wait=off,logfile=/Users/runner/.lima/colima/serial.log -serial chardev:char-serial -chardev socket,id=char-serial-virtio,path=/Users/runner/.lima/colima/serialv.sock,server=on,wait=off,logfile=/Users/runner/.lima/colima/serialv.log -device virtio-serial-pci,id=virtio-serial0,max_ports=1 -device virtconsole,chardev=char-serial-virtio,id=console0 -virtfs local,mount_tag=mount0,path=/Users/runner,security_model=none -virtfs local,mount_tag=mount1,path=/tmp/colima,security_model=none -chardev socket,id=char-qmp,path=/Users/runner/.lima/colima/qmp.sock,server=on,wait=off -qmp chardev:char-qmp -name lima-colima -pidfile /Users/runner/.lima/colima/qemu.pid]","time":"2023-08-26T07:16:43Z"}
{"level":"info","msg":"Waiting for the essential requirement 1 of 3: \"ssh\"","time":"2023-08-26T07:16:43Z"}
{"level":"debug","msg":"executing script \"ssh\"","time":"2023-08-26T07:16:43Z"}
{"level":"debug","msg":"executing ssh for script \"ssh\": /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/runner/.lima/_config/user\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers=\"^aes128-gcm@openssh.com,aes256-gcm@openssh.com\" -o User=runner -o ControlMaster=auto -o ControlPath=\"/Users/runner/.lima/colima/ssh.sock\" -o ControlPersist=5m -p 49168 127.0.0.1 -- /bin/bash]","time":"2023-08-26T07:16:43Z"}
{"level":"debug","msg":"stdout=\"\", stderr=\"ssh: connect to host 127.0.0.1 port 49168: Connection refused\\r\\n\", err=failed to execute script \"ssh\": stdout=\"\", stderr=\"ssh: connect to host 127.0.0.1 port 49168: Connection refused\\r\\n\": exit status 255","time":"2023-08-26T07:16:43Z"}
{"level":"debug","msg":"qemu[stderr]: qemu-system-x86_64: Unknown Error","time":"2023-08-26T07:16:43Z"}
{"level":"info","msg":"Driver stopped due to error: \"exit status 255\"","time":"2023-08-26T07:16:43Z"}
{"level":"info","msg":"Shutting down the host agent","time":"2023-08-26T07:16:44Z"}
{"level":"debug","msg":"shutting down the SSH master","time":"2023-08-26T07:16:44Z"}
{"level":"debug","msg":"executing ssh for exiting the master: /usr/bin/ssh [ssh -F /dev/null -o IdentityFile=\"/Users/runner/.lima/_config/user\" -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o NoHostAuthenticationForLocalhost=yes -o GSSAPIAuthentication=no -o PreferredAuthentications=publickey -o Compression=no -o BatchMode=yes -o IdentitiesOnly=yes -o Ciphers=\"^aes128-gcm@openssh.com,aes256-gcm@openssh.com\" -o User=runner -o ControlMaster=auto -o ControlPath=\"/Users/runner/.lima/colima/ssh.sock\" -o ControlPersist=5m -O exit -p 49168 127.0.0.1]","time":"2023-08-26T07:16:44Z"}
{"error":"failed to execute `ssh -O exit -p 49168 127.0.0.1`, out=\"Control socket connect(/Users/runner/.lima/colima/ssh.sock): No such file or directory\\r\\n\": exit status 255","level":"warning","msg":"failed to exit SSH master","time":"2023-08-26T07:16:44Z"}
{"level":"info","msg":"Shutting down QEMU with ACPI","time":"2023-08-26T07:16:44Z"}
{"error":"dial unix /Users/runner/.lima/colima/qmp.sock: connect: connection refused","level":"warning","msg":"failed to open the QMP socket \"/Users/runner/.lima/colima/qmp.sock\", forcibly killing QEMU","time":"2023-08-26T07:16:44Z"}
{"level":"info","msg":"QEMU has already exited","time":"2023-08-26T07:16:44Z"}
```
To fix this issue you can replace the existing signature of QEMU binary with
the required entitlements as suggested in https://github.com/abiosoft/colima/issues/786#issuecomment-1693629650.
This can be done within this action by setting the env var `SIGN_QEMU_BINARY=1`:
```yaml
-
name: Set up Docker
uses: crazy-max/ghaction-setup-docker@v2
env:
SIGN_QEMU_BINARY: 1
```

View File

@ -17,38 +17,45 @@ describe('getInputs', () => {
[
0,
new Map<string, string>([
['version', 'v23.0.1'],
['version', 'v24.0.8'],
['set-host', 'false'],
]),
{
version: 'v23.0.1',
version: 'v24.0.8',
channel: '',
context: '',
daemonConfig: '',
setHost: false
} as context.Inputs
],
[
1,
new Map<string, string>([
['version', 'v23.0.0-rc.4'],
['version', 'v24.0.0-rc.4'],
['channel', 'test'],
['context', 'foo'],
['daemon-config', `{"debug":true,"features":{"containerd-snapshotter":true}}`],
['set-host', 'false'],
]),
{
version: 'v23.0.0-rc.4',
version: 'v24.0.0-rc.4',
channel: 'test',
context: 'foo',
daemonConfig: `{"debug":true,"features":{"containerd-snapshotter":true}}`,
setHost: false
} as context.Inputs
],
[
2,
new Map<string, string>([]),
new Map<string, string>([
['set-host', 'true'],
]),
{
version: 'latest',
channel: '',
context: '',
daemonConfig: '',
setHost: true
} as context.Inputs
]
])(

View File

@ -8,7 +8,7 @@ branding:
inputs:
version:
description: 'Docker CE version. (e.g, v23.0.1)'
description: 'Docker CE version. (e.g, v24.0.9)'
required: false
default: 'latest'
channel:
@ -20,6 +20,14 @@ inputs:
context:
description: 'Docker context name. (default setup-docker-action)'
required: false
set-host:
description: 'Set DOCKER_HOST environment variable to docker socket path'
default: 'false'
required: false
outputs:
sock:
description: "Docker socket path"
runs:
using: 'node20'

24
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

964
dist/licenses.txt generated vendored

File diff suppressed because it is too large Load Diff

View File

@ -27,7 +27,7 @@
"packageManager": "yarn@3.6.3",
"dependencies": {
"@actions/core": "^1.10.1",
"@docker/actions-toolkit": "^0.14.0",
"@docker/actions-toolkit": "^0.21.1",
"uuid": "^9.0.1"
},
"devDependencies": {

View File

@ -5,6 +5,7 @@ export interface Inputs {
channel: string;
daemonConfig?: string;
context: string;
setHost: boolean;
}
export function getInputs(): Inputs {
@ -12,6 +13,7 @@ export function getInputs(): Inputs {
version: core.getInput('version') || 'latest',
channel: core.getInput('channel'),
daemonConfig: core.getInput('daemon-config'),
context: core.getInput('context')
context: core.getInput('context'),
setHost: core.getBooleanInput('set-host')
};
}

View File

@ -13,7 +13,7 @@ actionsToolkit.run(
// main
async () => {
const input: context.Inputs = context.getInputs();
const runDir = path.join(os.homedir(), `setup-docker-action-${uuid.v4()}`);
const runDir = path.join(os.homedir(), `setup-docker-action-${uuid.v4().slice(0, 8)}`);
if (input.context == 'default') {
throw new Error(`'default' context cannot be used.`);
@ -34,7 +34,18 @@ actionsToolkit.run(
}
if (toolDir) {
stateHelper.setRunDir(runDir);
await install.install();
const sockPath = await install.install();
await core.group(`Setting outputs`, async () => {
core.info(`sock=${sockPath}`);
core.setOutput('sock', sockPath);
});
if (input.setHost) {
await core.group(`Setting Docker host`, async () => {
core.exportVariable('DOCKER_HOST', sockPath);
core.info(`DOCKER_HOST=${sockPath}`);
});
}
}
await core.group(`Docker info`, async () => {

119
yarn.lock
View File

@ -12,9 +12,9 @@ __metadata:
languageName: node
linkType: hard
"@actions/cache@npm:^3.2.2":
version: 3.2.2
resolution: "@actions/cache@npm:3.2.2"
"@actions/cache@npm:^3.2.4":
version: 3.2.4
resolution: "@actions/cache@npm:3.2.4"
dependencies:
"@actions/core": ^1.10.0
"@actions/exec": ^1.0.1
@ -24,9 +24,9 @@ __metadata:
"@azure/abort-controller": ^1.1.0
"@azure/ms-rest-js": ^2.6.0
"@azure/storage-blob": ^12.13.0
semver: ^6.1.0
semver: ^6.3.1
uuid: ^3.3.3
checksum: 1dc43a66596b98a7d4ad9f3a3e92b24186e28a42486fac311c7f99c2883d0387a6078d76b31c5ca3af30bb2b929c6f8e5f352e315bcce4fb9cae5d5f2f1f5fad
checksum: 5bf5f7541bea4906b553440a9ffee5699e11dfb729365c6cb0bbd37e147a1a0993369fdad16bfa3e2b01ec7fa57dac66276278bfd4a389009246a75ea953e61d
languageName: node
linkType: hard
@ -100,6 +100,16 @@ __metadata:
languageName: node
linkType: hard
"@actions/http-client@npm:^2.2.1":
version: 2.2.1
resolution: "@actions/http-client@npm:2.2.1"
dependencies:
tunnel: ^0.0.6
undici: ^5.25.4
checksum: c51c003cd697289136c0e81c0f9b8e57a9bb1a038dc7c9a91a71c02f4ae5e27ef7d3e305aefa7c815604049209d114c06e9991a5c5eaa055508519329267f962
languageName: node
linkType: hard
"@actions/io@npm:^1.0.1, @actions/io@npm:^1.1.1, @actions/io@npm:^1.1.3":
version: 1.1.3
resolution: "@actions/io@npm:1.1.3"
@ -900,27 +910,26 @@ __metadata:
languageName: node
linkType: hard
"@docker/actions-toolkit@npm:^0.14.0":
version: 0.14.0
resolution: "@docker/actions-toolkit@npm:0.14.0"
"@docker/actions-toolkit@npm:^0.21.1":
version: 0.21.1
resolution: "@docker/actions-toolkit@npm:0.21.1"
dependencies:
"@actions/cache": ^3.2.2
"@actions/cache": ^3.2.4
"@actions/core": ^1.10.1
"@actions/exec": ^1.1.1
"@actions/github": ^6.0.0
"@actions/http-client": ^2.2.0
"@actions/http-client": ^2.2.1
"@actions/io": ^1.1.3
"@actions/tool-cache": ^2.0.1
"@octokit/core": ^5.0.1
"@octokit/plugin-rest-endpoint-methods": ^10.1.5
"@octokit/core": ^5.1.0
"@octokit/plugin-rest-endpoint-methods": ^10.4.0
async-retry: ^1.3.3
csv-parse: ^5.5.2
csv-parse: ^5.5.5
handlebars: ^4.7.8
js-yaml: ^4.1.0
jwt-decode: ^4.0.0
semver: ^7.5.4
tmp: ^0.2.1
checksum: dbbdf6cbd962eb05b9ec2d3026a1cf97394839c4e595ec047efe5595ca773f8c3927e03b64a98469da96e56038e16d3d0ad91c500be787087777f14406cc9248
semver: ^7.6.0
tmp: ^0.2.3
checksum: 12cbf288853a23b5304faacf10ad373d6fe518ff25c53fd55d804149eadf7a120d8a2ed8ff5266fab1bb0ffcaf18d1358c19d50ff6765276d42a3306545c947b
languageName: node
linkType: hard
@ -1417,6 +1426,21 @@ __metadata:
languageName: node
linkType: hard
"@octokit/core@npm:^5.1.0":
version: 5.1.0
resolution: "@octokit/core@npm:5.1.0"
dependencies:
"@octokit/auth-token": ^4.0.0
"@octokit/graphql": ^7.0.0
"@octokit/request": ^8.0.2
"@octokit/request-error": ^5.0.0
"@octokit/types": ^12.0.0
before-after-hook: ^2.2.0
universal-user-agent: ^6.0.0
checksum: 170d16f5577df484116238ce04e2dbd6b45d8e96b4680fee657ae22fcafb311af8df8a14ae80610f41c1a85493c927910698019a761914ff4b0323ddbabcc9a4
languageName: node
linkType: hard
"@octokit/endpoint@npm:^9.0.0":
version: 9.0.1
resolution: "@octokit/endpoint@npm:9.0.1"
@ -1446,10 +1470,10 @@ __metadata:
languageName: node
linkType: hard
"@octokit/openapi-types@npm:^19.0.2":
version: 19.0.2
resolution: "@octokit/openapi-types@npm:19.0.2"
checksum: 2a5d577a21674be1e004f081e973a5c68ec945063d0ff29b41f67a535a69d97f7f9ce084e313d922a815f0c361763664a43a650bf6e520548892dd2f192b88da
"@octokit/openapi-types@npm:^20.0.0":
version: 20.0.0
resolution: "@octokit/openapi-types@npm:20.0.0"
checksum: 23ff7613750f8b5790a0cbed5a2048728a7909e50d726932831044908357a932c7fc0613fb7b86430a49d31b3d03a180632ea5dd936535bfbc1176391a199e96
languageName: node
linkType: hard
@ -1475,14 +1499,14 @@ __metadata:
languageName: node
linkType: hard
"@octokit/plugin-rest-endpoint-methods@npm:^10.1.5":
version: 10.1.5
resolution: "@octokit/plugin-rest-endpoint-methods@npm:10.1.5"
"@octokit/plugin-rest-endpoint-methods@npm:^10.4.0":
version: 10.4.0
resolution: "@octokit/plugin-rest-endpoint-methods@npm:10.4.0"
dependencies:
"@octokit/types": ^12.3.0
"@octokit/types": ^12.6.0
peerDependencies:
"@octokit/core": ">=5"
checksum: 01b79eac7f1f5663c8bdb2f27a209873cebdf664b15712b4cc1f363f2a9df60f217e03af67a07000a4a7a70191080716ccc6d9fa454258f5cb2a09ef18723ee9
checksum: 8ee155825c7ea1dd2991a50d5b3f205988b8ea19af4bebbd91c55bb7b78c4e2215956d578671496a4a86df19ff2d5405ce37ee35c9c6c188dc9a199c045c30be
languageName: node
linkType: hard
@ -1519,12 +1543,12 @@ __metadata:
languageName: node
linkType: hard
"@octokit/types@npm:^12.3.0":
version: 12.3.0
resolution: "@octokit/types@npm:12.3.0"
"@octokit/types@npm:^12.6.0":
version: 12.6.0
resolution: "@octokit/types@npm:12.6.0"
dependencies:
"@octokit/openapi-types": ^19.0.2
checksum: ba852690b7dcdf0d01e68b2dba79b1823322406493bfb769964e07b0ee47005d58a0241e401afb6e03f0ab51ecd7a739d6d3e4d0cc1db8b7606c36c8a2104e67
"@octokit/openapi-types": ^20.0.0
checksum: 850235f425584499a2266d5c585c1c2462ae11e25c650567142f3342cb9ce589c8c8fed87705811ca93271fd28c68e1fa77b88b67b97015d7b63d269fa46ed05
languageName: node
linkType: hard
@ -2617,10 +2641,10 @@ __metadata:
languageName: node
linkType: hard
"csv-parse@npm:^5.5.2":
version: 5.5.2
resolution: "csv-parse@npm:5.5.2"
checksum: de2eb0c29b049783ef101b7eb843456200dc9a4fc9f4b400473bb0521b41aadb77af560cf4edc49bac65cc457b32596519860120181b26ec3b372109ddf8e8ea
"csv-parse@npm:^5.5.5":
version: 5.5.5
resolution: "csv-parse@npm:5.5.5"
checksum: 9e76b3dc3dbbf0a9b1c3529843e3891f0da23d094bdb0540a3d8f4083d00110dd545399f9cf510498def6c1fc7012cc6bc00046d281f16d705add64099467973
languageName: node
linkType: hard
@ -2747,7 +2771,7 @@ __metadata:
resolution: "docker-setup-docker@workspace:."
dependencies:
"@actions/core": ^1.10.1
"@docker/actions-toolkit": ^0.14.0
"@docker/actions-toolkit": ^0.21.1
"@types/node": ^20.6.0
"@typescript-eslint/eslint-plugin": ^6.6.0
"@typescript-eslint/parser": ^6.6.0
@ -5299,7 +5323,7 @@ __metadata:
languageName: node
linkType: hard
"rimraf@npm:^3.0.0, rimraf@npm:^3.0.2":
"rimraf@npm:^3.0.2":
version: 3.0.2
resolution: "rimraf@npm:3.0.2"
dependencies:
@ -5378,6 +5402,17 @@ __metadata:
languageName: node
linkType: hard
"semver@npm:^7.6.0":
version: 7.6.0
resolution: "semver@npm:7.6.0"
dependencies:
lru-cache: ^6.0.0
bin:
semver: bin/semver.js
checksum: 7427f05b70786c696640edc29fdd4bc33b2acf3bbe1740b955029044f80575fc664e1a512e4113c3af21e767154a94b4aa214bf6cd6e42a1f6dba5914e0b208c
languageName: node
linkType: hard
"set-blocking@npm:^2.0.0":
version: 2.0.0
resolution: "set-blocking@npm:2.0.0"
@ -5669,12 +5704,10 @@ __metadata:
languageName: node
linkType: hard
"tmp@npm:^0.2.1":
version: 0.2.1
resolution: "tmp@npm:0.2.1"
dependencies:
rimraf: ^3.0.0
checksum: 8b1214654182575124498c87ca986ac53dc76ff36e8f0e0b67139a8d221eaecfdec108c0e6ec54d76f49f1f72ab9325500b246f562b926f85bcdfca8bf35df9e
"tmp@npm:^0.2.3":
version: 0.2.3
resolution: "tmp@npm:0.2.3"
checksum: 73b5c96b6e52da7e104d9d44afb5d106bb1e16d9fa7d00dbeb9e6522e61b571fbdb165c756c62164be9a3bbe192b9b268c236d370a2a0955c7689cd2ae377b95
languageName: node
linkType: hard