Compare commits
25 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6b5c60adb0 | ||
|
|
1b6fc2257f | ||
|
|
dd2160f477 | ||
|
|
a54d83c644 | ||
|
|
3cdc15c881 | ||
|
|
c901021fb1 | ||
|
|
5b8e902c4d | ||
|
|
cab9e2952c | ||
|
|
ac9dc8b527 | ||
|
|
9b3822d698 | ||
|
|
84930a3d2d | ||
|
|
1195b4311b | ||
|
|
f8d303b336 | ||
|
|
4a31b494f0 | ||
|
|
703a1d1973 | ||
|
|
e75da9cf2f | ||
|
|
9ed9b1d1aa | ||
|
|
38fd60d94a | ||
|
|
246ac9634b | ||
|
|
afc5fed49b | ||
|
|
88b5826b8a | ||
|
|
d49a8c5927 | ||
|
|
f5f997cc54 | ||
|
|
2f6f85d000 | ||
|
|
f2b7ab25b0 |
265
.github/buildx-releases.json
vendored
265
.github/buildx-releases.json
vendored
@@ -52,6 +52,218 @@
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/checksums.txt"
|
||||
]
|
||||
},
|
||||
"edge": {
|
||||
"id": 195417879,
|
||||
"tag_name": "v0.20.0-rc3",
|
||||
"html_url": "https://github.com/docker/buildx/releases/tag/v0.20.0-rc3",
|
||||
"assets": [
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.darwin-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.darwin-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.darwin-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.darwin-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.darwin-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.darwin-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.freebsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.freebsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.freebsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.freebsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.freebsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.freebsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-arm-v6",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-arm-v6.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-arm-v6.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-arm-v7",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-arm-v7.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-arm-v7.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-ppc64le",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-ppc64le.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-ppc64le.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-riscv64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-riscv64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-riscv64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-s390x",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-s390x.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-s390x.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.openbsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.openbsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.openbsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.openbsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.openbsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.openbsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.windows-amd64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.windows-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.windows-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.windows-arm64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.windows-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.windows-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/checksums.txt"
|
||||
]
|
||||
},
|
||||
"v0.20.0-rc3": {
|
||||
"id": 195417879,
|
||||
"tag_name": "v0.20.0-rc3",
|
||||
"html_url": "https://github.com/docker/buildx/releases/tag/v0.20.0-rc3",
|
||||
"assets": [
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.darwin-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.darwin-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.darwin-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.darwin-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.darwin-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.darwin-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.freebsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.freebsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.freebsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.freebsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.freebsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.freebsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-arm-v6",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-arm-v6.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-arm-v6.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-arm-v7",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-arm-v7.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-arm-v7.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-ppc64le",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-ppc64le.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-ppc64le.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-riscv64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-riscv64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-riscv64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-s390x",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-s390x.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.linux-s390x.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.openbsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.openbsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.openbsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.openbsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.openbsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.openbsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.windows-amd64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.windows-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.windows-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.windows-arm64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.windows-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/buildx-v0.20.0-rc3.windows-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc3/checksums.txt"
|
||||
]
|
||||
},
|
||||
"v0.20.0-rc2": {
|
||||
"id": 194958665,
|
||||
"tag_name": "v0.20.0-rc2",
|
||||
"html_url": "https://github.com/docker/buildx/releases/tag/v0.20.0-rc2",
|
||||
"assets": [
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.darwin-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.darwin-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.darwin-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.darwin-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.darwin-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.darwin-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.freebsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.freebsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.freebsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.freebsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.freebsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.freebsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-arm-v6",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-arm-v6.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-arm-v6.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-arm-v7",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-arm-v7.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-arm-v7.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-ppc64le",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-ppc64le.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-ppc64le.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-riscv64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-riscv64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-riscv64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-s390x",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-s390x.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.linux-s390x.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.openbsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.openbsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.openbsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.openbsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.openbsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.openbsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.windows-amd64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.windows-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.windows-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.windows-arm64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.windows-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/buildx-v0.20.0-rc2.windows-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc2/checksums.txt"
|
||||
]
|
||||
},
|
||||
"v0.20.0-rc1": {
|
||||
"id": 194903219,
|
||||
"tag_name": "v0.20.0-rc1",
|
||||
"html_url": "https://github.com/docker/buildx/releases/tag/v0.20.0-rc1",
|
||||
"assets": [
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.darwin-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.darwin-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.darwin-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.darwin-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.darwin-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.darwin-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.freebsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.freebsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.freebsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.freebsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.freebsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.freebsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-arm-v6",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-arm-v6.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-arm-v6.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-arm-v7",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-arm-v7.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-arm-v7.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-ppc64le",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-ppc64le.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-ppc64le.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-riscv64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-riscv64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-riscv64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-s390x",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-s390x.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.linux-s390x.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.openbsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.openbsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.openbsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.openbsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.openbsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.openbsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.windows-amd64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.windows-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.windows-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.windows-arm64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.windows-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/buildx-v0.20.0-rc1.windows-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.20.0-rc1/checksums.txt"
|
||||
]
|
||||
},
|
||||
"v0.19.3": {
|
||||
"id": 191147419,
|
||||
"tag_name": "v0.19.3",
|
||||
@@ -264,59 +476,6 @@
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.0/checksums.txt"
|
||||
]
|
||||
},
|
||||
"edge": {
|
||||
"id": 191147419,
|
||||
"tag_name": "v0.19.3",
|
||||
"html_url": "https://github.com/docker/buildx/releases/tag/v0.19.3",
|
||||
"assets": [
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.darwin-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.darwin-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.darwin-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.darwin-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.darwin-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.darwin-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.freebsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.freebsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.freebsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.freebsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.freebsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.freebsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-arm-v6",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-arm-v6.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-arm-v6.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-arm-v7",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-arm-v7.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-arm-v7.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-ppc64le",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-ppc64le.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-ppc64le.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-riscv64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-riscv64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-riscv64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-s390x",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-s390x.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.linux-s390x.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.openbsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.openbsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.openbsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.openbsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.openbsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.openbsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.windows-amd64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.windows-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.windows-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.windows-arm64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.windows-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/buildx-v0.19.3.windows-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.19.3/checksums.txt"
|
||||
]
|
||||
},
|
||||
"v0.19.0-rc2": {
|
||||
"id": 187439215,
|
||||
"tag_name": "v0.19.0-rc2",
|
||||
|
||||
4710
.github/compose-releases.json
vendored
Normal file
4710
.github/compose-releases.json
vendored
Normal file
File diff suppressed because it is too large
Load Diff
58
.github/workflows/compose-releases-json.yml
vendored
Normal file
58
.github/workflows/compose-releases-json.yml
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
name: compose-releases-json
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
- cron: '0 */12 * * *'
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
pull_request:
|
||||
paths:
|
||||
- '.github/workflows/compose-releases-json.yml'
|
||||
|
||||
jobs:
|
||||
generate:
|
||||
uses: crazy-max/.github/.github/workflows/releases-json.yml@7f83a5a887650a38e4d0e05d5262309cfaa31459
|
||||
with:
|
||||
repository: docker/compose
|
||||
artifact_name: compose-releases-json
|
||||
filename: compose-releases.json
|
||||
secrets: inherit
|
||||
|
||||
open-pr:
|
||||
runs-on: ubuntu-22.04
|
||||
if: github.event_name != 'pull_request'
|
||||
needs:
|
||||
- generate
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
-
|
||||
name: Download
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: compose-releases-json
|
||||
path: .github
|
||||
-
|
||||
name: Commit changes
|
||||
run: |
|
||||
git add -A .
|
||||
-
|
||||
name: Create PR
|
||||
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
|
||||
with:
|
||||
base: main
|
||||
branch: bot/compose-releases-json
|
||||
commit-message: "github: update .github/compose-releases.json"
|
||||
signoff: true
|
||||
delete-branch: true
|
||||
title: "Update `.github/compose-releases.json`"
|
||||
body: |
|
||||
Update `.github/compose-releases.json` to keep in sync with [https://github.com/docker/compose](https://github.com/docker/compose).
|
||||
draft: false
|
||||
9
.github/workflows/test.yml
vendored
9
.github/workflows/test.yml
vendored
@@ -15,15 +15,18 @@ on:
|
||||
|
||||
env:
|
||||
NODE_VERSION: "20"
|
||||
BUILDX_VERSION: "v0.19.3"
|
||||
BUILDX_VERSION: "edge"
|
||||
BUILDKIT_IMAGE: "moby/buildkit:v0.18.2"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- ubuntu-22.04-arm
|
||||
node_version:
|
||||
- 20
|
||||
- 18
|
||||
@@ -98,7 +101,7 @@ jobs:
|
||||
});
|
||||
await core.group(`Set includes`, async () => {
|
||||
let includes = [];
|
||||
for (const os of ['ubuntu-latest', 'macos-13', 'windows-latest']) {
|
||||
for (const os of ['ubuntu-latest', 'ubuntu-22.04-arm', 'macos-13', 'windows-latest']) {
|
||||
for (const test of tests) {
|
||||
if (test === 'docker/install.test.itg.ts') {
|
||||
includes.push({ os: os, test: test, test_name: 'root', docker_install_type: 'image', docker_install_version: '27.3.1' });
|
||||
|
||||
2
.github/workflows/virtual-env.yml
vendored
2
.github/workflows/virtual-env.yml
vendored
@@ -24,6 +24,8 @@ jobs:
|
||||
- ubuntu-24.04
|
||||
- ubuntu-22.04
|
||||
- ubuntu-20.04
|
||||
- ubuntu-24.04-arm
|
||||
- ubuntu-22.04-arm
|
||||
steps:
|
||||
-
|
||||
name: File system
|
||||
|
||||
74
__tests__/.fixtures/imagetools-01.json
Normal file
74
__tests__/.fixtures/imagetools-01.json
Normal file
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"created": "2024-12-16T23:44:38.698098711Z",
|
||||
"architecture": "amd64",
|
||||
"os": "linux",
|
||||
"config": {
|
||||
"Env": [
|
||||
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
"BUILDKIT_SETUP_CGROUPV2_ROOT=1"
|
||||
],
|
||||
"Entrypoint": [
|
||||
"buildkitd"
|
||||
],
|
||||
"Volumes": {
|
||||
"/var/lib/buildkit": {}
|
||||
},
|
||||
"WorkingDir": "/",
|
||||
"ArgsEscaped": true
|
||||
},
|
||||
"rootfs": {
|
||||
"type": "layers",
|
||||
"diff_ids": [
|
||||
"sha256:75654b8eeebd3beae97271a102f57cdeb794cc91e442648544963a7e951e9558",
|
||||
"sha256:6a1b167dc4f30367cc713f6d48710dff20eb913bfaf14d7df23cfbe8a235319c",
|
||||
"sha256:37453f29fa93eccde9d8ffa21c0b92c41a981c727ad6c32acee11caf4f5e42a8",
|
||||
"sha256:cc4513cba548800cba786895e269f78eff73e7685e80b0447070f8c116652eea"
|
||||
]
|
||||
},
|
||||
"history": [
|
||||
{
|
||||
"created": "2024-09-06T12:05:36Z",
|
||||
"created_by": "ADD alpine-minirootfs-3.20.3-x86_64.tar.gz / # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-09-06T12:05:36Z",
|
||||
"created_by": "CMD [\"/bin/sh\"]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:35:52.845698088Z",
|
||||
"created_by": "RUN /bin/sh -c apk add --no-cache fuse3 git openssh pigz xz iptables ip6tables \u0026\u0026 ln -s fusermount3 /usr/bin/fusermount # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:35:49.452745107Z",
|
||||
"created_by": "COPY examples/buildctl-daemonless/buildctl-daemonless.sh /usr/bin/ # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:38.698098711Z",
|
||||
"created_by": "VOLUME [/var/lib/buildkit]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:38.698098711Z",
|
||||
"created_by": "COPY / /usr/bin/ # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:38.698098711Z",
|
||||
"created_by": "ENV BUILDKIT_SETUP_CGROUPV2_ROOT=1",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:38.698098711Z",
|
||||
"created_by": "ENTRYPOINT [\"buildkitd\"]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
}
|
||||
]
|
||||
}
|
||||
447
__tests__/.fixtures/imagetools-02.json
Normal file
447
__tests__/.fixtures/imagetools-02.json
Normal file
@@ -0,0 +1,447 @@
|
||||
{
|
||||
"linux/amd64": {
|
||||
"created": "2024-12-16T23:44:38.698098711Z",
|
||||
"architecture": "amd64",
|
||||
"os": "linux",
|
||||
"config": {
|
||||
"Env": [
|
||||
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
"BUILDKIT_SETUP_CGROUPV2_ROOT=1"
|
||||
],
|
||||
"Entrypoint": [
|
||||
"buildkitd"
|
||||
],
|
||||
"Volumes": {
|
||||
"/var/lib/buildkit": {}
|
||||
},
|
||||
"WorkingDir": "/",
|
||||
"ArgsEscaped": true
|
||||
},
|
||||
"rootfs": {
|
||||
"type": "layers",
|
||||
"diff_ids": [
|
||||
"sha256:75654b8eeebd3beae97271a102f57cdeb794cc91e442648544963a7e951e9558",
|
||||
"sha256:6a1b167dc4f30367cc713f6d48710dff20eb913bfaf14d7df23cfbe8a235319c",
|
||||
"sha256:37453f29fa93eccde9d8ffa21c0b92c41a981c727ad6c32acee11caf4f5e42a8",
|
||||
"sha256:cc4513cba548800cba786895e269f78eff73e7685e80b0447070f8c116652eea"
|
||||
]
|
||||
},
|
||||
"history": [
|
||||
{
|
||||
"created": "2024-09-06T12:05:36Z",
|
||||
"created_by": "ADD alpine-minirootfs-3.20.3-x86_64.tar.gz / # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-09-06T12:05:36Z",
|
||||
"created_by": "CMD [\"/bin/sh\"]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:35:52.845698088Z",
|
||||
"created_by": "RUN /bin/sh -c apk add --no-cache fuse3 git openssh pigz xz iptables ip6tables \u0026\u0026 ln -s fusermount3 /usr/bin/fusermount # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:35:49.452745107Z",
|
||||
"created_by": "COPY examples/buildctl-daemonless/buildctl-daemonless.sh /usr/bin/ # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:38.698098711Z",
|
||||
"created_by": "VOLUME [/var/lib/buildkit]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:38.698098711Z",
|
||||
"created_by": "COPY / /usr/bin/ # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:38.698098711Z",
|
||||
"created_by": "ENV BUILDKIT_SETUP_CGROUPV2_ROOT=1",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:38.698098711Z",
|
||||
"created_by": "ENTRYPOINT [\"buildkitd\"]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"linux/arm/v7": {
|
||||
"created": "2024-12-16T23:44:35.805758197Z",
|
||||
"architecture": "arm",
|
||||
"os": "linux",
|
||||
"variant": "v7",
|
||||
"config": {
|
||||
"Env": [
|
||||
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
"BUILDKIT_SETUP_CGROUPV2_ROOT=1"
|
||||
],
|
||||
"Entrypoint": [
|
||||
"buildkitd"
|
||||
],
|
||||
"Volumes": {
|
||||
"/var/lib/buildkit": {}
|
||||
},
|
||||
"WorkingDir": "/",
|
||||
"ArgsEscaped": true
|
||||
},
|
||||
"rootfs": {
|
||||
"type": "layers",
|
||||
"diff_ids": [
|
||||
"sha256:0cee9b6e126689480f812b337d8926e8b051e2c1e40b3e36701ea2554f367b9d",
|
||||
"sha256:4cfff05f912cc67c6ff688b2f53f84e6d74fe415725a228115a296634d919fd3",
|
||||
"sha256:37453f29fa93eccde9d8ffa21c0b92c41a981c727ad6c32acee11caf4f5e42a8",
|
||||
"sha256:e0962dfb9d203ce37963e41ec72119610633651f760570d20b0217db3632b5d5"
|
||||
]
|
||||
},
|
||||
"history": [
|
||||
{
|
||||
"created": "2024-09-06T12:05:36Z",
|
||||
"created_by": "ADD alpine-minirootfs-3.20.3-armv7.tar.gz / # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-09-06T12:05:36Z",
|
||||
"created_by": "CMD [\"/bin/sh\"]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:36:02.690991835Z",
|
||||
"created_by": "RUN /bin/sh -c apk add --no-cache fuse3 git openssh pigz xz iptables ip6tables \u0026\u0026 ln -s fusermount3 /usr/bin/fusermount # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:35:49.452745107Z",
|
||||
"created_by": "COPY examples/buildctl-daemonless/buildctl-daemonless.sh /usr/bin/ # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:35.805758197Z",
|
||||
"created_by": "VOLUME [/var/lib/buildkit]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:35.805758197Z",
|
||||
"created_by": "COPY / /usr/bin/ # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:35.805758197Z",
|
||||
"created_by": "ENV BUILDKIT_SETUP_CGROUPV2_ROOT=1",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:35.805758197Z",
|
||||
"created_by": "ENTRYPOINT [\"buildkitd\"]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"linux/arm64": {
|
||||
"created": "2024-12-16T23:44:45.848423966Z",
|
||||
"architecture": "arm64",
|
||||
"os": "linux",
|
||||
"config": {
|
||||
"Env": [
|
||||
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
"BUILDKIT_SETUP_CGROUPV2_ROOT=1"
|
||||
],
|
||||
"Entrypoint": [
|
||||
"buildkitd"
|
||||
],
|
||||
"Volumes": {
|
||||
"/var/lib/buildkit": {}
|
||||
},
|
||||
"WorkingDir": "/",
|
||||
"ArgsEscaped": true
|
||||
},
|
||||
"rootfs": {
|
||||
"type": "layers",
|
||||
"diff_ids": [
|
||||
"sha256:651d9022c23486dfbd396c13db293af6845731cbd098a5f5606db4bc9f5573e8",
|
||||
"sha256:9c138da7f7ea7cc8190f71ce15f125e2eb79fd360f4cc2d34513dad016cb1096",
|
||||
"sha256:37453f29fa93eccde9d8ffa21c0b92c41a981c727ad6c32acee11caf4f5e42a8",
|
||||
"sha256:9422ca7e65701d8eba4a5a31e325443dcbc753c2edef64e431c96702c94d2672"
|
||||
]
|
||||
},
|
||||
"history": [
|
||||
{
|
||||
"created": "2024-09-06T12:05:36Z",
|
||||
"created_by": "ADD alpine-minirootfs-3.20.3-aarch64.tar.gz / # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-09-06T12:05:36Z",
|
||||
"created_by": "CMD [\"/bin/sh\"]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:36:03.586014466Z",
|
||||
"created_by": "RUN /bin/sh -c apk add --no-cache fuse3 git openssh pigz xz iptables ip6tables \u0026\u0026 ln -s fusermount3 /usr/bin/fusermount # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:35:49.452745107Z",
|
||||
"created_by": "COPY examples/buildctl-daemonless/buildctl-daemonless.sh /usr/bin/ # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:45.848423966Z",
|
||||
"created_by": "VOLUME [/var/lib/buildkit]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:45.848423966Z",
|
||||
"created_by": "COPY / /usr/bin/ # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:45.848423966Z",
|
||||
"created_by": "ENV BUILDKIT_SETUP_CGROUPV2_ROOT=1",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:45.848423966Z",
|
||||
"created_by": "ENTRYPOINT [\"buildkitd\"]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"linux/ppc64le": {
|
||||
"created": "2024-12-16T23:44:45.864267959Z",
|
||||
"architecture": "ppc64le",
|
||||
"os": "linux",
|
||||
"config": {
|
||||
"Env": [
|
||||
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
"BUILDKIT_SETUP_CGROUPV2_ROOT=1"
|
||||
],
|
||||
"Entrypoint": [
|
||||
"buildkitd"
|
||||
],
|
||||
"Volumes": {
|
||||
"/var/lib/buildkit": {}
|
||||
},
|
||||
"WorkingDir": "/",
|
||||
"ArgsEscaped": true
|
||||
},
|
||||
"rootfs": {
|
||||
"type": "layers",
|
||||
"diff_ids": [
|
||||
"sha256:fc80c1f6e8bee4861c27b2cee0f8edf887bd4d88d20063ba179f0caa93088770",
|
||||
"sha256:e9fbfe005c7e2cd7d4f3159f07f6fbe82dad25c7e868a1ee2dd6503830d468c4",
|
||||
"sha256:37453f29fa93eccde9d8ffa21c0b92c41a981c727ad6c32acee11caf4f5e42a8",
|
||||
"sha256:86e0c30fb5e087f5cd324e082a0529c6326af1025f1a030fc1d2ac2979dec81c"
|
||||
]
|
||||
},
|
||||
"history": [
|
||||
{
|
||||
"created": "2024-09-06T12:05:36Z",
|
||||
"created_by": "ADD alpine-minirootfs-3.20.3-ppc64le.tar.gz / # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-09-06T12:05:36Z",
|
||||
"created_by": "CMD [\"/bin/sh\"]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:36:03.82451378Z",
|
||||
"created_by": "RUN /bin/sh -c apk add --no-cache fuse3 git openssh pigz xz iptables ip6tables \u0026\u0026 ln -s fusermount3 /usr/bin/fusermount # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:35:49.452745107Z",
|
||||
"created_by": "COPY examples/buildctl-daemonless/buildctl-daemonless.sh /usr/bin/ # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:45.864267959Z",
|
||||
"created_by": "VOLUME [/var/lib/buildkit]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:45.864267959Z",
|
||||
"created_by": "COPY / /usr/bin/ # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:45.864267959Z",
|
||||
"created_by": "ENV BUILDKIT_SETUP_CGROUPV2_ROOT=1",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:45.864267959Z",
|
||||
"created_by": "ENTRYPOINT [\"buildkitd\"]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"linux/riscv64": {
|
||||
"created": "2024-12-16T23:44:51.369236518Z",
|
||||
"architecture": "riscv64",
|
||||
"os": "linux",
|
||||
"config": {
|
||||
"Env": [
|
||||
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
"BUILDKIT_SETUP_CGROUPV2_ROOT=1"
|
||||
],
|
||||
"Entrypoint": [
|
||||
"buildkitd"
|
||||
],
|
||||
"Volumes": {
|
||||
"/var/lib/buildkit": {}
|
||||
},
|
||||
"WorkingDir": "/",
|
||||
"ArgsEscaped": true
|
||||
},
|
||||
"rootfs": {
|
||||
"type": "layers",
|
||||
"diff_ids": [
|
||||
"sha256:f9a3c4be4be59ad69b98da83e848450a28193c63ecdb40736f854308873152f9",
|
||||
"sha256:231aa6f6a7db1c4ac8dc807a8bdd250f92be3ffac79ef9fec89ca8ac2f78e688",
|
||||
"sha256:37453f29fa93eccde9d8ffa21c0b92c41a981c727ad6c32acee11caf4f5e42a8",
|
||||
"sha256:555c2f18bbe5d71e09387bdf745023055a8e5a6667905143c09a689e65f5ceff"
|
||||
]
|
||||
},
|
||||
"history": [
|
||||
{
|
||||
"created": "2024-09-06T12:05:36Z",
|
||||
"created_by": "ADD alpine-minirootfs-3.20.3-riscv64.tar.gz / # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-09-06T12:05:36Z",
|
||||
"created_by": "CMD [\"/bin/sh\"]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:36:02.869897238Z",
|
||||
"created_by": "RUN /bin/sh -c apk add --no-cache fuse3 git openssh pigz xz iptables ip6tables \u0026\u0026 ln -s fusermount3 /usr/bin/fusermount # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:35:49.452745107Z",
|
||||
"created_by": "COPY examples/buildctl-daemonless/buildctl-daemonless.sh /usr/bin/ # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:51.369236518Z",
|
||||
"created_by": "VOLUME [/var/lib/buildkit]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:51.369236518Z",
|
||||
"created_by": "COPY / /usr/bin/ # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:51.369236518Z",
|
||||
"created_by": "ENV BUILDKIT_SETUP_CGROUPV2_ROOT=1",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:51.369236518Z",
|
||||
"created_by": "ENTRYPOINT [\"buildkitd\"]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
}
|
||||
]
|
||||
},
|
||||
"linux/s390x": {
|
||||
"created": "2024-12-16T23:44:38.777675109Z",
|
||||
"architecture": "s390x",
|
||||
"os": "linux",
|
||||
"config": {
|
||||
"Env": [
|
||||
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
|
||||
"BUILDKIT_SETUP_CGROUPV2_ROOT=1"
|
||||
],
|
||||
"Entrypoint": [
|
||||
"buildkitd"
|
||||
],
|
||||
"Volumes": {
|
||||
"/var/lib/buildkit": {}
|
||||
},
|
||||
"WorkingDir": "/",
|
||||
"ArgsEscaped": true
|
||||
},
|
||||
"rootfs": {
|
||||
"type": "layers",
|
||||
"diff_ids": [
|
||||
"sha256:a772154591ea8d876b24f25db93db4753a9f05c6500413a5ff966d581957655e",
|
||||
"sha256:920529bf8be4087e77ec129bbcd9f3c4a179ede2f35cac38c6f8517fc9e41b9b",
|
||||
"sha256:37453f29fa93eccde9d8ffa21c0b92c41a981c727ad6c32acee11caf4f5e42a8",
|
||||
"sha256:2b99eb6f0070abe514fde85b61fa4993f1edfb32365b2a246841521f24fc38c0"
|
||||
]
|
||||
},
|
||||
"history": [
|
||||
{
|
||||
"created": "2024-09-06T12:05:36Z",
|
||||
"created_by": "ADD alpine-minirootfs-3.20.3-s390x.tar.gz / # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-09-06T12:05:36Z",
|
||||
"created_by": "CMD [\"/bin/sh\"]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:36:04.705568496Z",
|
||||
"created_by": "RUN /bin/sh -c apk add --no-cache fuse3 git openssh pigz xz iptables ip6tables \u0026\u0026 ln -s fusermount3 /usr/bin/fusermount # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:35:49.452745107Z",
|
||||
"created_by": "COPY examples/buildctl-daemonless/buildctl-daemonless.sh /usr/bin/ # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:38.777675109Z",
|
||||
"created_by": "VOLUME [/var/lib/buildkit]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:38.777675109Z",
|
||||
"created_by": "COPY / /usr/bin/ # buildkit",
|
||||
"comment": "buildkit.dockerfile.v0"
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:38.777675109Z",
|
||||
"created_by": "ENV BUILDKIT_SETUP_CGROUPV2_ROOT=1",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
},
|
||||
{
|
||||
"created": "2024-12-16T23:44:38.777675109Z",
|
||||
"created_by": "ENTRYPOINT [\"buildkitd\"]",
|
||||
"comment": "buildkit.dockerfile.v0",
|
||||
"empty_layer": true
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
39
__tests__/buildx/imagetools.test.itg.ts
Normal file
39
__tests__/buildx/imagetools.test.itg.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
/**
|
||||
* Copyright 2025 actions-toolkit authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {describe, expect, it} from '@jest/globals';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
import {ImageTools} from '../../src/buildx/imagetools';
|
||||
import {Image} from '../../src/types/oci/config';
|
||||
|
||||
const fixturesDir = path.join(__dirname, '..', '.fixtures');
|
||||
|
||||
const maybe = !process.env.GITHUB_ACTIONS || (process.env.GITHUB_ACTIONS === 'true' && process.env.ImageOS && process.env.ImageOS.startsWith('ubuntu')) ? describe : describe.skip;
|
||||
|
||||
maybe('inspectImage', () => {
|
||||
it('inspect single platform', async () => {
|
||||
const image = await new ImageTools().inspectImage('moby/buildkit:latest@sha256:5769c54b98840147b74128f38fb0b0a049e24b11a75bd81664131edd2854593f');
|
||||
const expectedImage = <Image>JSON.parse(fs.readFileSync(path.join(fixturesDir, 'imagetools-01.json'), {encoding: 'utf-8'}).trim());
|
||||
expect(image).toEqual(expectedImage);
|
||||
});
|
||||
it('inspect multi platform', async () => {
|
||||
const image = await new ImageTools().inspectImage('moby/buildkit:latest@sha256:86c0ad9d1137c186e9d455912167df20e530bdf7f7c19de802e892bb8ca16552');
|
||||
const expectedImage = <Record<string, Image>>JSON.parse(fs.readFileSync(path.join(fixturesDir, 'imagetools-02.json'), {encoding: 'utf-8'}).trim());
|
||||
expect(image).toEqual(expectedImage);
|
||||
});
|
||||
});
|
||||
109
__tests__/compose/compose.test.ts
Normal file
109
__tests__/compose/compose.test.ts
Normal file
@@ -0,0 +1,109 @@
|
||||
/**
|
||||
* Copyright 2025 actions-toolkit authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {describe, expect, it, jest, test, afterEach} from '@jest/globals';
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
import * as rimraf from 'rimraf';
|
||||
import * as semver from 'semver';
|
||||
|
||||
import {Context} from '../../src/context';
|
||||
import {Exec} from '../../src/exec';
|
||||
|
||||
import {Compose} from '../../src/compose/compose';
|
||||
|
||||
const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'compose-compose-'));
|
||||
const tmpName = path.join(tmpDir, '.tmpname-jest');
|
||||
|
||||
jest.spyOn(Context, 'tmpDir').mockImplementation((): string => {
|
||||
fs.mkdirSync(tmpDir, {recursive: true});
|
||||
return tmpDir;
|
||||
});
|
||||
|
||||
jest.spyOn(Context, 'tmpName').mockImplementation((): string => {
|
||||
return tmpName;
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
rimraf.sync(tmpDir);
|
||||
});
|
||||
|
||||
describe('isAvailable', () => {
|
||||
it('docker cli', async () => {
|
||||
const execSpy = jest.spyOn(Exec, 'getExecOutput');
|
||||
const compose = new Compose({
|
||||
standalone: false
|
||||
});
|
||||
await compose.isAvailable();
|
||||
// eslint-disable-next-line jest/no-standalone-expect
|
||||
expect(execSpy).toHaveBeenCalledWith(`docker`, ['compose'], {
|
||||
silent: true,
|
||||
ignoreReturnCode: true
|
||||
});
|
||||
});
|
||||
it('standalone', async () => {
|
||||
const execSpy = jest.spyOn(Exec, 'getExecOutput');
|
||||
const compose = new Compose({
|
||||
standalone: true
|
||||
});
|
||||
await compose.isAvailable();
|
||||
// eslint-disable-next-line jest/no-standalone-expect
|
||||
expect(execSpy).toHaveBeenCalledWith(`compose`, [], {
|
||||
silent: true,
|
||||
ignoreReturnCode: true
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('printVersion', () => {
|
||||
it('docker cli', async () => {
|
||||
const execSpy = jest.spyOn(Exec, 'exec');
|
||||
const compose = new Compose({
|
||||
standalone: false
|
||||
});
|
||||
await compose.printVersion();
|
||||
expect(execSpy).toHaveBeenCalledWith(`docker`, ['compose', 'version'], {
|
||||
failOnStdErr: false
|
||||
});
|
||||
});
|
||||
it('standalone', async () => {
|
||||
const execSpy = jest.spyOn(Exec, 'exec');
|
||||
const compose = new Compose({
|
||||
standalone: true
|
||||
});
|
||||
await compose.printVersion();
|
||||
expect(execSpy).toHaveBeenCalledWith(`compose`, ['version'], {
|
||||
failOnStdErr: false
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('version', () => {
|
||||
it('valid', async () => {
|
||||
const compose = new Compose();
|
||||
expect(semver.valid(await compose.version())).not.toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe('parseVersion', () => {
|
||||
// prettier-ignore
|
||||
test.each([
|
||||
['Docker Compose version v2.31.0', '2.31.0'],
|
||||
])('given %p', async (stdout, expected) => {
|
||||
expect(Compose.parseVersion(stdout)).toEqual(expected);
|
||||
});
|
||||
});
|
||||
42
__tests__/compose/install.test.itg.ts
Normal file
42
__tests__/compose/install.test.itg.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* Copyright 2025 actions-toolkit authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {describe, expect, test} from '@jest/globals';
|
||||
import * as fs from 'fs';
|
||||
|
||||
import {Install} from '../../src/compose/install';
|
||||
|
||||
const maybe = !process.env.GITHUB_ACTIONS || (process.env.GITHUB_ACTIONS === 'true' && process.env.ImageOS && process.env.ImageOS.startsWith('ubuntu')) ? describe : describe.skip;
|
||||
|
||||
maybe('download', () => {
|
||||
// prettier-ignore
|
||||
test.each(['latest'])(
|
||||
'install compose %s', async (version) => {
|
||||
await expect((async () => {
|
||||
const install = new Install({
|
||||
standalone: true
|
||||
});
|
||||
const toolPath = await install.download(version);
|
||||
if (!fs.existsSync(toolPath)) {
|
||||
throw new Error('toolPath does not exist');
|
||||
}
|
||||
const binPath = await install.installStandalone(toolPath);
|
||||
if (!fs.existsSync(binPath)) {
|
||||
throw new Error('binPath does not exist');
|
||||
}
|
||||
})()).resolves.not.toThrow();
|
||||
}, 60000);
|
||||
});
|
||||
134
__tests__/compose/install.test.ts
Normal file
134
__tests__/compose/install.test.ts
Normal file
@@ -0,0 +1,134 @@
|
||||
/**
|
||||
* Copyright 2025 actions-toolkit authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {describe, expect, it, jest, test, afterEach} from '@jest/globals';
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
import * as rimraf from 'rimraf';
|
||||
import osm = require('os');
|
||||
|
||||
import {Install} from '../../src/compose/install';
|
||||
|
||||
const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'compose-install-'));
|
||||
|
||||
afterEach(function () {
|
||||
rimraf.sync(tmpDir);
|
||||
});
|
||||
|
||||
describe('download', () => {
|
||||
// prettier-ignore
|
||||
test.each([
|
||||
['v2.31.0', false],
|
||||
['v2.32.4', true],
|
||||
['latest', true]
|
||||
])(
|
||||
'acquires %p of compose (standalone: %p)', async (version, standalone) => {
|
||||
const install = new Install({standalone: standalone});
|
||||
const toolPath = await install.download(version);
|
||||
expect(fs.existsSync(toolPath)).toBe(true);
|
||||
let composeBin: string;
|
||||
if (standalone) {
|
||||
composeBin = await install.installStandalone(toolPath, tmpDir);
|
||||
} else {
|
||||
composeBin = await install.installPlugin(toolPath, tmpDir);
|
||||
}
|
||||
expect(fs.existsSync(composeBin)).toBe(true);
|
||||
},
|
||||
100000
|
||||
);
|
||||
|
||||
// prettier-ignore
|
||||
test.each([
|
||||
// following versions are already cached to htc from previous test cases
|
||||
['v2.31.0'],
|
||||
['v2.32.4'],
|
||||
])(
|
||||
'acquires %p of compose with cache', async (version) => {
|
||||
const install = new Install({standalone: false});
|
||||
const toolPath = await install.download(version);
|
||||
expect(fs.existsSync(toolPath)).toBe(true);
|
||||
});
|
||||
|
||||
// prettier-ignore
|
||||
test.each([
|
||||
['v2.27.1'],
|
||||
['v2.28.0'],
|
||||
])(
|
||||
'acquires %p of compose without cache', async (version) => {
|
||||
const install = new Install({standalone: false});
|
||||
const toolPath = await install.download(version, true);
|
||||
expect(fs.existsSync(toolPath)).toBe(true);
|
||||
});
|
||||
|
||||
// TODO: add tests for arm
|
||||
// prettier-ignore
|
||||
test.each([
|
||||
['win32', 'x64'],
|
||||
['win32', 'arm64'],
|
||||
['darwin', 'x64'],
|
||||
['darwin', 'arm64'],
|
||||
['linux', 'x64'],
|
||||
['linux', 'arm64'],
|
||||
['linux', 'ppc64'],
|
||||
['linux', 's390x'],
|
||||
])(
|
||||
'acquires compose for %s/%s', async (os, arch) => {
|
||||
jest.spyOn(osm, 'platform').mockImplementation(() => os as NodeJS.Platform);
|
||||
jest.spyOn(osm, 'arch').mockImplementation(() => arch);
|
||||
const install = new Install();
|
||||
const composeBin = await install.download('latest');
|
||||
expect(fs.existsSync(composeBin)).toBe(true);
|
||||
},
|
||||
100000
|
||||
);
|
||||
});
|
||||
|
||||
describe('getDownloadVersion', () => {
|
||||
it('returns latest download version', async () => {
|
||||
const version = await Install.getDownloadVersion('latest');
|
||||
expect(version.version).toEqual('latest');
|
||||
expect(version.downloadURL).toEqual('https://github.com/docker/compose/releases/download/v%s/%s');
|
||||
expect(version.releasesURL).toEqual('https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/compose-releases.json');
|
||||
});
|
||||
it('returns v2.24.3 download version', async () => {
|
||||
const version = await Install.getDownloadVersion('v2.24.3');
|
||||
expect(version.version).toEqual('v2.24.3');
|
||||
expect(version.downloadURL).toEqual('https://github.com/docker/compose/releases/download/v%s/%s');
|
||||
expect(version.releasesURL).toEqual('https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/compose-releases.json');
|
||||
});
|
||||
});
|
||||
|
||||
describe('getRelease', () => {
|
||||
it('returns latest GitHub release', async () => {
|
||||
const version = await Install.getDownloadVersion('latest');
|
||||
const release = await Install.getRelease(version);
|
||||
expect(release).not.toBeNull();
|
||||
expect(release?.tag_name).not.toEqual('');
|
||||
});
|
||||
it('returns v2.24.3 GitHub release', async () => {
|
||||
const version = await Install.getDownloadVersion('v2.24.3');
|
||||
const release = await Install.getRelease(version);
|
||||
expect(release).not.toBeNull();
|
||||
expect(release?.id).toEqual(138380726);
|
||||
expect(release?.tag_name).toEqual('v2.24.3');
|
||||
expect(release?.html_url).toEqual('https://github.com/docker/compose/releases/tag/v2.24.3');
|
||||
});
|
||||
it('unknown release', async () => {
|
||||
const version = await Install.getDownloadVersion('foo');
|
||||
await expect(Install.getRelease(version)).rejects.toThrow(new Error('Cannot find Compose release foo in https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/compose-releases.json'));
|
||||
});
|
||||
});
|
||||
@@ -60,6 +60,7 @@ describe('download', () => {
|
||||
])(
|
||||
'acquires %p of docker (%s)', async (source, platformOS) => {
|
||||
jest.spyOn(osm, 'platform').mockImplementation(() => platformOS as NodeJS.Platform);
|
||||
jest.spyOn(osm, 'arch').mockImplementation(() => 'x64');
|
||||
const install = new Install({
|
||||
source: source,
|
||||
runDir: tmpDir,
|
||||
|
||||
@@ -25,6 +25,7 @@ import {Build} from '../src/buildx/build';
|
||||
import {Exec} from '../src/exec';
|
||||
import {GitHub} from '../src/github';
|
||||
import {History} from '../src/buildx/history';
|
||||
import {Util} from '../src/util';
|
||||
|
||||
const fixturesDir = path.join(__dirname, '.fixtures');
|
||||
const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'github-itg-'));
|
||||
@@ -33,8 +34,10 @@ const maybe = !process.env.GITHUB_ACTIONS || (process.env.GITHUB_ACTIONS === 'tr
|
||||
|
||||
maybe('uploadArtifact', () => {
|
||||
it('uploads an artifact', async () => {
|
||||
const filename = path.join(tmpDir, `github-repo-${Util.generateRandomString()}.json`);
|
||||
fs.copyFileSync(path.join(fixturesDir, `github-repo.json`), filename);
|
||||
const res = await GitHub.uploadArtifact({
|
||||
filename: path.join(fixturesDir, 'github-repo.json'),
|
||||
filename: filename,
|
||||
mimeType: 'application/json',
|
||||
retentionDays: 1
|
||||
});
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
ARG NODE_VERSION=20
|
||||
ARG DOCKER_VERSION=27.2.1
|
||||
ARG BUILDX_VERSION=0.19.3
|
||||
ARG COMPOSE_VERSION=2.32.4
|
||||
ARG UNDOCK_VERSION=0.8.0
|
||||
|
||||
FROM node:${NODE_VERSION}-alpine AS base
|
||||
@@ -76,6 +77,7 @@ RUN --mount=type=bind,target=.,rw \
|
||||
|
||||
FROM docker:${DOCKER_VERSION} AS docker
|
||||
FROM docker/buildx-bin:${BUILDX_VERSION} AS buildx
|
||||
FROM docker/compose-bin:v${COMPOSE_VERSION} AS compose
|
||||
FROM crazymax/undock:${UNDOCK_VERSION} AS undock
|
||||
|
||||
FROM deps AS test
|
||||
@@ -85,6 +87,8 @@ RUN --mount=type=bind,target=.,rw \
|
||||
--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/bin/buildx \
|
||||
--mount=type=bind,from=compose,source=/docker-compose,target=/usr/libexec/docker/cli-plugins/docker-compose \
|
||||
--mount=type=bind,from=compose,source=/docker-compose,target=/usr/bin/compose \
|
||||
--mount=type=bind,from=undock,source=/usr/local/bin/undock,target=/usr/bin/undock \
|
||||
--mount=type=secret,id=GITHUB_TOKEN \
|
||||
GITHUB_TOKEN=$(cat /run/secrets/GITHUB_TOKEN) yarn run test:coverage --coverageDirectory=/tmp/coverage
|
||||
|
||||
@@ -46,13 +46,13 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/artifact": "^2.2.1",
|
||||
"@actions/cache": "^3.3.0",
|
||||
"@actions/cache": "^4.0.0",
|
||||
"@actions/core": "^1.11.1",
|
||||
"@actions/exec": "^1.1.1",
|
||||
"@actions/github": "^6.0.0",
|
||||
"@actions/http-client": "^2.2.3",
|
||||
"@actions/io": "^1.1.3",
|
||||
"@actions/tool-cache": "^2.0.1",
|
||||
"@actions/tool-cache": "^2.0.2",
|
||||
"@azure/storage-blob": "^12.15.0",
|
||||
"@octokit/core": "^5.1.0",
|
||||
"@octokit/plugin-rest-endpoint-methods": "^10.4.0",
|
||||
|
||||
61
src/buildx/imagetools.ts
Normal file
61
src/buildx/imagetools.ts
Normal file
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* Copyright 2025 actions-toolkit authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {Buildx} from './buildx';
|
||||
import {Exec} from '../exec';
|
||||
|
||||
import {Image} from '../types/oci/config';
|
||||
|
||||
export interface ImageToolsOpts {
|
||||
buildx?: Buildx;
|
||||
}
|
||||
|
||||
export class ImageTools {
|
||||
private readonly buildx: Buildx;
|
||||
|
||||
constructor(opts?: ImageToolsOpts) {
|
||||
this.buildx = opts?.buildx || new Buildx();
|
||||
}
|
||||
|
||||
public async getCommand(args: Array<string>) {
|
||||
return await this.buildx.getCommand(['imagetools', ...args]);
|
||||
}
|
||||
|
||||
public async getInspectCommand(args: Array<string>) {
|
||||
return await this.getCommand(['inspect', ...args]);
|
||||
}
|
||||
|
||||
public async inspectImage(name: string): Promise<Record<string, Image> | Image> {
|
||||
const cmd = await this.getInspectCommand([name, '--format', '{{json .Image}}']);
|
||||
return await Exec.getExecOutput(cmd.command, cmd.args, {
|
||||
ignoreReturnCode: true,
|
||||
silent: true
|
||||
}).then(res => {
|
||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||
throw new Error(res.stderr.trim());
|
||||
}
|
||||
const parsedOutput = JSON.parse(res.stdout);
|
||||
if (typeof parsedOutput === 'object' && !Array.isArray(parsedOutput) && parsedOutput !== null) {
|
||||
if (Object.prototype.hasOwnProperty.call(parsedOutput, 'config')) {
|
||||
return <Image>parsedOutput;
|
||||
} else {
|
||||
return <Record<string, Image>>parsedOutput;
|
||||
}
|
||||
}
|
||||
throw new Error('Unexpected output format');
|
||||
});
|
||||
}
|
||||
}
|
||||
106
src/compose/compose.ts
Normal file
106
src/compose/compose.ts
Normal file
@@ -0,0 +1,106 @@
|
||||
/**
|
||||
* Copyright 2025 actions-toolkit authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import * as core from '@actions/core';
|
||||
|
||||
import {Docker} from '../docker/docker';
|
||||
import {Exec} from '../exec';
|
||||
|
||||
export interface ComposeOpts {
|
||||
standalone?: boolean;
|
||||
}
|
||||
|
||||
export class Compose {
|
||||
private _version: string;
|
||||
private _versionOnce: boolean;
|
||||
private readonly _standalone: boolean | undefined;
|
||||
|
||||
constructor(opts?: ComposeOpts) {
|
||||
this._standalone = opts?.standalone;
|
||||
this._version = '';
|
||||
this._versionOnce = false;
|
||||
}
|
||||
|
||||
public async isStandalone(): Promise<boolean> {
|
||||
const standalone = this._standalone ?? !(await Docker.isAvailable());
|
||||
core.debug(`Compose.isStandalone: ${standalone}`);
|
||||
return standalone;
|
||||
}
|
||||
|
||||
public async getCommand(args: Array<string>) {
|
||||
const standalone = await this.isStandalone();
|
||||
return {
|
||||
command: standalone ? 'compose' : 'docker',
|
||||
args: standalone ? args : ['compose', ...args]
|
||||
};
|
||||
}
|
||||
|
||||
public async isAvailable(): Promise<boolean> {
|
||||
const cmd = await this.getCommand([]);
|
||||
|
||||
const ok: boolean = await Exec.getExecOutput(cmd.command, cmd.args, {
|
||||
ignoreReturnCode: true,
|
||||
silent: true
|
||||
})
|
||||
.then(res => {
|
||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||
core.debug(`Compose.isAvailable cmd err: ${res.stderr.trim()}`);
|
||||
return false;
|
||||
}
|
||||
return res.exitCode == 0;
|
||||
})
|
||||
.catch(error => {
|
||||
core.debug(`Compose.isAvailable error: ${error}`);
|
||||
return false;
|
||||
});
|
||||
|
||||
core.debug(`Compose.isAvailable: ${ok}`);
|
||||
return ok;
|
||||
}
|
||||
|
||||
public async version(): Promise<string> {
|
||||
if (this._versionOnce) {
|
||||
return this._version;
|
||||
}
|
||||
this._versionOnce = true;
|
||||
const cmd = await this.getCommand(['version']);
|
||||
this._version = await Exec.getExecOutput(cmd.command, cmd.args, {
|
||||
ignoreReturnCode: true,
|
||||
silent: true
|
||||
}).then(res => {
|
||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||
throw new Error(res.stderr.trim());
|
||||
}
|
||||
return Compose.parseVersion(res.stdout.trim());
|
||||
});
|
||||
return this._version;
|
||||
}
|
||||
|
||||
public async printVersion() {
|
||||
const cmd = await this.getCommand(['version']);
|
||||
await Exec.exec(cmd.command, cmd.args, {
|
||||
failOnStdErr: false
|
||||
});
|
||||
}
|
||||
|
||||
public static parseVersion(stdout: string): string {
|
||||
const matches = /\sv?([0-9a-f]{7}|[0-9.]+)/.exec(stdout);
|
||||
if (!matches) {
|
||||
throw new Error(`Cannot parse compose version`);
|
||||
}
|
||||
return matches[1];
|
||||
}
|
||||
}
|
||||
196
src/compose/install.ts
Normal file
196
src/compose/install.ts
Normal file
@@ -0,0 +1,196 @@
|
||||
/**
|
||||
* Copyright 2025 actions-toolkit authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
import * as core from '@actions/core';
|
||||
import * as httpm from '@actions/http-client';
|
||||
import * as tc from '@actions/tool-cache';
|
||||
import * as semver from 'semver';
|
||||
import * as util from 'util';
|
||||
|
||||
import {Cache} from '../cache';
|
||||
import {Context} from '../context';
|
||||
|
||||
import {DownloadVersion} from '../types/compose/compose';
|
||||
import {GitHubRelease} from '../types/github';
|
||||
import {Docker} from '../docker/docker';
|
||||
|
||||
export interface InstallOpts {
|
||||
standalone?: boolean;
|
||||
}
|
||||
|
||||
export class Install {
|
||||
private readonly _standalone: boolean | undefined;
|
||||
|
||||
constructor(opts?: InstallOpts) {
|
||||
this._standalone = opts?.standalone;
|
||||
}
|
||||
|
||||
/*
|
||||
* Download compose binary from GitHub release
|
||||
* @param v: version semver version or latest
|
||||
* @param ghaNoCache: disable binary caching in GitHub Actions cache backend
|
||||
* @returns path to the compose binary
|
||||
*/
|
||||
public async download(v: string, ghaNoCache?: boolean): Promise<string> {
|
||||
const version: DownloadVersion = await Install.getDownloadVersion(v);
|
||||
core.debug(`Install.download version: ${version.version}`);
|
||||
|
||||
const release: GitHubRelease = await Install.getRelease(version);
|
||||
core.debug(`Install.download release tag name: ${release.tag_name}`);
|
||||
|
||||
const vspec = await this.vspec(release.tag_name);
|
||||
core.debug(`Install.download vspec: ${vspec}`);
|
||||
|
||||
const c = semver.clean(vspec) || '';
|
||||
if (!semver.valid(c)) {
|
||||
throw new Error(`Invalid Compose version "${vspec}".`);
|
||||
}
|
||||
|
||||
const installCache = new Cache({
|
||||
htcName: 'compose-dl-bin',
|
||||
htcVersion: vspec,
|
||||
baseCacheDir: path.join(os.homedir(), '.bin'),
|
||||
cacheFile: os.platform() == 'win32' ? 'docker-compose.exe' : 'docker-compose',
|
||||
ghaNoCache: ghaNoCache
|
||||
});
|
||||
|
||||
const cacheFoundPath = await installCache.find();
|
||||
if (cacheFoundPath) {
|
||||
core.info(`Compose binary found in ${cacheFoundPath}`);
|
||||
return cacheFoundPath;
|
||||
}
|
||||
|
||||
const downloadURL = util.format(version.downloadURL, vspec, this.filename());
|
||||
core.info(`Downloading ${downloadURL}`);
|
||||
|
||||
const htcDownloadPath = await tc.downloadTool(downloadURL);
|
||||
core.debug(`Install.download htcDownloadPath: ${htcDownloadPath}`);
|
||||
|
||||
const cacheSavePath = await installCache.save(htcDownloadPath);
|
||||
core.info(`Cached to ${cacheSavePath}`);
|
||||
return cacheSavePath;
|
||||
}
|
||||
|
||||
public async installStandalone(binPath: string, dest?: string): Promise<string> {
|
||||
core.info('Standalone mode');
|
||||
dest = dest || Context.tmpDir();
|
||||
|
||||
const binDir = path.join(dest, 'compose-bin-standalone');
|
||||
if (!fs.existsSync(binDir)) {
|
||||
fs.mkdirSync(binDir, {recursive: true});
|
||||
}
|
||||
const binName: string = os.platform() == 'win32' ? 'compose.exe' : 'compose';
|
||||
const composePath: string = path.join(binDir, binName);
|
||||
fs.copyFileSync(binPath, composePath);
|
||||
|
||||
core.info('Fixing perms');
|
||||
fs.chmodSync(composePath, '0755');
|
||||
|
||||
core.addPath(binDir);
|
||||
core.info('Added Compose to PATH');
|
||||
|
||||
core.info(`Binary path: ${composePath}`);
|
||||
return composePath;
|
||||
}
|
||||
|
||||
public async installPlugin(binPath: string, dest?: string): Promise<string> {
|
||||
core.info('Docker plugin mode');
|
||||
dest = dest || Docker.configDir;
|
||||
|
||||
const pluginsDir: string = path.join(dest, 'cli-plugins');
|
||||
if (!fs.existsSync(pluginsDir)) {
|
||||
fs.mkdirSync(pluginsDir, {recursive: true});
|
||||
}
|
||||
const binName: string = os.platform() == 'win32' ? 'docker-compose.exe' : 'docker-compose';
|
||||
const pluginPath: string = path.join(pluginsDir, binName);
|
||||
fs.copyFileSync(binPath, pluginPath);
|
||||
|
||||
core.info('Fixing perms');
|
||||
fs.chmodSync(pluginPath, '0755');
|
||||
|
||||
core.info(`Plugin path: ${pluginPath}`);
|
||||
return pluginPath;
|
||||
}
|
||||
|
||||
private async isStandalone(): Promise<boolean> {
|
||||
const standalone = this._standalone ?? !(await Docker.isAvailable());
|
||||
core.debug(`Install.isStandalone: ${standalone}`);
|
||||
return standalone;
|
||||
}
|
||||
|
||||
private filename(): string {
|
||||
let arch: string;
|
||||
switch (os.arch()) {
|
||||
case 'x64': {
|
||||
arch = 'x86_64';
|
||||
break;
|
||||
}
|
||||
case 'ppc64': {
|
||||
arch = 'ppc64le';
|
||||
break;
|
||||
}
|
||||
case 'arm': {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const arm_version = (process.config.variables as any).arm_version;
|
||||
arch = arm_version ? 'armv' + arm_version : 'arm';
|
||||
break;
|
||||
}
|
||||
case 'arm64': {
|
||||
arch = 'aarch64';
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
arch = os.arch();
|
||||
break;
|
||||
}
|
||||
}
|
||||
const platform: string = os.platform() == 'win32' ? 'windows' : os.platform();
|
||||
const ext: string = os.platform() == 'win32' ? '.exe' : '';
|
||||
return util.format('docker-compose-%s-%s%s', platform, arch, ext);
|
||||
}
|
||||
|
||||
private async vspec(version: string): Promise<string> {
|
||||
const v = version.replace(/^v+|v+$/g, '');
|
||||
core.info(`Use ${v} version spec cache key for ${version}`);
|
||||
return v;
|
||||
}
|
||||
|
||||
public static async getDownloadVersion(v: string): Promise<DownloadVersion> {
|
||||
return {
|
||||
version: v,
|
||||
downloadURL: 'https://github.com/docker/compose/releases/download/v%s/%s',
|
||||
releasesURL: 'https://raw.githubusercontent.com/docker/actions-toolkit/main/.github/compose-releases.json'
|
||||
};
|
||||
}
|
||||
|
||||
public static async getRelease(version: DownloadVersion): Promise<GitHubRelease> {
|
||||
const http: httpm.HttpClient = new httpm.HttpClient('docker-actions-toolkit');
|
||||
const resp: httpm.HttpClientResponse = await http.get(version.releasesURL);
|
||||
const body = await resp.readBody();
|
||||
const statusCode = resp.message.statusCode || 500;
|
||||
if (statusCode >= 400) {
|
||||
throw new Error(`Failed to get Compose releases from ${version.releasesURL} with status code ${statusCode}: ${body}`);
|
||||
}
|
||||
const releases = <Record<string, GitHubRelease>>JSON.parse(body);
|
||||
if (!releases[version.version]) {
|
||||
throw new Error(`Cannot find Compose release ${version.version} in ${version.releasesURL}`);
|
||||
}
|
||||
return releases[version.version];
|
||||
}
|
||||
}
|
||||
@@ -20,6 +20,8 @@ import {Bake as BuildxBake} from './buildx/bake';
|
||||
import {Install as BuildxInstall} from './buildx/install';
|
||||
import {Builder} from './buildx/builder';
|
||||
import {BuildKit} from './buildkit/buildkit';
|
||||
import {Compose} from './compose/compose';
|
||||
import {Install as ComposeInstall} from './compose/install';
|
||||
import {Undock} from './undock/undock';
|
||||
import {GitHub} from './github';
|
||||
|
||||
@@ -39,6 +41,8 @@ export class Toolkit {
|
||||
public buildxInstall: BuildxInstall;
|
||||
public builder: Builder;
|
||||
public buildkit: BuildKit;
|
||||
public compose: Compose;
|
||||
public composeInstall: ComposeInstall;
|
||||
public undock: Undock;
|
||||
|
||||
constructor(opts: ToolkitOpts = {}) {
|
||||
@@ -49,6 +53,8 @@ export class Toolkit {
|
||||
this.buildxInstall = new BuildxInstall();
|
||||
this.builder = new Builder({buildx: this.buildx});
|
||||
this.buildkit = new BuildKit({buildx: this.buildx});
|
||||
this.compose = new Compose();
|
||||
this.composeInstall = new ComposeInstall();
|
||||
this.undock = new Undock();
|
||||
}
|
||||
}
|
||||
|
||||
21
src/types/compose/compose.ts
Normal file
21
src/types/compose/compose.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* Copyright 2025 actions-toolkit authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export interface DownloadVersion {
|
||||
version: string;
|
||||
downloadURL: string;
|
||||
releasesURL: string;
|
||||
}
|
||||
36
yarn.lock
36
yarn.lock
@@ -33,9 +33,9 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@actions/cache@npm:^3.3.0":
|
||||
version: 3.3.0
|
||||
resolution: "@actions/cache@npm:3.3.0"
|
||||
"@actions/cache@npm:^4.0.0":
|
||||
version: 4.0.0
|
||||
resolution: "@actions/cache@npm:4.0.0"
|
||||
dependencies:
|
||||
"@actions/core": ^1.11.1
|
||||
"@actions/exec": ^1.0.1
|
||||
@@ -45,8 +45,10 @@ __metadata:
|
||||
"@azure/abort-controller": ^1.1.0
|
||||
"@azure/ms-rest-js": ^2.6.0
|
||||
"@azure/storage-blob": ^12.13.0
|
||||
"@protobuf-ts/plugin": ^2.9.4
|
||||
semver: ^6.3.1
|
||||
checksum: f0761b1491b7706a80b44d68ed52eb48c04653fc939525a7c7b606e9d9251c40c7e4ac20846ab92ac32db6869e1a6f0f574bd6b7fec1ab9378c8e199c5acc9c9
|
||||
twirp-ts: ^2.5.0
|
||||
checksum: 8ab819a67b578a5ce6de984f4ef8420066f8270e1f9db053700f4a8f084d0bbe4f911114f7088a95a987372ea63078550355d99849412152dd0efdf688bf9144
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -168,17 +170,16 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@actions/tool-cache@npm:^2.0.1":
|
||||
version: 2.0.1
|
||||
resolution: "@actions/tool-cache@npm:2.0.1"
|
||||
"@actions/tool-cache@npm:^2.0.2":
|
||||
version: 2.0.2
|
||||
resolution: "@actions/tool-cache@npm:2.0.2"
|
||||
dependencies:
|
||||
"@actions/core": ^1.2.6
|
||||
"@actions/core": ^1.11.1
|
||||
"@actions/exec": ^1.0.0
|
||||
"@actions/http-client": ^2.0.1
|
||||
"@actions/io": ^1.1.1
|
||||
semver: ^6.1.0
|
||||
uuid: ^3.3.2
|
||||
checksum: 33f6393b9b163e4af2b9759e8d37cda4f018f10ddda3643355bb8a9f92d732e5bdff089cf8036b46d181e1ef2b3210b895b2f746fdf54487afe88f1d340aa9e1
|
||||
checksum: c2bab4297be752bdda9dd61f8159a201ad0d37d026134b960f1edcc9418a80387f44d1f24a070fe992c44dcfc28a152f70600e76669bb0578132789a6f37a596
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -1108,13 +1109,13 @@ __metadata:
|
||||
resolution: "@docker/actions-toolkit@workspace:."
|
||||
dependencies:
|
||||
"@actions/artifact": ^2.2.1
|
||||
"@actions/cache": ^3.3.0
|
||||
"@actions/cache": ^4.0.0
|
||||
"@actions/core": ^1.11.1
|
||||
"@actions/exec": ^1.1.1
|
||||
"@actions/github": ^6.0.0
|
||||
"@actions/http-client": ^2.2.3
|
||||
"@actions/io": ^1.1.3
|
||||
"@actions/tool-cache": ^2.0.1
|
||||
"@actions/tool-cache": ^2.0.2
|
||||
"@azure/storage-blob": ^12.15.0
|
||||
"@octokit/core": ^5.1.0
|
||||
"@octokit/plugin-rest-endpoint-methods": ^10.4.0
|
||||
@@ -2009,7 +2010,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@protobuf-ts/plugin@npm:^2.2.3-alpha.1":
|
||||
"@protobuf-ts/plugin@npm:^2.2.3-alpha.1, @protobuf-ts/plugin@npm:^2.9.4":
|
||||
version: 2.9.4
|
||||
resolution: "@protobuf-ts/plugin@npm:2.9.4"
|
||||
dependencies:
|
||||
@@ -8362,15 +8363,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"uuid@npm:^3.3.2":
|
||||
version: 3.4.0
|
||||
resolution: "uuid@npm:3.4.0"
|
||||
bin:
|
||||
uuid: ./bin/uuid
|
||||
checksum: 58de2feed61c59060b40f8203c0e4ed7fd6f99d42534a499f1741218a1dd0c129f4aa1de797bcf822c8ea5da7e4137aa3673431a96dae729047f7aca7b27866f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"uuid@npm:^8.3.0, uuid@npm:^8.3.2":
|
||||
version: 8.3.2
|
||||
resolution: "uuid@npm:8.3.2"
|
||||
|
||||
Reference in New Issue
Block a user