Compare commits
35 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bbf0a8d268 | ||
|
|
4ce8a708c9 | ||
|
|
6f66565779 | ||
|
|
504af69bd9 | ||
|
|
f3734ee134 | ||
|
|
4183444df2 | ||
|
|
a5466523c1 | ||
|
|
e0007fb5cd | ||
|
|
c330895cef | ||
|
|
e7017a21b8 | ||
|
|
b56d9771d7 | ||
|
|
680ab5bdf1 | ||
|
|
5ea53e0090 | ||
|
|
b5ae9ccb69 | ||
|
|
8c81eef9ff | ||
|
|
6668cc52b7 | ||
|
|
58b2ef7640 | ||
|
|
d791e46ccd | ||
|
|
1cb547a599 | ||
|
|
b61fc5ff9c | ||
|
|
eb3bf3055e | ||
|
|
6c6fdffd44 | ||
|
|
edcf239f49 | ||
|
|
e26a82d0aa | ||
|
|
3162c096bd | ||
|
|
0da8b903ef | ||
|
|
953dc3bb00 | ||
|
|
f27d52d6b7 | ||
|
|
5c3fc146af | ||
|
|
ef2bd7607f | ||
|
|
6352d92e3f | ||
|
|
a39cb53a8a | ||
|
|
9b811fbceb | ||
|
|
7b876a9e95 | ||
|
|
fd2f683a14 |
82
.github/buildx-lab-releases.json
vendored
82
.github/buildx-lab-releases.json
vendored
@@ -40,6 +40,88 @@
|
|||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/checksums.txt"
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/checksums.txt"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"v0.15.1-desktop.1": {
|
||||||
|
"id": 161492089,
|
||||||
|
"tag_name": "v0.15.1-desktop.1",
|
||||||
|
"html_url": "https://github.com/docker/buildx-desktop/releases/tag/v0.15.1-desktop.1",
|
||||||
|
"assets": [
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.darwin-amd64",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.darwin-amd64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.darwin-amd64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.darwin-arm64",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.darwin-arm64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.darwin-arm64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-amd64",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-amd64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-amd64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-arm-v6",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-arm-v6.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-arm-v6.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-arm-v7",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-arm-v7.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-arm-v7.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-arm64",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-arm64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-arm64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-ppc64le",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-ppc64le.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-ppc64le.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-riscv64",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-riscv64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-riscv64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-s390x",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-s390x.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.linux-s390x.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.windows-amd64.exe",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.windows-amd64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.windows-amd64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.windows-arm64.exe",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.windows-arm64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/buildx-v0.15.1-desktop.1.windows-arm64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.1-desktop.1/checksums.txt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"v0.15.0-desktop.1": {
|
||||||
|
"id": 160473592,
|
||||||
|
"tag_name": "v0.15.0-desktop.1",
|
||||||
|
"html_url": "https://github.com/docker/buildx-desktop/releases/tag/v0.15.0-desktop.1",
|
||||||
|
"assets": [
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.darwin-amd64",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.darwin-amd64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.darwin-amd64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.darwin-arm64",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.darwin-arm64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.darwin-arm64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-amd64",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-amd64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-amd64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-arm-v6",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-arm-v6.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-arm-v6.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-arm-v7",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-arm-v7.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-arm-v7.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-arm64",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-arm64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-arm64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-ppc64le",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-ppc64le.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-ppc64le.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-riscv64",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-riscv64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-riscv64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-s390x",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-s390x.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.linux-s390x.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.windows-amd64.exe",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.windows-amd64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.windows-amd64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.windows-arm64.exe",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.windows-arm64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/buildx-v0.15.0-desktop.1.windows-arm64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx-desktop/releases/download/v0.15.0-desktop.1/checksums.txt"
|
||||||
|
]
|
||||||
|
},
|
||||||
"v0.14.1-desktop.1": {
|
"v0.14.1-desktop.1": {
|
||||||
"id": 157588052,
|
"id": 157588052,
|
||||||
"tag_name": "v0.14.1-desktop.1",
|
"tag_name": "v0.14.1-desktop.1",
|
||||||
|
|||||||
115
.github/buildx-releases.json
vendored
115
.github/buildx-releases.json
vendored
@@ -1,43 +1,84 @@
|
|||||||
{
|
{
|
||||||
"latest": {
|
"latest": {
|
||||||
"id": 159941316,
|
"id": 161126938,
|
||||||
"tag_name": "v0.15.0",
|
"tag_name": "v0.15.1",
|
||||||
"html_url": "https://github.com/docker/buildx/releases/tag/v0.15.0",
|
"html_url": "https://github.com/docker/buildx/releases/tag/v0.15.1",
|
||||||
"assets": [
|
"assets": [
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.darwin-amd64",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.darwin-amd64",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.darwin-amd64.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.darwin-amd64.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.darwin-amd64.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.darwin-amd64.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.darwin-arm64",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.darwin-arm64",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.darwin-arm64.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.darwin-arm64.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.darwin-arm64.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.darwin-arm64.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-amd64",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-amd64",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-amd64.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-amd64.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-amd64.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-amd64.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-arm-v6",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm-v6",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-arm-v6.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm-v6.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-arm-v6.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm-v6.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-arm-v7",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm-v7",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-arm-v7.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm-v7.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-arm-v7.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm-v7.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-arm64",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm64",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-arm64.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm64.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-arm64.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm64.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-ppc64le",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-ppc64le",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-ppc64le.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-ppc64le.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-ppc64le.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-ppc64le.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-riscv64",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-riscv64",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-riscv64.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-riscv64.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-riscv64.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-riscv64.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-s390x",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-s390x",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-s390x.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-s390x.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-s390x.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-s390x.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.windows-amd64.exe",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.windows-amd64.exe",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.windows-amd64.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.windows-amd64.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.windows-amd64.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.windows-amd64.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.windows-arm64.exe",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.windows-arm64.exe",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.windows-arm64.provenance.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.windows-arm64.provenance.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.windows-arm64.sbom.json",
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.windows-arm64.sbom.json",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.15.0/checksums.txt"
|
"https://github.com/docker/buildx/releases/download/v0.15.1/checksums.txt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"v0.15.1": {
|
||||||
|
"id": 161126938,
|
||||||
|
"tag_name": "v0.15.1",
|
||||||
|
"html_url": "https://github.com/docker/buildx/releases/tag/v0.15.1",
|
||||||
|
"assets": [
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.darwin-amd64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.darwin-amd64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.darwin-amd64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.darwin-arm64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.darwin-arm64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.darwin-arm64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-amd64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-amd64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-amd64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm-v6",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm-v6.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm-v6.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm-v7",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm-v7.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm-v7.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-arm64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-ppc64le",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-ppc64le.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-ppc64le.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-riscv64",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-riscv64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-riscv64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-s390x",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-s390x.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.linux-s390x.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.windows-amd64.exe",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.windows-amd64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.windows-amd64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.windows-arm64.exe",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.windows-arm64.provenance.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/buildx-v0.15.1.windows-arm64.sbom.json",
|
||||||
|
"https://github.com/docker/buildx/releases/download/v0.15.1/checksums.txt"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"v0.15.0": {
|
"v0.15.0": {
|
||||||
|
|||||||
18
.github/docker-releases.json
vendored
18
.github/docker-releases.json
vendored
@@ -5,6 +5,24 @@
|
|||||||
"html_url": "https://github.com/moby/moby/releases/tag/v26.1.4",
|
"html_url": "https://github.com/moby/moby/releases/tag/v26.1.4",
|
||||||
"assets": []
|
"assets": []
|
||||||
},
|
},
|
||||||
|
"v27.0.1-rc.1": {
|
||||||
|
"id": 161457618,
|
||||||
|
"tag_name": "v27.0.1-rc.1",
|
||||||
|
"html_url": "https://github.com/moby/moby/releases/tag/v27.0.1-rc.1",
|
||||||
|
"assets": []
|
||||||
|
},
|
||||||
|
"v23.0.13": {
|
||||||
|
"id": 161533551,
|
||||||
|
"tag_name": "v23.0.13",
|
||||||
|
"html_url": "https://github.com/moby/moby/releases/tag/v23.0.13",
|
||||||
|
"assets": []
|
||||||
|
},
|
||||||
|
"v27.0.0-rc.2": {
|
||||||
|
"id": 160534078,
|
||||||
|
"tag_name": "v27.0.0-rc.2",
|
||||||
|
"html_url": "https://github.com/moby/moby/releases/tag/v27.0.0-rc.2",
|
||||||
|
"assets": []
|
||||||
|
},
|
||||||
"v27.0.0-rc.1": {
|
"v27.0.0-rc.1": {
|
||||||
"id": 160112985,
|
"id": 160112985,
|
||||||
"tag_name": "v27.0.0-rc.1",
|
"tag_name": "v27.0.0-rc.1",
|
||||||
|
|||||||
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -21,6 +21,6 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
-
|
-
|
||||||
name: Build
|
name: Build
|
||||||
uses: docker/bake-action@v4
|
uses: docker/bake-action@v5
|
||||||
with:
|
with:
|
||||||
targets: build
|
targets: build
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths:
|
||||||
- '.github/*-releases.json'
|
- '.github/workflows/buildx-lab-releases-json.yml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
generate:
|
generate:
|
||||||
@@ -45,7 +45,7 @@ jobs:
|
|||||||
git add -A .
|
git add -A .
|
||||||
-
|
-
|
||||||
name: Create PR
|
name: Create PR
|
||||||
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
|
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
|
||||||
with:
|
with:
|
||||||
base: main
|
base: main
|
||||||
branch: bot/buildx-lab-releases-json
|
branch: bot/buildx-lab-releases-json
|
||||||
|
|||||||
6
.github/workflows/buildx-releases-json.yml
vendored
6
.github/workflows/buildx-releases-json.yml
vendored
@@ -12,8 +12,8 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths:
|
||||||
- '.github/*-releases.json'
|
- '.github/workflows/buildx-releases-json.yml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
generate:
|
generate:
|
||||||
@@ -45,7 +45,7 @@ jobs:
|
|||||||
git add -A .
|
git add -A .
|
||||||
-
|
-
|
||||||
name: Create PR
|
name: Create PR
|
||||||
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
|
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
|
||||||
with:
|
with:
|
||||||
base: main
|
base: main
|
||||||
branch: bot/buildx-releases-json
|
branch: bot/buildx-releases-json
|
||||||
|
|||||||
6
.github/workflows/docker-releases-json.yml
vendored
6
.github/workflows/docker-releases-json.yml
vendored
@@ -12,8 +12,8 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- 'main'
|
- 'main'
|
||||||
pull_request:
|
pull_request:
|
||||||
paths-ignore:
|
paths:
|
||||||
- '.github/*-releases.json'
|
- '.github/workflows/docker-releases-json.yml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
generate:
|
generate:
|
||||||
@@ -45,7 +45,7 @@ jobs:
|
|||||||
git add -A .
|
git add -A .
|
||||||
-
|
-
|
||||||
name: Create PR
|
name: Create PR
|
||||||
uses: peter-evans/create-pull-request@6d6857d36972b65feb161a90e484f2984215f83e # v6.0.5
|
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
|
||||||
with:
|
with:
|
||||||
base: main
|
base: main
|
||||||
branch: bot/docker-releases-json
|
branch: bot/docker-releases-json
|
||||||
|
|||||||
2
.github/workflows/publish.yml
vendored
2
.github/workflows/publish.yml
vendored
@@ -21,7 +21,7 @@ jobs:
|
|||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v3
|
||||||
-
|
-
|
||||||
name: Publish
|
name: Publish
|
||||||
uses: docker/bake-action@v4
|
uses: docker/bake-action@v5
|
||||||
with:
|
with:
|
||||||
targets: publish
|
targets: publish
|
||||||
env:
|
env:
|
||||||
|
|||||||
5
.github/workflows/test.yml
vendored
5
.github/workflows/test.yml
vendored
@@ -15,7 +15,7 @@ on:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
NODE_VERSION: "20"
|
NODE_VERSION: "20"
|
||||||
BUILDX_VERSION: "v0.15.0"
|
BUILDX_VERSION: "v0.15.1"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
-
|
-
|
||||||
name: Test
|
name: Test
|
||||||
uses: docker/bake-action@v4
|
uses: docker/bake-action@v5
|
||||||
with:
|
with:
|
||||||
targets: test-coverage
|
targets: test-coverage
|
||||||
env:
|
env:
|
||||||
@@ -149,6 +149,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
CTN_BUILDER_NAME: ${{ steps.builder.outputs.name }}
|
CTN_BUILDER_NAME: ${{ steps.builder.outputs.name }}
|
||||||
|
TEST_FOR_SUMMARY: ${{ secrets.TEST_FOR_SUMMARY }}
|
||||||
-
|
-
|
||||||
name: Check coverage
|
name: Check coverage
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
2
.github/workflows/validate.yml
vendored
2
.github/workflows/validate.yml
vendored
@@ -42,6 +42,6 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
-
|
-
|
||||||
name: Validate
|
name: Validate
|
||||||
uses: docker/bake-action@v4
|
uses: docker/bake-action@v5
|
||||||
with:
|
with:
|
||||||
targets: ${{ matrix.target }}
|
targets: ${{ matrix.target }}
|
||||||
|
|||||||
@@ -14,17 +14,13 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {beforeEach, describe, expect, it, jest, test} from '@jest/globals';
|
import {describe, expect, it, jest, test} from '@jest/globals';
|
||||||
|
|
||||||
import {BuildKit} from '../../src/buildkit/buildkit';
|
import {BuildKit} from '../../src/buildkit/buildkit';
|
||||||
import {Builder} from '../../src/buildx/builder';
|
import {Builder} from '../../src/buildx/builder';
|
||||||
|
|
||||||
import {BuilderInfo} from '../../src/types/buildx/builder';
|
import {BuilderInfo} from '../../src/types/buildx/builder';
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
|
||||||
|
|
||||||
jest.spyOn(Builder.prototype, 'inspect').mockImplementation(async (): Promise<BuilderInfo> => {
|
jest.spyOn(Builder.prototype, 'inspect').mockImplementation(async (): Promise<BuilderInfo> => {
|
||||||
return {
|
return {
|
||||||
name: 'builder2',
|
name: 'builder2',
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {describe, expect, jest, test, beforeEach, afterEach} from '@jest/globals';
|
import {describe, expect, jest, test, afterEach} from '@jest/globals';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as rimraf from 'rimraf';
|
import * as rimraf from 'rimraf';
|
||||||
@@ -38,10 +38,6 @@ jest.spyOn(Context, 'tmpName').mockImplementation((): string => {
|
|||||||
return tmpName;
|
return tmpName;
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
rimraf.sync(tmpDir);
|
rimraf.sync(tmpDir);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {beforeEach, describe, expect, jest, test} from '@jest/globals';
|
import {describe, expect, test} from '@jest/globals';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
@@ -25,10 +25,6 @@ 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;
|
const maybe = !process.env.GITHUB_ACTIONS || (process.env.GITHUB_ACTIONS === 'true' && process.env.ImageOS && process.env.ImageOS.startsWith('ubuntu')) ? describe : describe.skip;
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
|
||||||
|
|
||||||
maybe('getDefinition', () => {
|
maybe('getDefinition', () => {
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
test.each([
|
test.each([
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {afterEach, beforeEach, describe, expect, it, jest, test} from '@jest/globals';
|
import {afterEach, describe, expect, it, jest, test} from '@jest/globals';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as rimraf from 'rimraf';
|
import * as rimraf from 'rimraf';
|
||||||
@@ -49,10 +49,6 @@ jest.spyOn(Context, 'tmpName').mockImplementation((): string => {
|
|||||||
return tmpName;
|
return tmpName;
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
rimraf.sync(tmpDir);
|
rimraf.sync(tmpDir);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -39,10 +39,6 @@ jest.spyOn(Context, 'tmpName').mockImplementation((): string => {
|
|||||||
return tmpName;
|
return tmpName;
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
rimraf.sync(tmpDir);
|
rimraf.sync(tmpDir);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {beforeEach, describe, expect, it, jest, test} from '@jest/globals';
|
import {describe, expect, it, jest, test} from '@jest/globals';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
@@ -25,10 +25,6 @@ import {BuilderInfo} from '../../src/types/buildx/builder';
|
|||||||
|
|
||||||
const fixturesDir = path.join(__dirname, '..', 'fixtures');
|
const fixturesDir = path.join(__dirname, '..', 'fixtures');
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
|
||||||
|
|
||||||
jest.spyOn(Builder.prototype, 'inspect').mockImplementation(async (): Promise<BuilderInfo> => {
|
jest.spyOn(Builder.prototype, 'inspect').mockImplementation(async (): Promise<BuilderInfo> => {
|
||||||
return {
|
return {
|
||||||
name: 'builder2',
|
name: 'builder2',
|
||||||
|
|||||||
@@ -42,10 +42,6 @@ jest.spyOn(Context, 'tmpName').mockImplementation((): string => {
|
|||||||
return tmpName;
|
return tmpName;
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
rimraf.sync(tmpDir);
|
rimraf.sync(tmpDir);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {beforeEach, describe, expect, jest, test} from '@jest/globals';
|
import {describe, expect, test} from '@jest/globals';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
@@ -31,10 +31,6 @@ const tmpDir = path.join(process.env.TEMP || '/tmp', 'buildx-history-jest');
|
|||||||
|
|
||||||
const maybe = !process.env.GITHUB_ACTIONS || (process.env.GITHUB_ACTIONS === 'true' && process.env.ImageOS && process.env.ImageOS.startsWith('ubuntu')) ? describe : describe.skip;
|
const maybe = !process.env.GITHUB_ACTIONS || (process.env.GITHUB_ACTIONS === 'true' && process.env.ImageOS && process.env.ImageOS.startsWith('ubuntu')) ? describe : describe.skip;
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
|
||||||
|
|
||||||
maybe('exportBuild', () => {
|
maybe('exportBuild', () => {
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
test.each([
|
test.each([
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {describe, expect, it, jest, test, beforeEach, afterEach} from '@jest/globals';
|
import {describe, expect, it, jest, test, afterEach} from '@jest/globals';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as rimraf from 'rimraf';
|
import * as rimraf from 'rimraf';
|
||||||
@@ -25,10 +25,6 @@ import {Install} from '../../src/buildx/install';
|
|||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
const tmpDir = path.join(process.env.TEMP || '/tmp', 'buildx-jest');
|
const tmpDir = path.join(process.env.TEMP || '/tmp', 'buildx-jest');
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(function () {
|
afterEach(function () {
|
||||||
rimraf.sync(tmpDir);
|
rimraf.sync(tmpDir);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import * as rimraf from 'rimraf';
|
import * as rimraf from 'rimraf';
|
||||||
import {describe, expect, jest, it, beforeEach, afterEach} from '@jest/globals';
|
import {describe, expect, jest, it, afterEach} from '@jest/globals';
|
||||||
|
|
||||||
import {Context} from '../src/context';
|
import {Context} from '../src/context';
|
||||||
|
|
||||||
@@ -36,10 +36,6 @@ jest.spyOn(Context, 'tmpName').mockImplementation((): string => {
|
|||||||
return tmpName;
|
return tmpName;
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
rimraf.sync(tmpDir);
|
rimraf.sync(tmpDir);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -31,10 +31,6 @@ const fixturesDir = path.join(__dirname, '..', 'fixtures');
|
|||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
const tmpDir = path.join(process.env.TEMP || '/tmp', 'docker-jest');
|
const tmpDir = path.join(process.env.TEMP || '/tmp', 'docker-jest');
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(function () {
|
afterEach(function () {
|
||||||
rimraf.sync(tmpDir);
|
rimraf.sync(tmpDir);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -25,10 +25,6 @@ import {Install} from '../../src/docker/install';
|
|||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
const tmpDir = path.join(process.env.TEMP || '/tmp', 'docker-install-jest');
|
const tmpDir = path.join(process.env.TEMP || '/tmp', 'docker-install-jest');
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(function () {
|
afterEach(function () {
|
||||||
rimraf.sync(tmpDir);
|
rimraf.sync(tmpDir);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,17 +14,13 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {describe, expect, jest, it, beforeEach} from '@jest/globals';
|
import {describe, expect, jest, it} from '@jest/globals';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
import {DockerHub} from '../src/dockerhub';
|
import {DockerHub} from '../src/dockerhub';
|
||||||
import {RepositoryResponse, RepositoryTagsResponse} from '../src/types/dockerhub';
|
import {RepositoryResponse, RepositoryTagsResponse} from '../src/types/dockerhub';
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
|
||||||
|
|
||||||
import repoInfoFixture from './fixtures/dockerhub-repoinfo.json';
|
import repoInfoFixture from './fixtures/dockerhub-repoinfo.json';
|
||||||
import repoTagsFixture from './fixtures/dockerhub-repotags.json';
|
import repoTagsFixture from './fixtures/dockerhub-repotags.json';
|
||||||
import repoAllTagsFixture from './fixtures/dockerhub-repoalltags.json';
|
import repoAllTagsFixture from './fixtures/dockerhub-repoalltags.json';
|
||||||
|
|||||||
@@ -14,14 +14,10 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {beforeEach, describe, expect, it, jest} from '@jest/globals';
|
import {describe, expect, it, jest} from '@jest/globals';
|
||||||
|
|
||||||
import {Exec} from '../src/exec';
|
import {Exec} from '../src/exec';
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('exec', () => {
|
describe('exec', () => {
|
||||||
it('returns docker version', async () => {
|
it('returns docker version', async () => {
|
||||||
const execSpy = jest.spyOn(Exec, 'exec');
|
const execSpy = jest.spyOn(Exec, 'exec');
|
||||||
|
|||||||
19
__tests__/fixtures/hello-err.Dockerfile
Normal file
19
__tests__/fixtures/hello-err.Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
|
# Copyright 2024 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.
|
||||||
|
|
||||||
|
FROM busybox:latest
|
||||||
|
ARGGG NAME=foo
|
||||||
|
RUN echo "hello $NAME"
|
||||||
@@ -21,7 +21,6 @@ import {Exec} from '../src/exec';
|
|||||||
import {ExecOutput} from '@actions/exec';
|
import {ExecOutput} from '@actions/exec';
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
jest.clearAllMocks();
|
|
||||||
jest.restoreAllMocks();
|
jest.restoreAllMocks();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {beforeEach, describe, expect, it, jest, test} from '@jest/globals';
|
import {describe, expect, it, test} from '@jest/globals';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
@@ -32,10 +32,6 @@ const tmpDir = path.join(process.env.TEMP || '/tmp', 'github-jest');
|
|||||||
|
|
||||||
const maybe = !process.env.GITHUB_ACTIONS || (process.env.GITHUB_ACTIONS === 'true' && process.env.ImageOS && process.env.ImageOS.startsWith('ubuntu')) ? describe : describe.skip;
|
const maybe = !process.env.GITHUB_ACTIONS || (process.env.GITHUB_ACTIONS === 'true' && process.env.ImageOS && process.env.ImageOS.startsWith('ubuntu')) ? describe : describe.skip;
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
|
||||||
|
|
||||||
maybe('uploadArtifact', () => {
|
maybe('uploadArtifact', () => {
|
||||||
it('uploads an artifact', async () => {
|
it('uploads an artifact', async () => {
|
||||||
const res = await GitHub.uploadArtifact({
|
const res = await GitHub.uploadArtifact({
|
||||||
@@ -122,29 +118,20 @@ maybe('writeBuildSummary', () => {
|
|||||||
test.each([
|
test.each([
|
||||||
[
|
[
|
||||||
'single',
|
'single',
|
||||||
[
|
path.join(fixturesDir, 'hello-bake.hcl'),
|
||||||
'bake',
|
'hello'
|
||||||
'-f', path.join(fixturesDir, 'hello-bake.hcl'),
|
|
||||||
'hello'
|
|
||||||
],
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'group',
|
'group',
|
||||||
[
|
path.join(fixturesDir, 'hello-bake.hcl'),
|
||||||
'bake',
|
'hello-all'
|
||||||
'-f', path.join(fixturesDir, 'hello-bake.hcl'),
|
|
||||||
'hello-all'
|
|
||||||
],
|
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'matrix',
|
'matrix',
|
||||||
[
|
path.join(fixturesDir, 'hello-bake.hcl'),
|
||||||
'bake',
|
'hello-matrix'
|
||||||
'-f', path.join(fixturesDir, 'hello-bake.hcl'),
|
|
||||||
'hello-matrix'
|
|
||||||
],
|
|
||||||
]
|
]
|
||||||
])('write bake summary %p', async (_, bargs) => {
|
])('write bake summary %p', async (_, file, target) => {
|
||||||
const buildx = new Buildx();
|
const buildx = new Buildx();
|
||||||
const bake = new Bake({buildx: buildx});
|
const bake = new Bake({buildx: buildx});
|
||||||
|
|
||||||
@@ -154,7 +141,9 @@ maybe('writeBuildSummary', () => {
|
|||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
const buildCmd = await buildx.getCommand([
|
const buildCmd = await buildx.getCommand([
|
||||||
'--builder', process.env.CTN_BUILDER_NAME ?? 'default',
|
'--builder', process.env.CTN_BUILDER_NAME ?? 'default',
|
||||||
...bargs,
|
'bake',
|
||||||
|
'-f', file,
|
||||||
|
target,
|
||||||
'--metadata-file', bake.getMetadataFilePath()
|
'--metadata-file', bake.getMetadataFilePath()
|
||||||
]);
|
]);
|
||||||
await Exec.exec(buildCmd.command, buildCmd.args, {
|
await Exec.exec(buildCmd.command, buildCmd.args, {
|
||||||
@@ -163,6 +152,16 @@ maybe('writeBuildSummary', () => {
|
|||||||
})()
|
})()
|
||||||
).resolves.not.toThrow();
|
).resolves.not.toThrow();
|
||||||
|
|
||||||
|
const definition = await bake.getDefinition(
|
||||||
|
{
|
||||||
|
files: [file],
|
||||||
|
targets: [target],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
cwd: fixturesDir
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const metadata = bake.resolveMetadata();
|
const metadata = bake.resolveMetadata();
|
||||||
expect(metadata).toBeDefined();
|
expect(metadata).toBeDefined();
|
||||||
const buildRefs = bake.resolveRefs(metadata);
|
const buildRefs = bake.resolveRefs(metadata);
|
||||||
@@ -190,6 +189,62 @@ maybe('writeBuildSummary', () => {
|
|||||||
uploadRes: uploadRes,
|
uploadRes: uploadRes,
|
||||||
inputs: {
|
inputs: {
|
||||||
files: path.join(fixturesDir, 'hello-bake.hcl')
|
files: path.join(fixturesDir, 'hello-bake.hcl')
|
||||||
|
},
|
||||||
|
bakeDefinition: definition
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
it('fails with dockerfile syntax issue', async () => {
|
||||||
|
const startedTime = new Date();
|
||||||
|
const buildx = new Buildx();
|
||||||
|
const build = new Build({buildx: buildx});
|
||||||
|
|
||||||
|
fs.mkdirSync(tmpDir, {recursive: true});
|
||||||
|
await expect(
|
||||||
|
(async () => {
|
||||||
|
// prettier-ignore
|
||||||
|
const buildCmd = await buildx.getCommand([
|
||||||
|
'--builder', process.env.CTN_BUILDER_NAME ?? 'default',
|
||||||
|
'build',
|
||||||
|
'-f', path.join(fixturesDir, 'hello-err.Dockerfile'),
|
||||||
|
fixturesDir,
|
||||||
|
'--metadata-file', build.getMetadataFilePath()
|
||||||
|
]);
|
||||||
|
await Exec.exec(buildCmd.command, buildCmd.args);
|
||||||
|
})()
|
||||||
|
).rejects.toThrow();
|
||||||
|
|
||||||
|
const refs = Buildx.refs({
|
||||||
|
dir: Buildx.refsDir,
|
||||||
|
builderName: process.env.CTN_BUILDER_NAME ?? 'default',
|
||||||
|
since: startedTime
|
||||||
|
});
|
||||||
|
expect(refs).toBeDefined();
|
||||||
|
expect(Object.keys(refs).length).toBeGreaterThan(0);
|
||||||
|
|
||||||
|
const history = new History({buildx: buildx});
|
||||||
|
const exportRes = await history.export({
|
||||||
|
refs: [Object.keys(refs)[0] ?? '']
|
||||||
|
});
|
||||||
|
expect(exportRes).toBeDefined();
|
||||||
|
expect(exportRes?.dockerbuildFilename).toBeDefined();
|
||||||
|
expect(exportRes?.dockerbuildSize).toBeDefined();
|
||||||
|
expect(exportRes?.summaries).toBeDefined();
|
||||||
|
|
||||||
|
const uploadRes = await GitHub.uploadArtifact({
|
||||||
|
filename: exportRes?.dockerbuildFilename,
|
||||||
|
mimeType: 'application/gzip',
|
||||||
|
retentionDays: 1
|
||||||
|
});
|
||||||
|
expect(uploadRes).toBeDefined();
|
||||||
|
expect(uploadRes?.url).toBeDefined();
|
||||||
|
|
||||||
|
await GitHub.writeBuildSummary({
|
||||||
|
exportRes: exportRes,
|
||||||
|
uploadRes: uploadRes,
|
||||||
|
inputs: {
|
||||||
|
context: fixturesDir,
|
||||||
|
file: path.join(fixturesDir, 'hello-err.Dockerfile')
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -22,10 +22,6 @@ import * as core from '@actions/core';
|
|||||||
import {GitHub} from '../src/github';
|
import {GitHub} from '../src/github';
|
||||||
import {GitHubRepo} from '../src/types/github';
|
import {GitHubRepo} from '../src/types/github';
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
|
||||||
|
|
||||||
import repoFixture from './fixtures/github-repo.json';
|
import repoFixture from './fixtures/github-repo.json';
|
||||||
jest.spyOn(GitHub.prototype, 'repoData').mockImplementation((): Promise<GitHubRepo> => {
|
jest.spyOn(GitHub.prototype, 'repoData').mockImplementation((): Promise<GitHubRepo> => {
|
||||||
return <Promise<GitHubRepo>>(repoFixture as unknown);
|
return <Promise<GitHubRepo>>(repoFixture as unknown);
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {afterEach, beforeEach, describe, expect, jest, test} from '@jest/globals';
|
import {afterEach, describe, expect, test} from '@jest/globals';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import * as rimraf from 'rimraf';
|
import * as rimraf from 'rimraf';
|
||||||
@@ -26,10 +26,6 @@ const fixturesDir = path.join(__dirname, '..', 'fixtures');
|
|||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
const tmpDir = path.join(process.env.TEMP || '/tmp', 'docker-jest');
|
const tmpDir = path.join(process.env.TEMP || '/tmp', 'docker-jest');
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(function () {
|
afterEach(function () {
|
||||||
rimraf.sync(tmpDir);
|
rimraf.sync(tmpDir);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -14,16 +14,12 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {beforeEach, describe, expect, it, jest, test} from '@jest/globals';
|
import {describe, expect, it, test} from '@jest/globals';
|
||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
|
|
||||||
import {Util} from '../src/util';
|
import {Util} from '../src/util';
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('getInputList', () => {
|
describe('getInputList', () => {
|
||||||
it('single line correctly', async () => {
|
it('single line correctly', async () => {
|
||||||
await setInput('foo', 'bar');
|
await setInput('foo', 'bar');
|
||||||
@@ -357,6 +353,69 @@ describe('generateRandomString', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('stringToUnicodeEntities', () => {
|
||||||
|
it('should convert a string to Unicode entities', () => {
|
||||||
|
const input = 'Hello, World!';
|
||||||
|
const expected = 'Hello, World!';
|
||||||
|
const result = Util.stringToUnicodeEntities(input);
|
||||||
|
expect(result).toEqual(expected);
|
||||||
|
});
|
||||||
|
it('should handle an empty string', () => {
|
||||||
|
const input = '';
|
||||||
|
const expected = '';
|
||||||
|
const result = Util.stringToUnicodeEntities(input);
|
||||||
|
expect(result).toEqual(expected);
|
||||||
|
});
|
||||||
|
it('should handle special characters', () => {
|
||||||
|
const input = '@#^&*()';
|
||||||
|
const expected = '@#^&*()';
|
||||||
|
const result = Util.stringToUnicodeEntities(input);
|
||||||
|
expect(result).toEqual(expected);
|
||||||
|
});
|
||||||
|
it('should handle non-English characters', () => {
|
||||||
|
const input = 'こんにちは';
|
||||||
|
const expected = 'こんにちは';
|
||||||
|
const result = Util.stringToUnicodeEntities(input);
|
||||||
|
expect(result).toEqual(expected);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
describe('countLines', () => {
|
||||||
|
it('counts total number of lines correctly', () => {
|
||||||
|
const text = `This
|
||||||
|
|
||||||
|
is
|
||||||
|
a
|
||||||
|
sample
|
||||||
|
|
||||||
|
text
|
||||||
|
with
|
||||||
|
multiple
|
||||||
|
lines`;
|
||||||
|
|
||||||
|
const result = Util.countLines(text);
|
||||||
|
expect(result).toEqual(10); // Including empty lines
|
||||||
|
});
|
||||||
|
it('handles edge case with empty string', () => {
|
||||||
|
const text = '';
|
||||||
|
|
||||||
|
const result = Util.countLines(text);
|
||||||
|
expect(result).toEqual(1); // Empty string should have 1 line
|
||||||
|
});
|
||||||
|
it('handles edge case with single line', () => {
|
||||||
|
const text = 'Single line text';
|
||||||
|
|
||||||
|
const result = Util.countLines(text);
|
||||||
|
expect(result).toEqual(1); // Single line should have 1 line
|
||||||
|
});
|
||||||
|
it('handles multiple types of line breaks', () => {
|
||||||
|
const text = `Line 1\r\nLine 2\rLine 3\nLine 4`;
|
||||||
|
|
||||||
|
const result = Util.countLines(text);
|
||||||
|
expect(result).toEqual(4); // Different line break types should be counted correctly
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// See: https://github.com/actions/toolkit/blob/a1b068ec31a042ff1e10a522d8fdf0b8869d53ca/packages/core/src/core.ts#L89
|
// See: https://github.com/actions/toolkit/blob/a1b068ec31a042ff1e10a522d8fdf0b8869d53ca/packages/core/src/core.ts#L89
|
||||||
function getInputName(name: string): string {
|
function getInputName(name: string): string {
|
||||||
return `INPUT_${name.replace(/ /g, '_').toUpperCase()}`;
|
return `INPUT_${name.replace(/ /g, '_').toUpperCase()}`;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
ARG NODE_VERSION=20
|
ARG NODE_VERSION=20
|
||||||
ARG DOCKER_VERSION=26.0.2
|
ARG DOCKER_VERSION=26.0.2
|
||||||
ARG BUILDX_VERSION=0.15.0
|
ARG BUILDX_VERSION=0.15.1
|
||||||
|
|
||||||
FROM node:${NODE_VERSION}-alpine AS base
|
FROM node:${NODE_VERSION}-alpine AS base
|
||||||
RUN apk add --no-cache cpio findutils git
|
RUN apk add --no-cache cpio findutils git
|
||||||
|
|||||||
@@ -22,10 +22,6 @@ const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-actions-toolkit-'))
|
|||||||
|
|
||||||
process.env = Object.assign({}, process.env, {
|
process.env = Object.assign({}, process.env, {
|
||||||
TEMP: tmpDir,
|
TEMP: tmpDir,
|
||||||
GITHUB_REPOSITORY: 'docker/actions-toolkit',
|
|
||||||
GITHUB_RUN_ATTEMPT: 2,
|
|
||||||
GITHUB_RUN_ID: 2188748038,
|
|
||||||
GITHUB_RUN_NUMBER: 15,
|
|
||||||
RUNNER_TEMP: path.join(tmpDir, 'runner-temp'),
|
RUNNER_TEMP: path.join(tmpDir, 'runner-temp'),
|
||||||
RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache')
|
RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache')
|
||||||
}) as {
|
}) as {
|
||||||
@@ -33,7 +29,6 @@ process.env = Object.assign({}, process.env, {
|
|||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
clearMocks: true,
|
|
||||||
testEnvironment: 'node',
|
testEnvironment: 'node',
|
||||||
moduleFileExtensions: ['js', 'ts'],
|
moduleFileExtensions: ['js', 'ts'],
|
||||||
setupFiles: ['dotenv/config'],
|
setupFiles: ['dotenv/config'],
|
||||||
|
|||||||
@@ -60,6 +60,7 @@
|
|||||||
"csv-parse": "^5.5.6",
|
"csv-parse": "^5.5.6",
|
||||||
"gunzip-maybe": "^1.4.2",
|
"gunzip-maybe": "^1.4.2",
|
||||||
"handlebars": "^4.7.8",
|
"handlebars": "^4.7.8",
|
||||||
|
"he": "^1.2.0",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"jwt-decode": "^4.0.0",
|
"jwt-decode": "^4.0.0",
|
||||||
"semver": "^7.6.2",
|
"semver": "^7.6.2",
|
||||||
@@ -69,6 +70,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/csv-parse": "^1.2.2",
|
"@types/csv-parse": "^1.2.2",
|
||||||
"@types/gunzip-maybe": "^1.4.2",
|
"@types/gunzip-maybe": "^1.4.2",
|
||||||
|
"@types/he": "^1.2.3",
|
||||||
"@types/js-yaml": "^4.0.9",
|
"@types/js-yaml": "^4.0.9",
|
||||||
"@types/node": "^20.12.10",
|
"@types/node": "^20.12.10",
|
||||||
"@types/semver": "^7.5.8",
|
"@types/semver": "^7.5.8",
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ export class History {
|
|||||||
if (!(await Docker.isAvailable())) {
|
if (!(await Docker.isAvailable())) {
|
||||||
throw new Error('Docker is required to export a build record');
|
throw new Error('Docker is required to export a build record');
|
||||||
}
|
}
|
||||||
|
if (!(await this.buildx.versionSatisfies('>=0.13.0'))) {
|
||||||
|
throw new Error('Buildx >= 0.13.0 is required to export a build record');
|
||||||
|
}
|
||||||
|
|
||||||
let builderName: string = '';
|
let builderName: string = '';
|
||||||
let nodeName: string = '';
|
let nodeName: string = '';
|
||||||
|
|||||||
@@ -16,11 +16,13 @@
|
|||||||
|
|
||||||
import crypto from 'crypto';
|
import crypto from 'crypto';
|
||||||
import fs from 'fs';
|
import fs from 'fs';
|
||||||
|
import he from 'he';
|
||||||
import jsyaml from 'js-yaml';
|
import jsyaml from 'js-yaml';
|
||||||
import os from 'os';
|
import os from 'os';
|
||||||
import path from 'path';
|
import path from 'path';
|
||||||
import {CreateArtifactRequest, FinalizeArtifactRequest, StringValue} from '@actions/artifact/lib/generated';
|
import {CreateArtifactRequest, FinalizeArtifactRequest, StringValue} from '@actions/artifact/lib/generated';
|
||||||
import {internalArtifactTwirpClient} from '@actions/artifact/lib/internal/shared/artifact-twirp-client';
|
import {internalArtifactTwirpClient} from '@actions/artifact/lib/internal/shared/artifact-twirp-client';
|
||||||
|
import {isGhes} from '@actions/artifact/lib/internal/shared/config';
|
||||||
import {getBackendIdsFromToken} from '@actions/artifact/lib/internal/shared/util';
|
import {getBackendIdsFromToken} from '@actions/artifact/lib/internal/shared/util';
|
||||||
import {getExpiration} from '@actions/artifact/lib/internal/upload/retention';
|
import {getExpiration} from '@actions/artifact/lib/internal/upload/retention';
|
||||||
import {InvalidResponseError, NetworkError} from '@actions/artifact';
|
import {InvalidResponseError, NetworkError} from '@actions/artifact';
|
||||||
@@ -68,10 +70,18 @@ export class GitHub {
|
|||||||
return `${github.context.repo.owner}/${github.context.repo.repo}`;
|
return `${github.context.repo.owner}/${github.context.repo.repo}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static workflowRunURL(setAttempts?: boolean): string {
|
static get runId(): number {
|
||||||
|
return process.env.GITHUB_RUN_ID ? +process.env.GITHUB_RUN_ID : github.context.runId;
|
||||||
|
}
|
||||||
|
|
||||||
|
static get runAttempt(): number {
|
||||||
// TODO: runAttempt is not yet part of github.context but will be in a
|
// TODO: runAttempt is not yet part of github.context but will be in a
|
||||||
// future release of @actions/github package: https://github.com/actions/toolkit/commit/faa425440f86f9c16587a19dfb59491253a2c92a
|
// future release of @actions/github package: https://github.com/actions/toolkit/commit/faa425440f86f9c16587a19dfb59491253a2c92a
|
||||||
return `${GitHub.serverURL}/${GitHub.repository}/actions/runs/${github.context.runId}${setAttempts ? `/attempts/${process.env.GITHUB_RUN_ATTEMPT || 1}` : ''}`;
|
return process.env.GITHUB_RUN_ATTEMPT ? +process.env.GITHUB_RUN_ATTEMPT : 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static workflowRunURL(setAttempts?: boolean): string {
|
||||||
|
return `${GitHub.serverURL}/${GitHub.repository}/actions/runs/${GitHub.runId}${setAttempts ? `/attempts/${GitHub.runAttempt}` : ''}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get actionsRuntimeToken(): GitHubActionsRuntimeToken | undefined {
|
static get actionsRuntimeToken(): GitHubActionsRuntimeToken | undefined {
|
||||||
@@ -113,6 +123,10 @@ export class GitHub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static async uploadArtifact(opts: UploadArtifactOpts): Promise<UploadArtifactResponse> {
|
public static async uploadArtifact(opts: UploadArtifactOpts): Promise<UploadArtifactResponse> {
|
||||||
|
if (isGhes()) {
|
||||||
|
throw new Error('@actions/artifact v2.0.0+ is currently not supported on GHES.');
|
||||||
|
}
|
||||||
|
|
||||||
const artifactName = path.basename(opts.filename);
|
const artifactName = path.basename(opts.filename);
|
||||||
const backendIds = getBackendIdsFromToken();
|
const backendIds = getBackendIdsFromToken();
|
||||||
const artifactClient = internalArtifactTwirpClient();
|
const artifactClient = internalArtifactTwirpClient();
|
||||||
@@ -211,9 +225,17 @@ export class GitHub {
|
|||||||
|
|
||||||
const refsSize = Object.keys(opts.exportRes.refs).length;
|
const refsSize = Object.keys(opts.exportRes.refs).length;
|
||||||
|
|
||||||
|
// we just need the last two parts of the URL as they are always relative
|
||||||
|
// to the workflow run URL otherwise URL could be broken if GitHub
|
||||||
|
// repository name is part of a secret value used in the workflow. e.g.:
|
||||||
|
// artifact: https://github.com/docker/actions-toolkit/actions/runs/9552208295/artifacts/1609622746
|
||||||
|
// workflow: https://github.com/docker/actions-toolkit/actions/runs/9552208295
|
||||||
|
// https://github.com/docker/actions-toolkit/issues/367
|
||||||
|
const artifactRelativeURL = `./${GitHub.runId}/${opts.uploadRes.url.split('/').slice(-2).join('/')}`;
|
||||||
|
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
const sum = core.summary
|
const sum = core.summary
|
||||||
.addHeading('Docker Build summary', 1)
|
.addHeading('Docker Build summary', 2)
|
||||||
.addRaw(`<p>`)
|
.addRaw(`<p>`)
|
||||||
.addRaw(`For a detailed look at the build, download the following build record archive and import it into Docker Desktop's Builds view. `)
|
.addRaw(`For a detailed look at the build, download the following build record archive and import it into Docker Desktop's Builds view. `)
|
||||||
.addBreak()
|
.addBreak()
|
||||||
@@ -221,7 +243,7 @@ export class GitHub {
|
|||||||
.addRaw(addLink('Learn more', 'https://docs.docker.com/go/build-summary/'))
|
.addRaw(addLink('Learn more', 'https://docs.docker.com/go/build-summary/'))
|
||||||
.addRaw('</p>')
|
.addRaw('</p>')
|
||||||
.addRaw(`<p>`)
|
.addRaw(`<p>`)
|
||||||
.addRaw(`:arrow_down: ${addLink(`<strong>${opts.uploadRes.filename}</strong>`, opts.uploadRes.url)} (${Util.formatFileSize(opts.uploadRes.size)})`)
|
.addRaw(`:arrow_down: ${addLink(`<strong>${Util.stringToUnicodeEntities(opts.uploadRes.filename)}</strong>`, artifactRelativeURL)} (${Util.formatFileSize(opts.uploadRes.size)})`)
|
||||||
.addBreak()
|
.addBreak()
|
||||||
.addRaw(`This file includes <strong>${refsSize} build record${refsSize > 1 ? 's' : ''}</strong>.`)
|
.addRaw(`This file includes <strong>${refsSize} build record${refsSize > 1 ? 's' : ''}</strong>.`)
|
||||||
.addRaw(`</p>`)
|
.addRaw(`</p>`)
|
||||||
@@ -230,8 +252,8 @@ export class GitHub {
|
|||||||
.addRaw(addLink('Let us know', 'https://docs.docker.com/feedback/gha-build-summary'))
|
.addRaw(addLink('Let us know', 'https://docs.docker.com/feedback/gha-build-summary'))
|
||||||
.addRaw('</p>');
|
.addRaw('</p>');
|
||||||
|
|
||||||
sum.addHeading('Preview', 2);
|
// Preview
|
||||||
|
sum.addRaw(`<strong>Preview</strong>`).addBreak().addRaw('<p>');
|
||||||
const summaryTableData: Array<Array<SummaryTableCell>> = [
|
const summaryTableData: Array<Array<SummaryTableCell>> = [
|
||||||
[
|
[
|
||||||
{header: true, data: 'ID'},
|
{header: true, data: 'ID'},
|
||||||
@@ -241,41 +263,66 @@ export class GitHub {
|
|||||||
{header: true, data: 'Duration'}
|
{header: true, data: 'Duration'}
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
let summaryError: string | undefined;
|
let buildError: string | undefined;
|
||||||
for (const ref in opts.exportRes.summaries) {
|
for (const ref in opts.exportRes.summaries) {
|
||||||
if (Object.prototype.hasOwnProperty.call(opts.exportRes.summaries, ref)) {
|
if (Object.prototype.hasOwnProperty.call(opts.exportRes.summaries, ref)) {
|
||||||
const summary = opts.exportRes.summaries[ref];
|
const summary = opts.exportRes.summaries[ref];
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
summaryTableData.push([
|
summaryTableData.push([
|
||||||
{data: `<code>${ref.substring(0, 6).toUpperCase()}</code>`},
|
{data: `<code>${ref.substring(0, 6).toUpperCase()}</code>`},
|
||||||
{data: `<strong>${summary.name}</strong>`},
|
{data: `<strong>${Util.stringToUnicodeEntities(summary.name)}</strong>`},
|
||||||
{data: `${summary.status === 'completed' ? ':white_check_mark:' : summary.status === 'canceled' ? ':no_entry_sign:' : ':x:'} ${summary.status}`},
|
{data: `${summary.status === 'completed' ? ':white_check_mark:' : summary.status === 'canceled' ? ':no_entry_sign:' : ':x:'} ${summary.status}`},
|
||||||
{data: `${summary.numCachedSteps > 0 ? Math.round((summary.numCachedSteps / summary.numTotalSteps) * 100) : 0}%`},
|
{data: `${summary.numCachedSteps > 0 ? Math.round((summary.numCachedSteps / summary.numTotalSteps) * 100) : 0}%`},
|
||||||
{data: summary.duration}
|
{data: summary.duration}
|
||||||
]);
|
]);
|
||||||
if (summary.error) {
|
if (summary.error) {
|
||||||
summaryError = summary.error;
|
buildError = summary.error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sum.addTable([...summaryTableData]);
|
sum.addTable([...summaryTableData]);
|
||||||
if (summaryError) {
|
sum.addRaw(`</p>`);
|
||||||
sum.addHeading('Error', 4);
|
|
||||||
sum.addCodeBlock(summaryError, 'text');
|
// Build error
|
||||||
|
if (buildError) {
|
||||||
|
sum.addRaw(`<blockquote>`);
|
||||||
|
if (Util.countLines(buildError) > 10) {
|
||||||
|
// prettier-ignore
|
||||||
|
sum
|
||||||
|
.addRaw(`<details><summary><strong>Error</strong></summary>`)
|
||||||
|
.addCodeBlock(he.encode(buildError), 'text')
|
||||||
|
.addRaw(`</details>`);
|
||||||
|
} else {
|
||||||
|
// prettier-ignore
|
||||||
|
sum
|
||||||
|
.addRaw(`<strong>Error</strong>`)
|
||||||
|
.addBreak()
|
||||||
|
.addRaw(`<p>`)
|
||||||
|
.addCodeBlock(he.encode(buildError), 'text')
|
||||||
|
.addRaw(`</p>`);
|
||||||
|
}
|
||||||
|
sum.addRaw(`</blockquote>`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Build inputs
|
||||||
if (opts.inputs) {
|
if (opts.inputs) {
|
||||||
sum.addHeading('Build inputs', 2).addCodeBlock(
|
// prettier-ignore
|
||||||
jsyaml.dump(opts.inputs, {
|
sum.addRaw(`<details><summary><strong>Build inputs</strong></summary>`)
|
||||||
indent: 2,
|
.addCodeBlock(
|
||||||
lineWidth: -1
|
jsyaml.dump(opts.inputs, {
|
||||||
}),
|
indent: 2,
|
||||||
'yaml'
|
lineWidth: -1
|
||||||
);
|
}), 'yaml'
|
||||||
|
)
|
||||||
|
.addRaw(`</details>`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Bake definition
|
||||||
if (opts.bakeDefinition) {
|
if (opts.bakeDefinition) {
|
||||||
sum.addHeading('Bake definition', 2).addCodeBlock(JSON.stringify(opts.bakeDefinition, null, 2), 'json');
|
// prettier-ignore
|
||||||
|
sum.addRaw(`<details><summary><strong>Bake definition</strong></summary>`)
|
||||||
|
.addCodeBlock(JSON.stringify(opts.bakeDefinition, null, 2), 'json')
|
||||||
|
.addRaw(`</details>`);
|
||||||
}
|
}
|
||||||
|
|
||||||
core.info(`Writing summary`);
|
core.info(`Writing summary`);
|
||||||
|
|||||||
10
src/util.ts
10
src/util.ts
@@ -179,4 +179,14 @@ export class Util {
|
|||||||
const bytes = crypto.randomBytes(Math.ceil(length / 2));
|
const bytes = crypto.randomBytes(Math.ceil(length / 2));
|
||||||
return bytes.toString('hex').slice(0, length);
|
return bytes.toString('hex').slice(0, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static stringToUnicodeEntities(str: string) {
|
||||||
|
return Array.from(str)
|
||||||
|
.map(char => `&#x${char.charCodeAt(0).toString(16)};`)
|
||||||
|
.join('');
|
||||||
|
}
|
||||||
|
|
||||||
|
public static countLines(input: string): number {
|
||||||
|
return input.split(/\r\n|\r|\n/).length;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
18
yarn.lock
18
yarn.lock
@@ -1112,6 +1112,7 @@ __metadata:
|
|||||||
"@octokit/plugin-rest-endpoint-methods": ^10.4.0
|
"@octokit/plugin-rest-endpoint-methods": ^10.4.0
|
||||||
"@types/csv-parse": ^1.2.2
|
"@types/csv-parse": ^1.2.2
|
||||||
"@types/gunzip-maybe": ^1.4.2
|
"@types/gunzip-maybe": ^1.4.2
|
||||||
|
"@types/he": ^1.2.3
|
||||||
"@types/js-yaml": ^4.0.9
|
"@types/js-yaml": ^4.0.9
|
||||||
"@types/node": ^20.12.10
|
"@types/node": ^20.12.10
|
||||||
"@types/semver": ^7.5.8
|
"@types/semver": ^7.5.8
|
||||||
@@ -1129,6 +1130,7 @@ __metadata:
|
|||||||
eslint-plugin-prettier: ^5.1.3
|
eslint-plugin-prettier: ^5.1.3
|
||||||
gunzip-maybe: ^1.4.2
|
gunzip-maybe: ^1.4.2
|
||||||
handlebars: ^4.7.8
|
handlebars: ^4.7.8
|
||||||
|
he: ^1.2.0
|
||||||
jest: ^29.7.0
|
jest: ^29.7.0
|
||||||
js-yaml: ^4.1.0
|
js-yaml: ^4.1.0
|
||||||
jwt-decode: ^4.0.0
|
jwt-decode: ^4.0.0
|
||||||
@@ -2175,6 +2177,13 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"@types/he@npm:^1.2.3":
|
||||||
|
version: 1.2.3
|
||||||
|
resolution: "@types/he@npm:1.2.3"
|
||||||
|
checksum: e77851c73dd7b9902d92fe0118a26246a7f3676a3a1c6eb1408305187ef73b57c22550b1435946b983267f961d935554d5d0e1b458416932552f31e763e1aa41
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1":
|
"@types/istanbul-lib-coverage@npm:*, @types/istanbul-lib-coverage@npm:^2.0.0, @types/istanbul-lib-coverage@npm:^2.0.1":
|
||||||
version: 2.0.3
|
version: 2.0.3
|
||||||
resolution: "@types/istanbul-lib-coverage@npm:2.0.3"
|
resolution: "@types/istanbul-lib-coverage@npm:2.0.3"
|
||||||
@@ -4923,6 +4932,15 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
"he@npm:^1.2.0":
|
||||||
|
version: 1.2.0
|
||||||
|
resolution: "he@npm:1.2.0"
|
||||||
|
bin:
|
||||||
|
he: bin/he
|
||||||
|
checksum: 3d4d6babccccd79c5c5a3f929a68af33360d6445587d628087f39a965079d84f18ce9c3d3f917ee1e3978916fc833bb8b29377c3b403f919426f91bc6965e7a7
|
||||||
|
languageName: node
|
||||||
|
linkType: hard
|
||||||
|
|
||||||
"html-escaper@npm:^2.0.0":
|
"html-escaper@npm:^2.0.0":
|
||||||
version: 2.0.2
|
version: 2.0.2
|
||||||
resolution: "html-escaper@npm:2.0.2"
|
resolution: "html-escaper@npm:2.0.2"
|
||||||
|
|||||||
Reference in New Issue
Block a user