Compare commits
28 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad2312d5f1 | ||
|
|
21e2b75b0b | ||
|
|
4d926d8b7b | ||
|
|
293c3cdcfe | ||
|
|
17071615a7 | ||
|
|
0cc9e68b03 | ||
|
|
b732db2937 | ||
|
|
8696544f14 | ||
|
|
d92ed04680 | ||
|
|
3bb4ae38ea | ||
|
|
09c0f6a78e | ||
|
|
3c25c1eed2 | ||
|
|
ee671ae33e | ||
|
|
960acb25ae | ||
|
|
1ff078d955 | ||
|
|
abe7883e9a | ||
|
|
c16b4fdf35 | ||
|
|
211c9b2312 | ||
|
|
a30e0f51eb | ||
|
|
61c3c53dbf | ||
|
|
91a5724116 | ||
|
|
9998df7a3d | ||
|
|
3d448bd483 | ||
|
|
51cc1b5526 | ||
|
|
58584e3d97 | ||
|
|
f06e39e022 | ||
|
|
4c705618e1 | ||
|
|
1ebb922e84 |
354
.github/buildx-releases.json
vendored
354
.github/buildx-releases.json
vendored
@@ -1,76 +1,150 @@
|
||||
{
|
||||
"latest": {
|
||||
"id": 292739715,
|
||||
"tag_name": "v0.32.0",
|
||||
"html_url": "https://github.com/docker/buildx/releases/tag/v0.32.0",
|
||||
"id": 293153745,
|
||||
"tag_name": "v0.32.1",
|
||||
"html_url": "https://github.com/docker/buildx/releases/tag/v0.32.1",
|
||||
"assets": [
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.darwin-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.darwin-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.darwin-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.darwin-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.darwin-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.darwin-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.freebsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.freebsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.freebsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.freebsd-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.freebsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.freebsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.freebsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.freebsd-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm-v6",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm-v6.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm-v6.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm-v6.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm-v7",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm-v7.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm-v7.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm-v7.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-ppc64le",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-ppc64le.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-ppc64le.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-ppc64le.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-riscv64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-riscv64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-riscv64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-riscv64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-s390x",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-s390x.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-s390x.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-s390x.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.netbsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.netbsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.netbsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.netbsd-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.netbsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.netbsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.netbsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.netbsd-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.openbsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.openbsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.openbsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.openbsd-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.openbsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.openbsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.openbsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.openbsd-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.windows-amd64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.windows-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.windows-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.windows-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.windows-arm64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.windows-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.windows-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.windows-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/checksums.txt"
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.darwin-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.darwin-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.darwin-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.darwin-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.darwin-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.darwin-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v6",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v6.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v6.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v6.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v7",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v7.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v7.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v7.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-ppc64le",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-ppc64le.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-ppc64le.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-ppc64le.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-riscv64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-riscv64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-riscv64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-riscv64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-s390x",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-s390x.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-s390x.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-s390x.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-amd64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-arm64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/checksums.txt"
|
||||
]
|
||||
},
|
||||
"v0.32.1": {
|
||||
"id": 293153745,
|
||||
"tag_name": "v0.32.1",
|
||||
"html_url": "https://github.com/docker/buildx/releases/tag/v0.32.1",
|
||||
"assets": [
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.darwin-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.darwin-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.darwin-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.darwin-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.darwin-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.darwin-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v6",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v6.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v6.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v6.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v7",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v7.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v7.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v7.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-ppc64le",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-ppc64le.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-ppc64le.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-ppc64le.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-riscv64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-riscv64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-riscv64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-riscv64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-s390x",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-s390x.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-s390x.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-s390x.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-amd64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-arm64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/checksums.txt"
|
||||
]
|
||||
},
|
||||
"v0.32.0": {
|
||||
@@ -148,77 +222,77 @@
|
||||
]
|
||||
},
|
||||
"edge": {
|
||||
"id": 292739715,
|
||||
"tag_name": "v0.32.0",
|
||||
"html_url": "https://github.com/docker/buildx/releases/tag/v0.32.0",
|
||||
"id": 293153745,
|
||||
"tag_name": "v0.32.1",
|
||||
"html_url": "https://github.com/docker/buildx/releases/tag/v0.32.1",
|
||||
"assets": [
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.darwin-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.darwin-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.darwin-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.darwin-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.darwin-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.darwin-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.freebsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.freebsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.freebsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.freebsd-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.freebsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.freebsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.freebsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.freebsd-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm-v6",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm-v6.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm-v6.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm-v6.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm-v7",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm-v7.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm-v7.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm-v7.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-ppc64le",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-ppc64le.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-ppc64le.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-ppc64le.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-riscv64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-riscv64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-riscv64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-riscv64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-s390x",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-s390x.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-s390x.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.linux-s390x.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.netbsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.netbsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.netbsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.netbsd-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.netbsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.netbsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.netbsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.netbsd-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.openbsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.openbsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.openbsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.openbsd-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.openbsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.openbsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.openbsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.openbsd-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.windows-amd64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.windows-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.windows-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.windows-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.windows-arm64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.windows-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.windows-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/buildx-v0.32.0.windows-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.0/checksums.txt"
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.darwin-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.darwin-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.darwin-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.darwin-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.darwin-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.darwin-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.freebsd-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v6",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v6.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v6.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v6.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v7",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v7.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v7.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm-v7.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-ppc64le",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-ppc64le.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-ppc64le.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-ppc64le.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-riscv64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-riscv64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-riscv64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-riscv64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-s390x",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-s390x.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-s390x.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.linux-s390x.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.netbsd-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-amd64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-arm64",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.openbsd-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-amd64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-amd64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-amd64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-amd64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-arm64.exe",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-arm64.provenance.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-arm64.sbom.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/buildx-v0.32.1.windows-arm64.sigstore.json",
|
||||
"https://github.com/docker/buildx/releases/download/v0.32.1/checksums.txt"
|
||||
]
|
||||
},
|
||||
"v0.32.0-rc2": {
|
||||
|
||||
18
.github/docker-releases.json
vendored
18
.github/docker-releases.json
vendored
@@ -1,14 +1,20 @@
|
||||
{
|
||||
"latest": {
|
||||
"id": 282275652,
|
||||
"tag_name": "docker-v29.2.1",
|
||||
"html_url": "https://github.com/moby/moby/releases/tag/docker-v29.2.1",
|
||||
"id": 293527283,
|
||||
"tag_name": "docker-v29.3.0",
|
||||
"html_url": "https://github.com/moby/moby/releases/tag/docker-v29.3.0",
|
||||
"assets": []
|
||||
},
|
||||
"v29.3.0": {
|
||||
"id": 293527283,
|
||||
"tag_name": "docker-v29.3.0",
|
||||
"html_url": "https://github.com/moby/moby/releases/tag/docker-v29.3.0",
|
||||
"assets": []
|
||||
},
|
||||
"edge": {
|
||||
"id": 291481223,
|
||||
"tag_name": "docker-v29.3.0-rc.1",
|
||||
"html_url": "https://github.com/moby/moby/releases/tag/docker-v29.3.0-rc.1",
|
||||
"id": 293527283,
|
||||
"tag_name": "docker-v29.3.0",
|
||||
"html_url": "https://github.com/moby/moby/releases/tag/docker-v29.3.0",
|
||||
"assets": []
|
||||
},
|
||||
"v29.3.0-rc.1": {
|
||||
|
||||
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -24,7 +24,7 @@ jobs:
|
||||
steps:
|
||||
-
|
||||
name: Build
|
||||
uses: docker/bake-action@v6
|
||||
uses: docker/bake-action@v7
|
||||
with:
|
||||
targets: build
|
||||
env:
|
||||
|
||||
10
.github/workflows/test.yml
vendored
10
.github/workflows/test.yml
vendored
@@ -15,8 +15,8 @@ on:
|
||||
|
||||
env:
|
||||
NODE_VERSION: "24"
|
||||
BUILDX_VERSION: "v0.32.0-rc2"
|
||||
BUILDKIT_IMAGE: "moby/buildkit:v0.28.0-rc2"
|
||||
BUILDX_VERSION: "v0.32.1"
|
||||
BUILDKIT_IMAGE: "moby/buildkit:v0.28.0"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
@@ -36,7 +36,7 @@ jobs:
|
||||
uses: actions/checkout@v6
|
||||
-
|
||||
name: Test
|
||||
uses: docker/bake-action@v6
|
||||
uses: docker/bake-action@v7
|
||||
with:
|
||||
source: .
|
||||
targets: test-coverage
|
||||
@@ -179,7 +179,7 @@ jobs:
|
||||
-
|
||||
name: Set up Docker Buildx
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@v4
|
||||
with:
|
||||
version: ${{ env.BUILDX_VERSION }}
|
||||
driver: docker
|
||||
@@ -187,7 +187,7 @@ jobs:
|
||||
name: Set up container builder
|
||||
if: startsWith(matrix.os, 'ubuntu')
|
||||
id: builder
|
||||
uses: docker/setup-buildx-action@v3
|
||||
uses: docker/setup-buildx-action@v4
|
||||
with:
|
||||
version: ${{ env.BUILDX_VERSION }}
|
||||
driver-opts: image=${{ env.BUILDKIT_IMAGE }}
|
||||
|
||||
10
.github/workflows/validate.yml
vendored
10
.github/workflows/validate.yml
vendored
@@ -17,15 +17,15 @@ jobs:
|
||||
prepare:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
targets: ${{ steps.generate.outputs.targets }}
|
||||
matrix: ${{ steps.generate.outputs.matrix }}
|
||||
steps:
|
||||
-
|
||||
name: Checkout
|
||||
uses: actions/checkout@v6
|
||||
-
|
||||
name: List targets
|
||||
name: Generate matrix
|
||||
id: generate
|
||||
uses: docker/bake-action/subaction/list-targets@v6
|
||||
uses: docker/bake-action/subaction/matrix@v7
|
||||
with:
|
||||
target: validate
|
||||
|
||||
@@ -36,10 +36,10 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
target: ${{ fromJson(needs.prepare.outputs.targets) }}
|
||||
include: ${{ fromJson(needs.prepare.outputs.matrix) }}
|
||||
steps:
|
||||
-
|
||||
name: Validate
|
||||
uses: docker/bake-action@v6
|
||||
uses: docker/bake-action@v7
|
||||
with:
|
||||
targets: ${{ matrix.target }}
|
||||
|
||||
@@ -22,6 +22,9 @@ import * as rimraf from 'rimraf';
|
||||
|
||||
import {Context} from '../../src/context.js';
|
||||
import {Build} from '../../src/buildx/build.js';
|
||||
import {Buildx} from '../../src/buildx/buildx.js';
|
||||
|
||||
import {GitContextFormat} from '../../src/types/buildx/build.js';
|
||||
|
||||
const fixturesDir = path.join(__dirname, '..', '.fixtures');
|
||||
const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'buildx-build-'));
|
||||
@@ -41,6 +44,66 @@ afterEach(() => {
|
||||
rimraf.sync(tmpDir);
|
||||
});
|
||||
|
||||
describe('gitContext', () => {
|
||||
const originalEnv = process.env;
|
||||
beforeEach(() => {
|
||||
vi.resetModules();
|
||||
process.env = {
|
||||
...originalEnv,
|
||||
DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF: '',
|
||||
BUILDX_SEND_GIT_QUERY_AS_INPUT: ''
|
||||
};
|
||||
});
|
||||
afterEach(() => {
|
||||
process.env = originalEnv;
|
||||
});
|
||||
|
||||
type GitContextTestCase = {
|
||||
ref: string;
|
||||
format: GitContextFormat | undefined;
|
||||
prHeadRef: boolean;
|
||||
sendGitQueryAsInput: boolean;
|
||||
buildxQuerySupport: boolean;
|
||||
};
|
||||
|
||||
// prettier-ignore
|
||||
const gitContextCases: [GitContextTestCase, string][] = [
|
||||
// no format set (defaults to fragment)
|
||||
[{ref: 'refs/heads/master', format: undefined, prHeadRef: false, sendGitQueryAsInput: false, buildxQuerySupport: true}, 'https://github.com/docker/actions-toolkit.git#860c1904a1ce19322e91ac35af1ab07466440c37'],
|
||||
[{ref: 'master', format: undefined, prHeadRef: false, sendGitQueryAsInput: false, buildxQuerySupport: true}, 'https://github.com/docker/actions-toolkit.git#860c1904a1ce19322e91ac35af1ab07466440c37'],
|
||||
[{ref: 'refs/pull/15/merge', format: undefined, prHeadRef: false, sendGitQueryAsInput: false, buildxQuerySupport: true}, 'https://github.com/docker/actions-toolkit.git#refs/pull/15/merge'],
|
||||
[{ref: 'refs/tags/v1.0.0', format: undefined, prHeadRef: false, sendGitQueryAsInput: false, buildxQuerySupport: true}, 'https://github.com/docker/actions-toolkit.git#860c1904a1ce19322e91ac35af1ab07466440c37'],
|
||||
[{ref: 'refs/pull/15/merge', format: undefined, prHeadRef: true, sendGitQueryAsInput: false, buildxQuerySupport: true}, 'https://github.com/docker/actions-toolkit.git#refs/pull/15/head'],
|
||||
// no format set (defaults to query only when client-side query resolution is enabled and supported)
|
||||
[{ref: 'refs/heads/master', format: undefined, prHeadRef: false, sendGitQueryAsInput: true, buildxQuerySupport: true}, 'https://github.com/docker/actions-toolkit.git?ref=refs/heads/master&checksum=860c1904a1ce19322e91ac35af1ab07466440c37'],
|
||||
[{ref: 'refs/pull/15/merge', format: undefined, prHeadRef: false, sendGitQueryAsInput: true, buildxQuerySupport: true}, 'https://github.com/docker/actions-toolkit.git?ref=refs/pull/15/merge&checksum=860c1904a1ce19322e91ac35af1ab07466440c37'],
|
||||
[{ref: 'refs/pull/15/merge', format: undefined, prHeadRef: true, sendGitQueryAsInput: true, buildxQuerySupport: true}, 'https://github.com/docker/actions-toolkit.git?ref=refs/pull/15/head&checksum=860c1904a1ce19322e91ac35af1ab07466440c37'],
|
||||
[{ref: 'refs/heads/master', format: undefined, prHeadRef: false, sendGitQueryAsInput: true, buildxQuerySupport: false}, 'https://github.com/docker/actions-toolkit.git#860c1904a1ce19322e91ac35af1ab07466440c37'],
|
||||
// query format
|
||||
[{ref: 'refs/heads/master', format: 'query', prHeadRef: false, sendGitQueryAsInput: false, buildxQuerySupport: true}, 'https://github.com/docker/actions-toolkit.git?ref=refs/heads/master&checksum=860c1904a1ce19322e91ac35af1ab07466440c37'],
|
||||
[{ref: 'master', format: 'query', prHeadRef: false, sendGitQueryAsInput: false, buildxQuerySupport: true}, 'https://github.com/docker/actions-toolkit.git?ref=refs/heads/master&checksum=860c1904a1ce19322e91ac35af1ab07466440c37'],
|
||||
[{ref: 'refs/pull/15/merge', format: 'query', prHeadRef: false, sendGitQueryAsInput: false, buildxQuerySupport: true}, 'https://github.com/docker/actions-toolkit.git?ref=refs/pull/15/merge&checksum=860c1904a1ce19322e91ac35af1ab07466440c37'],
|
||||
[{ref: 'refs/tags/v1.0.0', format: 'query', prHeadRef: false, sendGitQueryAsInput: false, buildxQuerySupport: true}, 'https://github.com/docker/actions-toolkit.git?ref=refs/tags/v1.0.0&checksum=860c1904a1ce19322e91ac35af1ab07466440c37'],
|
||||
[{ref: 'refs/pull/15/merge', format: 'query', prHeadRef: true, sendGitQueryAsInput: false, buildxQuerySupport: true}, 'https://github.com/docker/actions-toolkit.git?ref=refs/pull/15/head&checksum=860c1904a1ce19322e91ac35af1ab07466440c37'],
|
||||
// fragment format
|
||||
[{ref: 'refs/heads/master', format: 'fragment', prHeadRef: false, sendGitQueryAsInput: false, buildxQuerySupport: true}, 'https://github.com/docker/actions-toolkit.git#860c1904a1ce19322e91ac35af1ab07466440c37'],
|
||||
[{ref: 'master', format: 'fragment', prHeadRef: false, sendGitQueryAsInput: false, buildxQuerySupport: true}, 'https://github.com/docker/actions-toolkit.git#860c1904a1ce19322e91ac35af1ab07466440c37'],
|
||||
[{ref: 'refs/pull/15/merge', format: 'fragment', prHeadRef: false, sendGitQueryAsInput: false, buildxQuerySupport: true}, 'https://github.com/docker/actions-toolkit.git#refs/pull/15/merge'],
|
||||
[{ref: 'refs/tags/v1.0.0', format: 'fragment', prHeadRef: false, sendGitQueryAsInput: false, buildxQuerySupport: true}, 'https://github.com/docker/actions-toolkit.git#860c1904a1ce19322e91ac35af1ab07466440c37'],
|
||||
[{ref: 'refs/pull/15/merge', format: 'fragment', prHeadRef: true, sendGitQueryAsInput: false, buildxQuerySupport: true}, 'https://github.com/docker/actions-toolkit.git#refs/pull/15/head'],
|
||||
];
|
||||
|
||||
test.each(gitContextCases)('given %o should return %o', async (input: GitContextTestCase, expected: string) => {
|
||||
const {ref, format, prHeadRef, sendGitQueryAsInput, buildxQuerySupport} = input;
|
||||
process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF = prHeadRef ? 'true' : '';
|
||||
process.env.BUILDX_SEND_GIT_QUERY_AS_INPUT = sendGitQueryAsInput ? 'true' : '';
|
||||
const buildx = new Buildx();
|
||||
vi.spyOn(buildx, 'versionSatisfies').mockResolvedValue(buildxQuerySupport);
|
||||
const build = new Build({buildx});
|
||||
expect(await build.gitContext(ref, '860c1904a1ce19322e91ac35af1ab07466440c37', format)).toEqual(expected);
|
||||
});
|
||||
});
|
||||
|
||||
describe('resolveImageID', () => {
|
||||
it('matches', async () => {
|
||||
const imageID = 'sha256:bfb45ab72e46908183546477a08f8867fc40cebadd00af54b071b097aed127a9';
|
||||
|
||||
@@ -30,12 +30,12 @@ const maybe = !process.env.GITHUB_ACTIONS || (process.env.GITHUB_ACTIONS === 'tr
|
||||
|
||||
maybe('inspectImage', () => {
|
||||
it('inspect single platform', async () => {
|
||||
const image = await new ImageTools().inspectImage('moby/buildkit:latest@sha256:5769c54b98840147b74128f38fb0b0a049e24b11a75bd81664131edd2854593f');
|
||||
const image = await new ImageTools().inspectImage({name: '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 image = await new ImageTools().inspectImage({name: '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);
|
||||
});
|
||||
@@ -43,12 +43,12 @@ maybe('inspectImage', () => {
|
||||
|
||||
maybe('inspectManifest', () => {
|
||||
it('inspect descriptor', async () => {
|
||||
const manifest = await new ImageTools().inspectManifest('moby/buildkit:latest@sha256:dccc69dd895968c4f21aa9e43e715f25f0cedfce4b17f1014c88c307928e22fc');
|
||||
const manifest = await new ImageTools().inspectManifest({name: 'moby/buildkit:latest@sha256:dccc69dd895968c4f21aa9e43e715f25f0cedfce4b17f1014c88c307928e22fc'});
|
||||
const expectedManifest = <Descriptor>JSON.parse(fs.readFileSync(path.join(fixturesDir, 'imagetools-03.json'), {encoding: 'utf-8'}).trim());
|
||||
expect(manifest).toEqual(expectedManifest);
|
||||
});
|
||||
it('inspect index', async () => {
|
||||
const manifest = await new ImageTools().inspectManifest('moby/buildkit:latest@sha256:79cc6476ab1a3371c9afd8b44e7c55610057c43e18d9b39b68e2b0c2475cc1b6');
|
||||
const manifest = await new ImageTools().inspectManifest({name: 'moby/buildkit:latest@sha256:79cc6476ab1a3371c9afd8b44e7c55610057c43e18d9b39b68e2b0c2475cc1b6'});
|
||||
const expectedManifest = <ImageToolsManifest>JSON.parse(fs.readFileSync(path.join(fixturesDir, 'imagetools-04.json'), {encoding: 'utf-8'}).trim());
|
||||
expect(manifest).toEqual(expectedManifest);
|
||||
});
|
||||
@@ -56,17 +56,17 @@ maybe('inspectManifest', () => {
|
||||
|
||||
maybe('attestationDescriptors', () => {
|
||||
it('returns buildkit attestations descriptors', async () => {
|
||||
const attestations = await new ImageTools().attestationDescriptors('moby/buildkit:latest@sha256:79cc6476ab1a3371c9afd8b44e7c55610057c43e18d9b39b68e2b0c2475cc1b6');
|
||||
const attestations = await new ImageTools().attestationDescriptors({name: 'moby/buildkit:latest@sha256:79cc6476ab1a3371c9afd8b44e7c55610057c43e18d9b39b68e2b0c2475cc1b6'});
|
||||
const expectedAttestations = <Array<Descriptor>>JSON.parse(fs.readFileSync(path.join(fixturesDir, 'imagetools-05.json'), {encoding: 'utf-8'}).trim());
|
||||
expect(attestations).toEqual(expectedAttestations);
|
||||
});
|
||||
it('returns buildkit attestations descriptors for linux/amd64', async () => {
|
||||
const attestations = await new ImageTools().attestationDescriptors('moby/buildkit:latest@sha256:79cc6476ab1a3371c9afd8b44e7c55610057c43e18d9b39b68e2b0c2475cc1b6', {os: 'linux', architecture: 'amd64'});
|
||||
const attestations = await new ImageTools().attestationDescriptors({name: 'moby/buildkit:latest@sha256:79cc6476ab1a3371c9afd8b44e7c55610057c43e18d9b39b68e2b0c2475cc1b6', platform: {os: 'linux', architecture: 'amd64'}});
|
||||
const expectedAttestations = <Array<Descriptor>>JSON.parse(fs.readFileSync(path.join(fixturesDir, 'imagetools-06.json'), {encoding: 'utf-8'}).trim());
|
||||
expect(attestations).toEqual(expectedAttestations);
|
||||
});
|
||||
it('returns buildkit attestations descriptors for linux/arm/v7', async () => {
|
||||
const attestations = await new ImageTools().attestationDescriptors('moby/buildkit:latest@sha256:79cc6476ab1a3371c9afd8b44e7c55610057c43e18d9b39b68e2b0c2475cc1b6', {os: 'linux', architecture: 'arm', variant: 'v7'});
|
||||
const attestations = await new ImageTools().attestationDescriptors({name: 'moby/buildkit:latest@sha256:79cc6476ab1a3371c9afd8b44e7c55610057c43e18d9b39b68e2b0c2475cc1b6', platform: {os: 'linux', architecture: 'arm', variant: 'v7'}});
|
||||
const expectedAttestations = <Array<Descriptor>>JSON.parse(fs.readFileSync(path.join(fixturesDir, 'imagetools-07.json'), {encoding: 'utf-8'}).trim());
|
||||
expect(attestations).toEqual(expectedAttestations);
|
||||
});
|
||||
@@ -74,7 +74,7 @@ maybe('attestationDescriptors', () => {
|
||||
|
||||
maybe('attestationDigests', () => {
|
||||
it('returns buildkit attestations digests', async () => {
|
||||
const digests = await new ImageTools().attestationDigests('moby/buildkit:latest@sha256:79cc6476ab1a3371c9afd8b44e7c55610057c43e18d9b39b68e2b0c2475cc1b6');
|
||||
const digests = await new ImageTools().attestationDigests({name: 'moby/buildkit:latest@sha256:79cc6476ab1a3371c9afd8b44e7c55610057c43e18d9b39b68e2b0c2475cc1b6'});
|
||||
// prettier-ignore
|
||||
expect(digests).toEqual([
|
||||
'sha256:2ba4ad6eae1efcafee73a971953093c7c32b6938f2f9fd4998c8bf4d0fbe76f2',
|
||||
@@ -86,11 +86,22 @@ maybe('attestationDigests', () => {
|
||||
]);
|
||||
});
|
||||
it('returns buildkit attestations digests for linux/amd64', async () => {
|
||||
const digests = await new ImageTools().attestationDigests('moby/buildkit:latest@sha256:79cc6476ab1a3371c9afd8b44e7c55610057c43e18d9b39b68e2b0c2475cc1b6', {os: 'linux', architecture: 'amd64'});
|
||||
const digests = await new ImageTools().attestationDigests({name: 'moby/buildkit:latest@sha256:79cc6476ab1a3371c9afd8b44e7c55610057c43e18d9b39b68e2b0c2475cc1b6', platform: {os: 'linux', architecture: 'amd64'}});
|
||||
expect(digests).toEqual(['sha256:2ba4ad6eae1efcafee73a971953093c7c32b6938f2f9fd4998c8bf4d0fbe76f2']);
|
||||
});
|
||||
it('returns buildkit attestations digests for linux/arm/v7', async () => {
|
||||
const digests = await new ImageTools().attestationDigests('moby/buildkit:latest@sha256:79cc6476ab1a3371c9afd8b44e7c55610057c43e18d9b39b68e2b0c2475cc1b6', {os: 'linux', architecture: 'arm', variant: 'v7'});
|
||||
const digests = await new ImageTools().attestationDigests({name: 'moby/buildkit:latest@sha256:79cc6476ab1a3371c9afd8b44e7c55610057c43e18d9b39b68e2b0c2475cc1b6', platform: {os: 'linux', architecture: 'arm', variant: 'v7'}});
|
||||
expect(digests).toEqual(['sha256:0709528fae1747ce17638ad2978ee7936b38a294136eaadaf692e415f64b1e03']);
|
||||
});
|
||||
});
|
||||
|
||||
maybe('create', () => {
|
||||
it('skips create command execution when skipExec is set', async () => {
|
||||
const result = await new ImageTools().create({
|
||||
sources: ['sha256:0709528fae1747ce17638ad2978ee7936b38a294136eaadaf692e415f64b1e03'],
|
||||
tags: ['docker.io/user/app', 'docker.io/user/app2'],
|
||||
skipExec: true
|
||||
});
|
||||
expect(result).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
301
__tests__/buildx/imagetools.test.ts
Normal file
301
__tests__/buildx/imagetools.test.ts
Normal file
@@ -0,0 +1,301 @@
|
||||
/**
|
||||
* Copyright 2026 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 {afterEach, beforeEach, describe, expect, it, vi} from 'vitest';
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
import * as rimraf from 'rimraf';
|
||||
|
||||
import {Buildx} from '../../src/buildx/buildx.js';
|
||||
import {ImageTools} from '../../src/buildx/imagetools.js';
|
||||
import {Context} from '../../src/context.js';
|
||||
import {Exec} from '../../src/exec.js';
|
||||
|
||||
const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'buildx-imagetools-'));
|
||||
const metadataFile = path.join(tmpDir, 'imagetools-metadata.json');
|
||||
|
||||
vi.spyOn(Context, 'tmpDir').mockImplementation((): string => {
|
||||
fs.mkdirSync(tmpDir, {recursive: true});
|
||||
return tmpDir;
|
||||
});
|
||||
|
||||
vi.spyOn(Context, 'tmpName').mockImplementation((): string => {
|
||||
return metadataFile;
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
vi.useRealTimers();
|
||||
vi.clearAllMocks();
|
||||
rimraf.sync(tmpDir);
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
vi.useRealTimers();
|
||||
fs.mkdirSync(tmpDir, {recursive: true});
|
||||
});
|
||||
|
||||
describe('inspectManifest', () => {
|
||||
it('retries transient manifest unknown errors when requested', async () => {
|
||||
vi.useFakeTimers();
|
||||
|
||||
const getCommand = vi.fn().mockResolvedValue({
|
||||
command: 'docker',
|
||||
args: ['buildx', 'imagetools', 'inspect']
|
||||
});
|
||||
const buildx = {getCommand} as unknown as Buildx;
|
||||
const execSpy = vi
|
||||
.spyOn(Exec, 'getExecOutput')
|
||||
.mockResolvedValueOnce({
|
||||
exitCode: 1,
|
||||
stdout: '',
|
||||
stderr: 'ERROR: MANIFEST_UNKNOWN: manifest unknown'
|
||||
})
|
||||
.mockResolvedValueOnce({
|
||||
exitCode: 0,
|
||||
stdout: JSON.stringify({
|
||||
schemaVersion: 2,
|
||||
mediaType: 'application/vnd.oci.image.index.v1+json',
|
||||
manifests: []
|
||||
}),
|
||||
stderr: ''
|
||||
});
|
||||
|
||||
const inspectPromise = new ImageTools({buildx}).inspectManifest({
|
||||
name: 'docker.io/library/alpine:latest',
|
||||
retryOnManifestUnknown: true,
|
||||
retryLimit: 2
|
||||
});
|
||||
|
||||
await vi.runAllTimersAsync();
|
||||
|
||||
expect(await inspectPromise).toEqual({
|
||||
schemaVersion: 2,
|
||||
mediaType: 'application/vnd.oci.image.index.v1+json',
|
||||
manifests: []
|
||||
});
|
||||
expect(getCommand).toHaveBeenCalledWith(['imagetools', 'inspect', 'docker.io/library/alpine:latest', '--format', '{{json .Manifest}}']);
|
||||
expect(execSpy).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
|
||||
it('does not retry non-manifest errors', async () => {
|
||||
const getCommand = vi.fn().mockResolvedValue({
|
||||
command: 'docker',
|
||||
args: ['buildx', 'imagetools', 'inspect']
|
||||
});
|
||||
const buildx = {getCommand} as unknown as Buildx;
|
||||
const execSpy = vi.spyOn(Exec, 'getExecOutput').mockResolvedValue({
|
||||
exitCode: 1,
|
||||
stdout: '',
|
||||
stderr: 'ERROR: unauthorized'
|
||||
});
|
||||
|
||||
const result = await new ImageTools({buildx})
|
||||
.inspectManifest({
|
||||
name: 'docker.io/library/alpine:latest',
|
||||
retryOnManifestUnknown: true
|
||||
})
|
||||
.then(
|
||||
value => ({value, error: undefined}),
|
||||
error => ({value: undefined, error: error as Error})
|
||||
);
|
||||
|
||||
expect(result.value).toBeUndefined();
|
||||
expect(result.error).toBeInstanceOf(Error);
|
||||
expect(result.error?.message).toContain('ERROR: unauthorized');
|
||||
|
||||
expect(execSpy).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('inspectImage', () => {
|
||||
it('retries transient manifest unknown errors when requested', async () => {
|
||||
vi.useFakeTimers();
|
||||
|
||||
const getCommand = vi.fn().mockResolvedValue({
|
||||
command: 'docker',
|
||||
args: ['buildx', 'imagetools', 'inspect']
|
||||
});
|
||||
const buildx = {getCommand} as unknown as Buildx;
|
||||
const execSpy = vi
|
||||
.spyOn(Exec, 'getExecOutput')
|
||||
.mockResolvedValueOnce({
|
||||
exitCode: 1,
|
||||
stdout: '',
|
||||
stderr: 'ERROR: MANIFEST_UNKNOWN: manifest unknown'
|
||||
})
|
||||
.mockResolvedValueOnce({
|
||||
exitCode: 0,
|
||||
stdout: JSON.stringify({
|
||||
config: {
|
||||
digest: 'sha256:test'
|
||||
}
|
||||
}),
|
||||
stderr: ''
|
||||
});
|
||||
|
||||
const inspectPromise = new ImageTools({buildx}).inspectImage({
|
||||
name: 'docker.io/library/alpine:latest',
|
||||
retryOnManifestUnknown: true,
|
||||
retryLimit: 2
|
||||
});
|
||||
|
||||
await vi.runAllTimersAsync();
|
||||
|
||||
expect(await inspectPromise).toEqual({
|
||||
config: {
|
||||
digest: 'sha256:test'
|
||||
}
|
||||
});
|
||||
expect(getCommand).toHaveBeenCalledWith(['imagetools', 'inspect', 'docker.io/library/alpine:latest', '--format', '{{json .Image}}']);
|
||||
expect(execSpy).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
});
|
||||
|
||||
describe('create', () => {
|
||||
it('parses metadata and supports cwd sources', async () => {
|
||||
const getCommand = vi.fn().mockResolvedValue({
|
||||
command: 'docker',
|
||||
args: ['buildx', 'imagetools', 'create']
|
||||
});
|
||||
const buildx = {getCommand} as unknown as Buildx;
|
||||
|
||||
fs.writeFileSync(
|
||||
metadataFile,
|
||||
JSON.stringify({
|
||||
'containerimage.descriptor': {
|
||||
mediaType: 'application/vnd.oci.image.index.v1+json',
|
||||
digest: 'sha256:19ffeab6f8bc9293ac2c3fdf94ebe28396254c993aea0b5a542cfb02e0883fa3',
|
||||
size: 4654
|
||||
},
|
||||
'image.name': 'docker.io/user/app,docker.io/user/app2'
|
||||
})
|
||||
);
|
||||
|
||||
const execSpy = vi.spyOn(Exec, 'getExecOutput').mockResolvedValue({
|
||||
exitCode: 0,
|
||||
stdout: '',
|
||||
stderr: ''
|
||||
});
|
||||
|
||||
const result = await new ImageTools({buildx}).create({
|
||||
sources: ['cwd://descriptor.json', 'docker.io/library/alpine:latest'],
|
||||
tags: ['docker.io/user/app:latest'],
|
||||
silent: true
|
||||
});
|
||||
|
||||
expect(getCommand).toHaveBeenCalledWith(['imagetools', 'create', '--tag', 'docker.io/user/app:latest', '--metadata-file', metadataFile, '--file', 'descriptor.json', 'docker.io/library/alpine:latest']);
|
||||
expect(execSpy).toHaveBeenCalledWith('docker', ['buildx', 'imagetools', 'create'], {
|
||||
ignoreReturnCode: true,
|
||||
silent: true
|
||||
});
|
||||
expect(result).toEqual({
|
||||
digest: 'sha256:19ffeab6f8bc9293ac2c3fdf94ebe28396254c993aea0b5a542cfb02e0883fa3',
|
||||
descriptor: {
|
||||
mediaType: 'application/vnd.oci.image.index.v1+json',
|
||||
digest: 'sha256:19ffeab6f8bc9293ac2c3fdf94ebe28396254c993aea0b5a542cfb02e0883fa3',
|
||||
size: 4654
|
||||
},
|
||||
imageNames: ['docker.io/user/app', 'docker.io/user/app2']
|
||||
});
|
||||
});
|
||||
|
||||
it('does not parse metadata in dry-run mode', async () => {
|
||||
const getCommand = vi.fn().mockResolvedValue({
|
||||
command: 'docker',
|
||||
args: ['buildx', 'imagetools', 'create']
|
||||
});
|
||||
const buildx = {getCommand} as unknown as Buildx;
|
||||
|
||||
const execSpy = vi.spyOn(Exec, 'getExecOutput').mockResolvedValue({
|
||||
exitCode: 0,
|
||||
stdout: '',
|
||||
stderr: ''
|
||||
});
|
||||
|
||||
const result = await new ImageTools({buildx}).create({
|
||||
sources: ['docker.io/library/alpine:latest'],
|
||||
dryRun: true,
|
||||
silent: true
|
||||
});
|
||||
|
||||
expect(getCommand).toHaveBeenCalledWith(['imagetools', 'create', '--dry-run', 'docker.io/library/alpine:latest']);
|
||||
expect(execSpy).toHaveBeenCalledWith('docker', ['buildx', 'imagetools', 'create'], {
|
||||
ignoreReturnCode: true,
|
||||
silent: true
|
||||
});
|
||||
expect(result).toBeUndefined();
|
||||
});
|
||||
|
||||
it('passes annotations to imagetools create', async () => {
|
||||
const getCommand = vi.fn().mockResolvedValue({
|
||||
command: 'docker',
|
||||
args: ['buildx', 'imagetools', 'create']
|
||||
});
|
||||
const buildx = {getCommand} as unknown as Buildx;
|
||||
|
||||
const execSpy = vi.spyOn(Exec, 'getExecOutput').mockResolvedValue({
|
||||
exitCode: 0,
|
||||
stdout: '',
|
||||
stderr: ''
|
||||
});
|
||||
|
||||
const result = await new ImageTools({buildx}).create({
|
||||
sources: ['docker.io/library/alpine:latest'],
|
||||
annotations: ['index:org.opencontainers.image.title=Alpine', 'manifest-descriptor:org.opencontainers.image.description=Base image'],
|
||||
silent: true
|
||||
});
|
||||
|
||||
expect(getCommand).toHaveBeenCalledWith([
|
||||
'imagetools',
|
||||
'create',
|
||||
'--annotation',
|
||||
'index:org.opencontainers.image.title=Alpine',
|
||||
'--annotation',
|
||||
'manifest-descriptor:org.opencontainers.image.description=Base image',
|
||||
'--metadata-file',
|
||||
metadataFile,
|
||||
'docker.io/library/alpine:latest'
|
||||
]);
|
||||
expect(execSpy).toHaveBeenCalledWith('docker', ['buildx', 'imagetools', 'create'], {
|
||||
ignoreReturnCode: true,
|
||||
silent: true
|
||||
});
|
||||
expect(result).toBeUndefined();
|
||||
});
|
||||
|
||||
it('skips command execution when skipExec is enabled', async () => {
|
||||
const getCommand = vi.fn().mockResolvedValue({
|
||||
command: 'docker',
|
||||
args: ['buildx', 'imagetools', 'create']
|
||||
});
|
||||
const buildx = {getCommand} as unknown as Buildx;
|
||||
const execSpy = vi.spyOn(Exec, 'getExecOutput').mockResolvedValue({
|
||||
exitCode: 0,
|
||||
stdout: '',
|
||||
stderr: ''
|
||||
});
|
||||
|
||||
const result = await new ImageTools({buildx}).create({
|
||||
sources: ['docker.io/library/alpine:latest'],
|
||||
skipExec: true
|
||||
});
|
||||
|
||||
expect(getCommand).toHaveBeenCalledWith(['imagetools', 'create', '--metadata-file', metadataFile, 'docker.io/library/alpine:latest']);
|
||||
expect(execSpy).not.toHaveBeenCalled();
|
||||
expect(result).toBeUndefined();
|
||||
});
|
||||
});
|
||||
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {describe, expect, vi, it, afterEach, beforeEach, test} from 'vitest';
|
||||
import {describe, expect, it, afterEach} from 'vitest';
|
||||
import fs from 'fs';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
@@ -23,57 +23,35 @@ import * as rimraf from 'rimraf';
|
||||
import {Context} from '../src/context.js';
|
||||
|
||||
const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'context-'));
|
||||
const tmpName = path.join(tmpDir, '.tmpname-vi');
|
||||
|
||||
vi.spyOn(Context, 'tmpDir').mockImplementation((): string => {
|
||||
fs.mkdirSync(tmpDir, {recursive: true});
|
||||
return tmpDir;
|
||||
});
|
||||
|
||||
vi.spyOn(Context, 'tmpName').mockImplementation((): string => {
|
||||
return tmpName;
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
rimraf.sync(tmpDir);
|
||||
fs.mkdirSync(tmpDir, {recursive: true});
|
||||
});
|
||||
|
||||
describe('gitRef', () => {
|
||||
it('returns refs/heads/master', async () => {
|
||||
expect(Context.gitRef()).toEqual('refs/heads/master');
|
||||
describe('tmpDir', () => {
|
||||
it('returns an existing directory and keeps it stable', () => {
|
||||
const dir = Context.tmpDir();
|
||||
expect(fs.existsSync(dir)).toBe(true);
|
||||
expect(fs.statSync(dir).isDirectory()).toBe(true);
|
||||
expect(Context.tmpDir()).toEqual(dir);
|
||||
});
|
||||
});
|
||||
|
||||
describe('parseGitRef', () => {
|
||||
const originalEnv = process.env;
|
||||
beforeEach(() => {
|
||||
vi.resetModules();
|
||||
process.env = {
|
||||
...originalEnv,
|
||||
DOCKER_GIT_CONTEXT_PR_HEAD_REF: ''
|
||||
};
|
||||
describe('tmpName', () => {
|
||||
it('returns a path for the provided tmpdir and template', () => {
|
||||
const name = Context.tmpName({
|
||||
tmpdir: tmpDir,
|
||||
template: '.tmpname-XXXXXX'
|
||||
});
|
||||
expect(path.dirname(name)).toEqual(tmpDir);
|
||||
expect(path.basename(name)).toMatch(/^\.tmpname-/);
|
||||
expect(fs.existsSync(name)).toBe(false);
|
||||
});
|
||||
afterEach(() => {
|
||||
process.env = originalEnv;
|
||||
});
|
||||
// prettier-ignore
|
||||
test.each([
|
||||
['refs/heads/master', '860c1904a1ce19322e91ac35af1ab07466440c37', false, '860c1904a1ce19322e91ac35af1ab07466440c37'],
|
||||
['master', '860c1904a1ce19322e91ac35af1ab07466440c37', false, '860c1904a1ce19322e91ac35af1ab07466440c37'],
|
||||
['refs/pull/15/merge', '860c1904a1ce19322e91ac35af1ab07466440c37', false, 'refs/pull/15/merge'],
|
||||
['refs/heads/master', '', false, 'refs/heads/master'],
|
||||
['master', '', false, 'master'],
|
||||
['refs/tags/v1.0.0', '', false, 'refs/tags/v1.0.0'],
|
||||
['refs/pull/15/merge', '', false, 'refs/pull/15/merge'],
|
||||
['refs/pull/15/merge', '', true, 'refs/pull/15/head'],
|
||||
])('given %o and %o, should return %o', async (ref: string, sha: string, prHeadRef: boolean, expected: string) => {
|
||||
process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF = prHeadRef ? 'true' : '';
|
||||
expect(Context.parseGitRef(ref, sha)).toEqual(expected);
|
||||
});
|
||||
});
|
||||
|
||||
describe('gitContext', () => {
|
||||
it('returns refs/heads/master', async () => {
|
||||
expect(Context.gitContext()).toEqual('https://github.com/docker/actions-toolkit.git#refs/heads/master');
|
||||
it('returns different paths on consecutive calls', () => {
|
||||
const first = Context.tmpName({tmpdir: tmpDir, template: '.tmpname-XXXXXX'});
|
||||
const second = Context.tmpName({tmpdir: tmpDir, template: '.tmpname-XXXXXX'});
|
||||
expect(first).not.toEqual(second);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -87,6 +87,12 @@ describe('getInputList', () => {
|
||||
expect(res).toEqual(['foo=bar', 'bar=qux']);
|
||||
});
|
||||
|
||||
it('multiline with comment and no infix comment', async () => {
|
||||
setInput('labels', '# ignore this\nfoo=bar\nbar=qux#baz');
|
||||
const res = Util.getInputList('labels', {comment: '#', commentNoInfix: true});
|
||||
expect(res).toEqual(['foo=bar', 'bar=qux#baz']);
|
||||
});
|
||||
|
||||
it('different new lines and ignoring comma correctly', async () => {
|
||||
setInput('cache-from', 'user/app:cache\r\ntype=local,src=path/to/dir');
|
||||
const res = Util.getInputList('cache-from', {ignoreComma: true});
|
||||
@@ -309,6 +315,7 @@ describe('hash', () => {
|
||||
// https://github.com/golang/go/blob/f6b93a4c358b28b350dd8fe1780c1f78e520c09c/src/strconv/atob_test.go#L36-L58
|
||||
describe('parseBool', () => {
|
||||
[
|
||||
{input: undefined, expected: false, throwsError: false},
|
||||
{input: '', expected: false, throwsError: true},
|
||||
{input: 'asdf', expected: false, throwsError: true},
|
||||
{input: '0', expected: false, throwsError: false},
|
||||
@@ -336,6 +343,13 @@ describe('parseBool', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('parseBoolOrDefault', () => {
|
||||
it('returns default value when input is invalid', () => {
|
||||
expect(Util.parseBoolOrDefault('asdf')).toBe(false);
|
||||
expect(Util.parseBoolOrDefault('asdf', true)).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
describe('formatFileSize', () => {
|
||||
test('should return "0 Bytes" when given 0 bytes', () => {
|
||||
expect(Util.formatFileSize(0)).toBe('0 Bytes');
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
ARG NODE_VERSION=24
|
||||
ARG DOCKER_VERSION=29.2
|
||||
ARG BUILDX_VERSION=0.32.0-rc2
|
||||
ARG BUILDX_VERSION=0.32.1
|
||||
ARG COMPOSE_VERSION=2.39.1
|
||||
ARG UNDOCK_VERSION=0.10.0
|
||||
ARG REGCTL_VERSION=v0.8.2
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
"registry": "https://registry.npmjs.org/"
|
||||
},
|
||||
"dependencies": {
|
||||
"@actions/artifact": "^6.2.0",
|
||||
"@actions/artifact": "^6.2.1",
|
||||
"@actions/cache": "^6.0.0",
|
||||
"@actions/core": "^3.0.0",
|
||||
"@actions/exec": "^3.0.0",
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import * as core from '@actions/core';
|
||||
import * as github from '@actions/github';
|
||||
import {parse} from 'csv-parse/sync';
|
||||
|
||||
import {Buildx} from './buildx.js';
|
||||
@@ -24,7 +25,7 @@ import {Context} from '../context.js';
|
||||
import {GitHub} from '../github/github.js';
|
||||
import {Util} from '../util.js';
|
||||
|
||||
import {BuildMetadata} from '../types/buildx/build.js';
|
||||
import {BuildMetadata, GitContextFormat} from '../types/buildx/build.js';
|
||||
import {VertexWarning} from '../types/buildkit/client.js';
|
||||
import {ProvenancePredicate} from '../types/intoto/slsa_provenance/v0.2/provenance.js';
|
||||
|
||||
@@ -48,6 +49,33 @@ export class Build {
|
||||
this.metadataFilename = `build-metadata-${Util.generateRandomString()}.json`;
|
||||
}
|
||||
|
||||
public async gitContext(ref?: string, sha?: string, format?: GitContextFormat): Promise<string> {
|
||||
const setPullRequestHeadRef = Util.parseBoolOrDefault(process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF);
|
||||
ref = ref || github.context.ref;
|
||||
sha = sha || github.context.sha;
|
||||
if (!ref.startsWith('refs/')) {
|
||||
ref = `refs/heads/${ref}`;
|
||||
} else if (ref.startsWith(`refs/pull/`) && setPullRequestHeadRef) {
|
||||
ref = ref.replace(/\/merge$/g, '/head');
|
||||
}
|
||||
const baseURL = `${GitHub.serverURL}/${github.context.repo.owner}/${github.context.repo.repo}.git`;
|
||||
if (!format) {
|
||||
const sendGitQueryAsInput = Util.parseBoolOrDefault(process.env.BUILDX_SEND_GIT_QUERY_AS_INPUT);
|
||||
if (sendGitQueryAsInput && (await this.buildx.versionSatisfies('>=0.29.0'))) {
|
||||
format = 'query';
|
||||
} else {
|
||||
format = 'fragment';
|
||||
}
|
||||
}
|
||||
if (format === 'query') {
|
||||
return `${baseURL}?ref=${ref}${sha ? `&checksum=${sha}` : ''}`;
|
||||
}
|
||||
if (sha && !ref.startsWith(`refs/pull/`)) {
|
||||
return `${baseURL}#${sha}`;
|
||||
}
|
||||
return `${baseURL}#${ref}`;
|
||||
}
|
||||
|
||||
public getImageIDFilePath(): string {
|
||||
return path.join(Context.tmpDir(), this.iidFilename);
|
||||
}
|
||||
|
||||
@@ -70,6 +70,10 @@ export class History {
|
||||
}
|
||||
|
||||
public async export(opts: ExportOpts): Promise<ExportResponse> {
|
||||
if (!(await this.buildx.versionSatisfies('>=0.23.0'))) {
|
||||
throw new Error('Buildx >= 0.23.0 is required to export a build record');
|
||||
}
|
||||
|
||||
let builderName: string = '';
|
||||
let nodeName: string = '';
|
||||
const refs: Array<string> = [];
|
||||
|
||||
@@ -14,12 +14,16 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import fs from 'fs';
|
||||
import * as core from '@actions/core';
|
||||
|
||||
import {Buildx} from './buildx.js';
|
||||
import {Context} from '../context.js';
|
||||
import {Exec} from '../exec.js';
|
||||
|
||||
import {Manifest as ImageToolsManifest} from '../types/buildx/imagetools.js';
|
||||
import {AttestationInspectOpts, CreateOpts, CreateResponse, CreateResult, InspectOpts, Manifest as ImageToolsManifest} from '../types/buildx/imagetools.js';
|
||||
import {Image} from '../types/oci/config.js';
|
||||
import {Descriptor, Platform} from '../types/oci/descriptor.js';
|
||||
import {Descriptor} from '../types/oci/descriptor.js';
|
||||
import {Digest} from '../types/oci/digest.js';
|
||||
|
||||
export interface ImageToolsOpts {
|
||||
@@ -41,16 +45,12 @@ export class ImageTools {
|
||||
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);
|
||||
public async getCreateCommand(args: Array<string>) {
|
||||
return await this.getCommand(['create', ...args]);
|
||||
}
|
||||
|
||||
public async inspectImage(opts: InspectOpts): Promise<Record<string, Image> | Image> {
|
||||
return await this.inspect(opts, '{{json .Image}}', parsedOutput => {
|
||||
if (typeof parsedOutput === 'object' && !Array.isArray(parsedOutput) && parsedOutput !== null) {
|
||||
if (Object.prototype.hasOwnProperty.call(parsedOutput, 'config')) {
|
||||
return <Image>parsedOutput;
|
||||
@@ -62,16 +62,8 @@ export class ImageTools {
|
||||
});
|
||||
}
|
||||
|
||||
public async inspectManifest(name: string): Promise<ImageToolsManifest | Descriptor> {
|
||||
const cmd = await this.getInspectCommand([name, '--format', '{{json .Manifest}}']);
|
||||
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);
|
||||
public async inspectManifest(opts: InspectOpts): Promise<ImageToolsManifest | Descriptor> {
|
||||
return await this.inspect(opts, '{{json .Manifest}}', parsedOutput => {
|
||||
if (typeof parsedOutput === 'object' && !Array.isArray(parsedOutput) && parsedOutput !== null) {
|
||||
if (Object.prototype.hasOwnProperty.call(parsedOutput, 'manifests')) {
|
||||
return <ImageToolsManifest>parsedOutput;
|
||||
@@ -83,17 +75,18 @@ export class ImageTools {
|
||||
});
|
||||
}
|
||||
|
||||
public async attestationDescriptors(name: string, platform?: Platform): Promise<Array<Descriptor>> {
|
||||
const manifest = await this.inspectManifest(name);
|
||||
public async attestationDescriptors(opts: AttestationInspectOpts): Promise<Array<Descriptor>> {
|
||||
const manifest = await this.inspectManifest(opts);
|
||||
|
||||
if (typeof manifest !== 'object' || manifest === null || !('manifests' in manifest) || !Array.isArray(manifest.manifests)) {
|
||||
throw new Error(`No descriptor found for ${name}`);
|
||||
throw new Error(`No descriptor found for ${opts.name}`);
|
||||
}
|
||||
|
||||
const attestations = manifest.manifests.filter(m => m.annotations?.['vnd.docker.reference.type'] === 'attestation-manifest');
|
||||
if (!platform) {
|
||||
if (!opts.platform) {
|
||||
return attestations;
|
||||
}
|
||||
const platform = opts.platform;
|
||||
|
||||
const manifestByDigest = new Map<string, Descriptor>();
|
||||
for (const m of manifest.manifests) {
|
||||
@@ -115,7 +108,126 @@ export class ImageTools {
|
||||
});
|
||||
}
|
||||
|
||||
public async attestationDigests(name: string, platform?: Platform): Promise<Array<Digest>> {
|
||||
return (await this.attestationDescriptors(name, platform)).map(attestation => attestation.digest);
|
||||
public async attestationDigests(opts: AttestationInspectOpts): Promise<Array<Digest>> {
|
||||
return (await this.attestationDescriptors(opts)).map(attestation => attestation.digest);
|
||||
}
|
||||
|
||||
public async create(opts: CreateOpts): Promise<CreateResult | undefined> {
|
||||
const args: Array<string> = [];
|
||||
|
||||
const metadataFile = Context.tmpName({tmpdir: Context.tmpDir(), template: 'imagetools-metadata-XXXXXX'});
|
||||
const fileSources: Array<string> = [];
|
||||
const sources: Array<string> = [];
|
||||
for (const source of opts.sources) {
|
||||
if (source.startsWith('cwd://')) {
|
||||
const fileSource = source.substring('cwd://'.length);
|
||||
if (fileSource.length > 0) {
|
||||
fileSources.push(fileSource);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
sources.push(source);
|
||||
}
|
||||
if (opts.tags) {
|
||||
for (const tag of opts.tags) {
|
||||
args.push('--tag', tag);
|
||||
}
|
||||
}
|
||||
if (opts.platforms) {
|
||||
for (const platform of opts.platforms) {
|
||||
args.push('--platform', platform);
|
||||
}
|
||||
}
|
||||
if (opts.annotations) {
|
||||
for (const annotation of opts.annotations) {
|
||||
args.push('--annotation', annotation);
|
||||
}
|
||||
}
|
||||
if (opts.dryRun) {
|
||||
args.push('--dry-run');
|
||||
} else {
|
||||
args.push('--metadata-file', metadataFile);
|
||||
}
|
||||
for (const fileSource of fileSources) {
|
||||
args.push('--file', fileSource);
|
||||
}
|
||||
for (const source of sources) {
|
||||
args.push(source);
|
||||
}
|
||||
|
||||
const cmd = await this.getCreateCommand(args);
|
||||
if (opts.skipExec) {
|
||||
core.info(`[command]${cmd.command} ${cmd.args.join(' ')}`);
|
||||
core.info(`Skipped create command`);
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return await Exec.getExecOutput(cmd.command, cmd.args, {
|
||||
ignoreReturnCode: true,
|
||||
silent: opts.silent
|
||||
}).then(res => {
|
||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||
throw new Error(res.stderr.trim());
|
||||
}
|
||||
if (!opts.dryRun) {
|
||||
if (!fs.existsSync(metadataFile)) {
|
||||
return undefined;
|
||||
}
|
||||
const dt = fs.readFileSync(metadataFile, {encoding: 'utf-8'}).trim();
|
||||
if (dt === '' || dt === 'null') {
|
||||
return undefined;
|
||||
}
|
||||
const response = <CreateResponse>JSON.parse(dt);
|
||||
const descriptor = response['containerimage.descriptor'];
|
||||
if (!descriptor) {
|
||||
return undefined;
|
||||
}
|
||||
return {
|
||||
digest: response['containerimage.digest'] || descriptor.digest,
|
||||
descriptor: descriptor,
|
||||
imageNames: response['image.name'] ? response['image.name'].split(',').map(name => name.trim()) : []
|
||||
};
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private async inspect<T>(opts: InspectOpts, format: string, parser: (parsedOutput: unknown) => T): Promise<T> {
|
||||
const cmd = await this.getInspectCommand([opts.name, '--format', format]);
|
||||
if (!opts.retryOnManifestUnknown) {
|
||||
return await this.execInspect(cmd.command, cmd.args, parser);
|
||||
}
|
||||
|
||||
const retries = opts.retryLimit ?? 15;
|
||||
let lastError: Error | undefined;
|
||||
for (let attempt = 0; attempt < retries; attempt++) {
|
||||
try {
|
||||
return await this.execInspect(cmd.command, cmd.args, parser);
|
||||
} catch (err) {
|
||||
lastError = err as Error;
|
||||
if (!ImageTools.isManifestUnknownError(lastError.message) || attempt === retries - 1) {
|
||||
throw lastError;
|
||||
}
|
||||
core.info(`buildx imagetools inspect command failed with MANIFEST_UNKNOWN, retrying attempt ${attempt + 1}/${retries}...\n${lastError.message}`);
|
||||
await new Promise(res => setTimeout(res, Math.pow(2, attempt) * 100));
|
||||
}
|
||||
}
|
||||
|
||||
throw lastError ?? new Error(`ImageTools inspect command failed for ${opts.name}`);
|
||||
}
|
||||
|
||||
private async execInspect<T>(command: string, args: Array<string>, parser: (parsedOutput: unknown) => T): Promise<T> {
|
||||
return await Exec.getExecOutput(command, args, {
|
||||
ignoreReturnCode: true,
|
||||
silent: true
|
||||
}).then(res => {
|
||||
if (res.stderr.length > 0 && res.exitCode != 0) {
|
||||
throw new Error(res.stderr.trim());
|
||||
}
|
||||
return parser(JSON.parse(res.stdout));
|
||||
});
|
||||
}
|
||||
|
||||
private static isManifestUnknownError(message: string): boolean {
|
||||
return /(MANIFEST_UNKNOWN|manifest unknown|not found: not found)/i.test(message);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,9 +18,6 @@ import fs from 'fs';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
import * as tmp from 'tmp';
|
||||
import * as github from '@actions/github';
|
||||
|
||||
import {GitHub} from './github/github.js';
|
||||
|
||||
export class Context {
|
||||
private static readonly _tmpDir = fs.mkdtempSync(path.join(Context.ensureDirExists(process.env.RUNNER_TEMP || os.tmpdir()), 'docker-actions-toolkit-'));
|
||||
@@ -37,25 +34,4 @@ export class Context {
|
||||
public static tmpName(options?: tmp.TmpNameOptions): string {
|
||||
return tmp.tmpNameSync(options);
|
||||
}
|
||||
|
||||
public static gitRef(): string {
|
||||
return Context.parseGitRef(github.context.ref, github.context.sha);
|
||||
}
|
||||
|
||||
public static parseGitRef(ref: string, sha: string): string {
|
||||
const setPullRequestHeadRef: boolean = !!(process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF && process.env.DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF === 'true');
|
||||
if (sha && ref && !ref.startsWith('refs/')) {
|
||||
ref = `refs/heads/${ref}`;
|
||||
}
|
||||
if (sha && !ref.startsWith(`refs/pull/`)) {
|
||||
ref = sha;
|
||||
} else if (ref.startsWith(`refs/pull/`) && setPullRequestHeadRef) {
|
||||
ref = ref.replace(/\/merge$/g, '/head');
|
||||
}
|
||||
return ref;
|
||||
}
|
||||
|
||||
public static gitContext(): string {
|
||||
return `${GitHub.serverURL}/${github.context.repo.owner}/${github.context.repo.repo}.git#${Context.gitRef()}`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -113,7 +113,11 @@ export class Sigstore {
|
||||
}
|
||||
|
||||
for (const imageName of opts.imageNames) {
|
||||
const attestationDigests = await this.imageTools.attestationDigests(`${imageName}@${opts.imageDigest}`);
|
||||
const attestationDigests = await this.imageTools.attestationDigests({
|
||||
name: `${imageName}@${opts.imageDigest}`,
|
||||
retryOnManifestUnknown: opts.retryOnManifestUnknown,
|
||||
retryLimit: opts.retryLimit
|
||||
});
|
||||
for (const attestationDigest of attestationDigests) {
|
||||
const attestationRef = `${imageName}@${attestationDigest}`;
|
||||
await core.group(`Signing attestation manifest ${attestationRef}`, async () => {
|
||||
@@ -183,7 +187,12 @@ export class Sigstore {
|
||||
public async verifyImageAttestations(image: string, opts: VerifySignedManifestsOpts): Promise<Record<string, VerifySignedManifestsResult>> {
|
||||
const result: Record<string, VerifySignedManifestsResult> = {};
|
||||
|
||||
const attestationDigests = await this.imageTools.attestationDigests(image, opts.platform);
|
||||
const attestationDigests = await this.imageTools.attestationDigests({
|
||||
name: image,
|
||||
platform: opts.platform,
|
||||
retryOnManifestUnknown: opts.retryOnManifestUnknown,
|
||||
retryLimit: opts.retryLimit
|
||||
});
|
||||
if (attestationDigests.length === 0) {
|
||||
throw new Error(`No attestation manifests found for ${image}`);
|
||||
}
|
||||
@@ -237,7 +246,7 @@ export class Sigstore {
|
||||
};
|
||||
}
|
||||
|
||||
const retries = 15;
|
||||
const retries = opts.retryLimit ?? 15;
|
||||
let lastError: Error | undefined;
|
||||
core.info(`[command]cosign ${[...cosignArgs, attestationRef].join(' ')}`);
|
||||
for (let attempt = 0; attempt < retries; attempt++) {
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export type GitContextFormat = 'fragment' | 'query';
|
||||
|
||||
export type BuildMetadata = {
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
[key: string]: any;
|
||||
|
||||
@@ -107,7 +107,6 @@ export interface ExportOpts {
|
||||
refs: Array<string>;
|
||||
noSummaries?: boolean;
|
||||
image?: string;
|
||||
useContainer?: boolean;
|
||||
}
|
||||
|
||||
export interface ExportResponse {
|
||||
|
||||
@@ -15,9 +15,19 @@
|
||||
*/
|
||||
|
||||
import {Versioned} from '../oci/versioned.js';
|
||||
import {Descriptor} from '../oci/descriptor.js';
|
||||
import {Descriptor, Platform} from '../oci/descriptor.js';
|
||||
import {Digest} from '../oci/digest.js';
|
||||
|
||||
export interface InspectOpts {
|
||||
name: string;
|
||||
retryOnManifestUnknown?: boolean;
|
||||
retryLimit?: number;
|
||||
}
|
||||
|
||||
export interface AttestationInspectOpts extends InspectOpts {
|
||||
platform?: Platform;
|
||||
}
|
||||
|
||||
// https://github.com/docker/buildx/blob/62857022a08552bee5cad0c3044a9a3b185f0b32/util/imagetools/printers.go#L109-L123
|
||||
export interface Manifest extends Versioned {
|
||||
mediaType?: string;
|
||||
@@ -26,3 +36,26 @@ export interface Manifest extends Versioned {
|
||||
manifests?: Descriptor[];
|
||||
annotations?: Record<string, string>;
|
||||
}
|
||||
|
||||
// https://docs.docker.com/reference/cli/docker/buildx/imagetools/create/#options
|
||||
export interface CreateOpts {
|
||||
sources: Array<string>;
|
||||
tags?: Array<string>;
|
||||
platforms?: Array<string>;
|
||||
annotations?: Array<string>;
|
||||
dryRun?: boolean;
|
||||
silent?: boolean;
|
||||
skipExec?: boolean;
|
||||
}
|
||||
|
||||
export interface CreateResponse {
|
||||
'containerimage.digest'?: Digest;
|
||||
'containerimage.descriptor'?: Descriptor;
|
||||
'image.name'?: string;
|
||||
}
|
||||
|
||||
export interface CreateResult {
|
||||
digest: Digest;
|
||||
descriptor: Descriptor;
|
||||
imageNames: Array<string>;
|
||||
}
|
||||
|
||||
@@ -40,6 +40,8 @@ export interface SignAttestationManifestsOpts {
|
||||
imageNames: Array<string>;
|
||||
imageDigest: string;
|
||||
noTransparencyLog?: boolean;
|
||||
retryOnManifestUnknown?: boolean;
|
||||
retryLimit?: number;
|
||||
}
|
||||
|
||||
export interface SignAttestationManifestsResult extends ParsedBundle {
|
||||
@@ -51,6 +53,7 @@ export interface VerifySignedManifestsOpts {
|
||||
platform?: Platform;
|
||||
noTransparencyLog?: boolean;
|
||||
retryOnManifestUnknown?: boolean;
|
||||
retryLimit?: number;
|
||||
}
|
||||
|
||||
export interface VerifySignedManifestsResult {
|
||||
|
||||
15
src/util.ts
15
src/util.ts
@@ -24,6 +24,7 @@ import {parse} from 'csv-parse/sync';
|
||||
export interface ListOpts {
|
||||
ignoreComma?: boolean;
|
||||
comment?: string;
|
||||
commentNoInfix?: boolean;
|
||||
quote?: string | boolean | Buffer | null;
|
||||
}
|
||||
|
||||
@@ -42,6 +43,7 @@ export class Util {
|
||||
columns: false,
|
||||
relaxQuotes: true,
|
||||
comment: opts?.comment,
|
||||
comment_no_infix: opts?.commentNoInfix,
|
||||
relaxColumnCount: true,
|
||||
skipEmptyLines: true,
|
||||
quote: opts?.quote
|
||||
@@ -155,7 +157,10 @@ export class Util {
|
||||
}
|
||||
|
||||
// https://github.com/golang/go/blob/f6b93a4c358b28b350dd8fe1780c1f78e520c09c/src/strconv/atob.go#L7-L18
|
||||
public static parseBool(str: string): boolean {
|
||||
public static parseBool(str: string | undefined): boolean {
|
||||
if (str === undefined) {
|
||||
return false;
|
||||
}
|
||||
switch (str) {
|
||||
case '1':
|
||||
case 't':
|
||||
@@ -176,6 +181,14 @@ export class Util {
|
||||
}
|
||||
}
|
||||
|
||||
public static parseBoolOrDefault(str: string | undefined, defaultValue = false): boolean {
|
||||
try {
|
||||
return this.parseBool(str);
|
||||
} catch {
|
||||
return defaultValue;
|
||||
}
|
||||
}
|
||||
|
||||
public static formatFileSize(bytes: number): string {
|
||||
if (bytes === 0) return '0 Bytes';
|
||||
const k = 1024;
|
||||
|
||||
10
yarn.lock
10
yarn.lock
@@ -12,9 +12,9 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@actions/artifact@npm:^6.2.0":
|
||||
version: 6.2.0
|
||||
resolution: "@actions/artifact@npm:6.2.0"
|
||||
"@actions/artifact@npm:^6.2.1":
|
||||
version: 6.2.1
|
||||
resolution: "@actions/artifact@npm:6.2.1"
|
||||
dependencies:
|
||||
"@actions/core": "npm:^3.0.0"
|
||||
"@actions/github": "npm:^9.0.0"
|
||||
@@ -30,7 +30,7 @@ __metadata:
|
||||
archiver: "npm:^7.0.1"
|
||||
jwt-decode: "npm:^4.0.0"
|
||||
unzip-stream: "npm:^0.3.1"
|
||||
checksum: 10/fa931b1222c0e08bca85d3cb18c2cd5ae912cce3f09ab3acd4ec3486e864337d65177089a14aef124d9696b9dd5309b273a9251e230172c79c2444af2c43443e
|
||||
checksum: 10/1fad9b079ee2ab07f964b93bf7b4fc594d115199219baed74ac3bf2a8675e0b7ea57252eccbcdaaaa8fc8375742d23585cbd054f3b2d029c091817e0f257ce93
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -370,7 +370,7 @@ __metadata:
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@docker/actions-toolkit@workspace:."
|
||||
dependencies:
|
||||
"@actions/artifact": "npm:^6.2.0"
|
||||
"@actions/artifact": "npm:^6.2.1"
|
||||
"@actions/cache": "npm:^6.0.0"
|
||||
"@actions/core": "npm:^3.0.0"
|
||||
"@actions/exec": "npm:^3.0.0"
|
||||
|
||||
Reference in New Issue
Block a user