Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c6fdffd44 | ||
|
|
edcf239f49 | ||
|
|
e26a82d0aa | ||
|
|
3162c096bd | ||
|
|
0da8b903ef | ||
|
|
953dc3bb00 | ||
|
|
f27d52d6b7 | ||
|
|
5c3fc146af | ||
|
|
ef2bd7607f | ||
|
|
6352d92e3f | ||
|
|
a39cb53a8a | ||
|
|
9b811fbceb | ||
|
|
7b876a9e95 | ||
|
|
fd2f683a14 | ||
|
|
5205f4197c | ||
|
|
c76674dd4a | ||
|
|
8471422135 | ||
|
|
e266e3e984 | ||
|
|
1b7201d572 | ||
|
|
6983a397f4 | ||
|
|
81e959d041 | ||
|
|
475cefa34e | ||
|
|
c14688a151 | ||
|
|
dde9860104 | ||
|
|
ee6e7bbd95 | ||
|
|
fe58cc26f5 | ||
|
|
1bf4b58db1 | ||
|
|
82d10009f7 | ||
|
|
bf985d0056 | ||
|
|
129955ee04 | ||
|
|
6d74aad91b | ||
|
|
24546185f6 | ||
|
|
1b5c574732 | ||
|
|
2ace0cd1f7 |
115
.github/buildx-lab-releases.json
vendored
115
.github/buildx-lab-releases.json
vendored
@@ -1,43 +1,84 @@
|
|||||||
{
|
{
|
||||||
"latest": {
|
"latest": {
|
||||||
"id": 155523887,
|
"id": 157588052,
|
||||||
"tag_name": "v0.14.0-desktop.1",
|
"tag_name": "v0.14.1-desktop.1",
|
||||||
"html_url": "https://github.com/docker/buildx-desktop/releases/tag/v0.14.0-desktop.1",
|
"html_url": "https://github.com/docker/buildx-desktop/releases/tag/v0.14.1-desktop.1",
|
||||||
"assets": [
|
"assets": [
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.darwin-amd64",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.darwin-amd64",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.darwin-amd64.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.darwin-amd64.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.darwin-amd64.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.darwin-amd64.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.darwin-arm64",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.darwin-arm64",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.darwin-arm64.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.darwin-arm64.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.darwin-arm64.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.darwin-arm64.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-amd64",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-amd64",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-amd64.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-amd64.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-amd64.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-amd64.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-arm-v6",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-arm-v6",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-arm-v6.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-arm-v6.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-arm-v6.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-arm-v6.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-arm-v7",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-arm-v7",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-arm-v7.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-arm-v7.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-arm-v7.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-arm-v7.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-arm64",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-arm64",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-arm64.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-arm64.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-arm64.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-arm64.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-ppc64le",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-ppc64le",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-ppc64le.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-ppc64le.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-ppc64le.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-ppc64le.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-riscv64",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-riscv64",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-riscv64.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-riscv64.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-riscv64.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-riscv64.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-s390x",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-s390x",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-s390x.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-s390x.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.linux-s390x.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.linux-s390x.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.windows-amd64.exe",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.windows-amd64.exe",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.windows-amd64.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.windows-amd64.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.windows-amd64.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.windows-amd64.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.windows-arm64.exe",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.windows-arm64.exe",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.windows-arm64.provenance.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.windows-arm64.provenance.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/buildx-v0.14.0-desktop.1.windows-arm64.sbom.json",
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.1-desktop.1/buildx-v0.14.1-desktop.1.windows-arm64.sbom.json",
|
||||||
"https://github.com/docker/buildx-desktop/releases/download/v0.14.0-desktop.1/checksums.txt"
|
"https://github.com/docker/buildx-desktop/releases/download/v0.14.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": {
|
||||||
|
|||||||
115
.github/buildx-releases.json
vendored
115
.github/buildx-releases.json
vendored
@@ -1,43 +1,84 @@
|
|||||||
{
|
{
|
||||||
"latest": {
|
"latest": {
|
||||||
"id": 156924662,
|
"id": 159941316,
|
||||||
"tag_name": "v0.14.1",
|
"tag_name": "v0.15.0",
|
||||||
"html_url": "https://github.com/docker/buildx/releases/tag/v0.14.1",
|
"html_url": "https://github.com/docker/buildx/releases/tag/v0.15.0",
|
||||||
"assets": [
|
"assets": [
|
||||||
"https://github.com/docker/buildx/releases/download/v0.14.1/buildx-v0.14.1.darwin-amd64",
|
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.darwin-amd64",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.14.1/buildx-v0.14.1.darwin-amd64.provenance.json",
|
"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.14.1/buildx-v0.14.1.darwin-amd64.sbom.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.14.1/buildx-v0.14.1.darwin-arm64",
|
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.darwin-arm64",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.14.1/buildx-v0.14.1.darwin-arm64.provenance.json",
|
"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.14.1/buildx-v0.14.1.darwin-arm64.sbom.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.14.1/buildx-v0.14.1.linux-amd64",
|
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-amd64",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.14.1/buildx-v0.14.1.linux-amd64.provenance.json",
|
"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.14.1/buildx-v0.14.1.linux-amd64.sbom.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.14.1/buildx-v0.14.1.linux-arm-v6",
|
"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.14.1/buildx-v0.14.1.linux-arm-v6.provenance.json",
|
"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.14.1/buildx-v0.14.1.linux-arm-v6.sbom.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.14.1/buildx-v0.14.1.linux-arm-v7",
|
"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.14.1/buildx-v0.14.1.linux-arm-v7.provenance.json",
|
"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.14.1/buildx-v0.14.1.linux-arm-v7.sbom.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.14.1/buildx-v0.14.1.linux-arm64",
|
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-arm64",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.14.1/buildx-v0.14.1.linux-arm64.provenance.json",
|
"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.14.1/buildx-v0.14.1.linux-arm64.sbom.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.14.1/buildx-v0.14.1.linux-ppc64le",
|
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-ppc64le",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.14.1/buildx-v0.14.1.linux-ppc64le.provenance.json",
|
"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.14.1/buildx-v0.14.1.linux-ppc64le.sbom.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.14.1/buildx-v0.14.1.linux-riscv64",
|
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-riscv64",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.14.1/buildx-v0.14.1.linux-riscv64.provenance.json",
|
"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.14.1/buildx-v0.14.1.linux-riscv64.sbom.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.14.1/buildx-v0.14.1.linux-s390x",
|
"https://github.com/docker/buildx/releases/download/v0.15.0/buildx-v0.15.0.linux-s390x",
|
||||||
"https://github.com/docker/buildx/releases/download/v0.14.1/buildx-v0.14.1.linux-s390x.provenance.json",
|
"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.14.1/buildx-v0.14.1.linux-s390x.sbom.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.14.1/buildx-v0.14.1.windows-amd64.exe",
|
"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.14.1/buildx-v0.14.1.windows-amd64.provenance.json",
|
"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.14.1/buildx-v0.14.1.windows-amd64.sbom.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.14.1/buildx-v0.14.1.windows-arm64.exe",
|
"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.14.1/buildx-v0.14.1.windows-arm64.provenance.json",
|
"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.14.1/buildx-v0.14.1.windows-arm64.sbom.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.14.1/checksums.txt"
|
"https://github.com/docker/buildx/releases/download/v0.15.0/checksums.txt"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"v0.15.0": {
|
||||||
|
"id": 159941316,
|
||||||
|
"tag_name": "v0.15.0",
|
||||||
|
"html_url": "https://github.com/docker/buildx/releases/tag/v0.15.0",
|
||||||
|
"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.0/buildx-v0.15.0.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.0/buildx-v0.15.0.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.0/buildx-v0.15.0.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.0/buildx-v0.15.0.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.0/buildx-v0.15.0.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.0/buildx-v0.15.0.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.0/buildx-v0.15.0.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.0/buildx-v0.15.0.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.0/buildx-v0.15.0.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.0/buildx-v0.15.0.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.0/buildx-v0.15.0.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.0/buildx-v0.15.0.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.0/buildx-v0.15.0.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.0/buildx-v0.15.0.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.0/buildx-v0.15.0.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.0/buildx-v0.15.0.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.0/checksums.txt"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"v0.15.0-rc2": {
|
"v0.15.0-rc2": {
|
||||||
|
|||||||
12
.github/docker-releases.json
vendored
12
.github/docker-releases.json
vendored
@@ -5,6 +5,18 @@
|
|||||||
"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.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": {
|
||||||
|
"id": 160112985,
|
||||||
|
"tag_name": "v27.0.0-rc.1",
|
||||||
|
"html_url": "https://github.com/moby/moby/releases/tag/v27.0.0-rc.1",
|
||||||
|
"assets": []
|
||||||
|
},
|
||||||
"v26.1.4": {
|
"v26.1.4": {
|
||||||
"id": 159031384,
|
"id": 159031384,
|
||||||
"tag_name": "v26.1.4",
|
"tag_name": "v26.1.4",
|
||||||
|
|||||||
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
|
||||||
|
|||||||
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.14.1"
|
BUILDX_VERSION: "v0.15.0"
|
||||||
|
|
||||||
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);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -22,17 +22,11 @@ import * as rimraf from 'rimraf';
|
|||||||
import {Context} from '../../src/context';
|
import {Context} from '../../src/context';
|
||||||
import {Build} from '../../src/buildx/build';
|
import {Build} from '../../src/buildx/build';
|
||||||
|
|
||||||
import {BuildMetadata} from '../../src/types/buildx/build';
|
|
||||||
|
|
||||||
const fixturesDir = path.join(__dirname, '..', 'fixtures');
|
const fixturesDir = path.join(__dirname, '..', 'fixtures');
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
const tmpDir = path.join(process.env.TEMP || '/tmp', 'buildx-inputs-jest');
|
const tmpDir = path.join(process.env.TEMP || '/tmp', 'buildx-inputs-jest');
|
||||||
const tmpName = path.join(tmpDir, '.tmpname-jest');
|
const tmpName = path.join(tmpDir, '.tmpname-jest');
|
||||||
const metadata: BuildMetadata = {
|
const metadata = JSON.parse(fs.readFileSync(path.join(fixturesDir, 'metadata.json'), 'utf-8'));
|
||||||
'buildx.build.ref': 'default/default/n6ibcp9b2pw108rrz7ywdznvo',
|
|
||||||
'containerimage.config.digest': 'sha256:059b68a595b22564a1cbc167f369349fdc2ecc1f7bc092c2235cbf601a795fd',
|
|
||||||
'containerimage.digest': 'sha256:b09b9482c72371486bb2c1d2c2a2633ed1d0b8389e12c8d52b9e052725c0c83c'
|
|
||||||
};
|
|
||||||
|
|
||||||
jest.spyOn(Context, 'tmpDir').mockImplementation((): string => {
|
jest.spyOn(Context, 'tmpDir').mockImplementation((): string => {
|
||||||
if (!fs.existsSync(tmpDir)) {
|
if (!fs.existsSync(tmpDir)) {
|
||||||
@@ -45,10 +39,6 @@ jest.spyOn(Context, 'tmpName').mockImplementation((): string => {
|
|||||||
return tmpName;
|
return tmpName;
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
|
||||||
jest.clearAllMocks();
|
|
||||||
});
|
|
||||||
|
|
||||||
afterEach(() => {
|
afterEach(() => {
|
||||||
rimraf.sync(tmpDir);
|
rimraf.sync(tmpDir);
|
||||||
});
|
});
|
||||||
@@ -78,6 +68,18 @@ describe('resolveRef', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('resolveProvenance', () => {
|
||||||
|
it('matches', async () => {
|
||||||
|
const build = new Build();
|
||||||
|
fs.writeFileSync(build.getMetadataFilePath(), JSON.stringify(metadata));
|
||||||
|
const provenance = build.resolveProvenance();
|
||||||
|
expect(provenance).toBeDefined();
|
||||||
|
expect(provenance?.buildType).toEqual('https://mobyproject.org/buildkit@v1');
|
||||||
|
expect(provenance?.materials).toBeDefined();
|
||||||
|
expect(provenance?.materials?.length).toEqual(2);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe('resolveDigest', () => {
|
describe('resolveDigest', () => {
|
||||||
it('matches', async () => {
|
it('matches', async () => {
|
||||||
const build = new Build();
|
const build = new Build();
|
||||||
|
|||||||
@@ -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');
|
||||||
|
|||||||
45
__tests__/fixtures/metadata.json
Normal file
45
__tests__/fixtures/metadata.json
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
{
|
||||||
|
"buildx.build.provenance": {
|
||||||
|
"buildType": "https://mobyproject.org/buildkit@v1",
|
||||||
|
"materials": [
|
||||||
|
{
|
||||||
|
"uri": "pkg:docker/docker/dockerfile-upstream@master",
|
||||||
|
"digest": {
|
||||||
|
"sha256": "70433342168dafa34d11bd7236c3c3fcf448b90539733281711050808f32e835"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"uri": "pkg:docker/busybox@latest?platform=linux%2Famd64",
|
||||||
|
"digest": {
|
||||||
|
"sha256": "9ae97d36d26566ff84e8893c64a6dc4fe8ca6d1144bf5b87b2b85a32def253c7"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"invocation": {
|
||||||
|
"configSource": {
|
||||||
|
"entryPoint": "Dockerfile"
|
||||||
|
},
|
||||||
|
"parameters": {
|
||||||
|
"frontend": "gateway.v0",
|
||||||
|
"args": {
|
||||||
|
"cmdline": "docker/dockerfile-upstream:master",
|
||||||
|
"source": "docker/dockerfile-upstream:master"
|
||||||
|
},
|
||||||
|
"locals": [
|
||||||
|
{
|
||||||
|
"name": "context"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "dockerfile"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"environment": {
|
||||||
|
"platform": "linux/amd64"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"buildx.build.ref": "default/default/n6ibcp9b2pw108rrz7ywdznvo",
|
||||||
|
"containerimage.config.digest": "sha256:059b68a595b22564a1cbc167f369349fdc2ecc1f7bc092c2235cbf601a795fd",
|
||||||
|
"containerimage.digest": "sha256:b09b9482c72371486bb2c1d2c2a2633ed1d0b8389e12c8d52b9e052725c0c83c"
|
||||||
|
}
|
||||||
@@ -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({
|
||||||
|
|||||||
@@ -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);
|
||||||
@@ -97,7 +93,10 @@ describe('repository', () => {
|
|||||||
|
|
||||||
describe('workflowRunURL', () => {
|
describe('workflowRunURL', () => {
|
||||||
it('returns 2188748038', async () => {
|
it('returns 2188748038', async () => {
|
||||||
expect(GitHub.workflowRunURL).toEqual('https://github.com/docker/actions-toolkit/actions/runs/2188748038/attempts/2');
|
expect(GitHub.workflowRunURL()).toEqual('https://github.com/docker/actions-toolkit/actions/runs/2188748038');
|
||||||
|
});
|
||||||
|
it('returns 2188748038 with attempts 2', async () => {
|
||||||
|
expect(GitHub.workflowRunURL(true)).toEqual('https://github.com/docker/actions-toolkit/actions/runs/2188748038/attempts/2');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -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');
|
||||||
@@ -31,6 +27,12 @@ describe('getInputList', () => {
|
|||||||
expect(res).toEqual(['bar']);
|
expect(res).toEqual(['bar']);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('empty correctly', async () => {
|
||||||
|
setInput('foo', '');
|
||||||
|
const res = Util.getInputList('foo');
|
||||||
|
expect(res).toEqual([]);
|
||||||
|
});
|
||||||
|
|
||||||
it('multiline correctly', async () => {
|
it('multiline correctly', async () => {
|
||||||
setInput('foo', 'bar\nbaz');
|
setInput('foo', 'bar\nbaz');
|
||||||
const res = Util.getInputList('foo');
|
const res = Util.getInputList('foo');
|
||||||
@@ -351,6 +353,33 @@ 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);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// 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.14.1
|
ARG BUILDX_VERSION=0.15.0
|
||||||
|
|
||||||
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'],
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ import {GitHub} from '../github';
|
|||||||
import {Util} from '../util';
|
import {Util} from '../util';
|
||||||
|
|
||||||
import {BuildMetadata} from '../types/buildx/build';
|
import {BuildMetadata} from '../types/buildx/build';
|
||||||
|
import {ProvenancePredicate} from '../types/intoto/slsa_provenance/v0.2/provenance';
|
||||||
|
|
||||||
export interface BuildOpts {
|
export interface BuildOpts {
|
||||||
buildx?: Buildx;
|
buildx?: Buildx;
|
||||||
@@ -82,6 +83,19 @@ export class Build {
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public resolveProvenance(metadata?: BuildMetadata): ProvenancePredicate | undefined {
|
||||||
|
if (!metadata) {
|
||||||
|
metadata = this.resolveMetadata();
|
||||||
|
if (!metadata) {
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ('buildx.build.provenance' in metadata) {
|
||||||
|
return metadata['buildx.build.provenance'] as ProvenancePredicate;
|
||||||
|
}
|
||||||
|
return undefined;
|
||||||
|
}
|
||||||
|
|
||||||
public resolveDigest(metadata?: BuildMetadata): string | undefined {
|
public resolveDigest(metadata?: BuildMetadata): string | undefined {
|
||||||
if (!metadata) {
|
if (!metadata) {
|
||||||
metadata = this.resolveMetadata();
|
metadata = this.resolveMetadata();
|
||||||
@@ -131,7 +145,7 @@ export class Build {
|
|||||||
return input;
|
return input;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
return core.getBooleanInput(name) ? `builder-id=${GitHub.workflowRunURL}` : 'false';
|
return core.getBooleanInput(name) ? `builder-id=${GitHub.workflowRunURL(true)}` : 'false';
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// not a valid boolean, so we assume it's a string
|
// not a valid boolean, so we assume it's a string
|
||||||
return Build.resolveProvenanceAttrs(input);
|
return Build.resolveProvenanceAttrs(input);
|
||||||
@@ -140,7 +154,7 @@ export class Build {
|
|||||||
|
|
||||||
public static resolveProvenanceAttrs(input: string): string {
|
public static resolveProvenanceAttrs(input: string): string {
|
||||||
if (!input) {
|
if (!input) {
|
||||||
return `builder-id=${GitHub.workflowRunURL}`;
|
return `builder-id=${GitHub.workflowRunURL(true)}`;
|
||||||
}
|
}
|
||||||
// parse attributes from input
|
// parse attributes from input
|
||||||
const fields = parse(input, {
|
const fields = parse(input, {
|
||||||
@@ -158,7 +172,7 @@ export class Build {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// if not add builder-id attribute
|
// if not add builder-id attribute
|
||||||
return `${input},builder-id=${GitHub.workflowRunURL}`;
|
return `${input},builder-id=${GitHub.workflowRunURL(true)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static resolveCacheToAttrs(input: string, githubToken?: string): string {
|
public static resolveCacheToAttrs(input: string, githubToken?: string): string {
|
||||||
|
|||||||
@@ -68,10 +68,18 @@ export class GitHub {
|
|||||||
return `${github.context.repo.owner}/${github.context.repo.repo}`;
|
return `${github.context.repo.owner}/${github.context.repo.repo}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get workflowRunURL(): string {
|
static get runId(): number {
|
||||||
const runID = process.env.GITHUB_RUN_ID || github.context.runId;
|
return process.env.GITHUB_RUN_ID ? +process.env.GITHUB_RUN_ID : github.context.runId;
|
||||||
const runAttempt = process.env.GITHUB_RUN_ATTEMPT || 1;
|
}
|
||||||
return `${GitHub.serverURL}/${GitHub.repository}/actions/runs/${runID}/attempts/${runAttempt}`;
|
|
||||||
|
static get runAttempt(): number {
|
||||||
|
// 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
|
||||||
|
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 {
|
||||||
@@ -191,7 +199,7 @@ export class GitHub {
|
|||||||
const artifactId = BigInt(finalizeArtifactResp.artifactId);
|
const artifactId = BigInt(finalizeArtifactResp.artifactId);
|
||||||
core.info(`Artifact successfully finalized (${artifactId})`);
|
core.info(`Artifact successfully finalized (${artifactId})`);
|
||||||
|
|
||||||
const artifactURL = `${GitHub.workflowRunURL}/artifacts/${artifactId}`;
|
const artifactURL = `${GitHub.workflowRunURL()}/artifacts/${artifactId}`;
|
||||||
core.info(`Artifact download URL: ${artifactURL}`);
|
core.info(`Artifact download URL: ${artifactURL}`);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -211,6 +219,14 @@ 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', 1)
|
||||||
@@ -221,7 +237,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>`)
|
||||||
@@ -248,7 +264,7 @@ export class GitHub {
|
|||||||
// 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}
|
||||||
|
|||||||
18
src/types/buildkit/buildkit.ts
Normal file
18
src/types/buildkit/buildkit.ts
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/solver/llbsolver/history.go#L672
|
||||||
|
export const MEDIATYPE_STATUS_V0 = 'application/vnd.buildkit.status.v0';
|
||||||
78
src/types/buildkit/client.ts
Normal file
78
src/types/buildkit/client.ts
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import {Digest} from '../oci/digest';
|
||||||
|
import {ProgressGroup, Range, SourceInfo} from './ops';
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/client/graph.go#L10-L19
|
||||||
|
export interface Vertex {
|
||||||
|
digest?: Digest;
|
||||||
|
inputs?: Array<Digest>;
|
||||||
|
name?: string;
|
||||||
|
started?: Date;
|
||||||
|
completed?: Date;
|
||||||
|
cached?: boolean;
|
||||||
|
error?: string;
|
||||||
|
progressGroup?: ProgressGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/client/graph.go#L21-L30
|
||||||
|
export interface VertexStatus {
|
||||||
|
id: string;
|
||||||
|
vertex?: Digest;
|
||||||
|
name?: string;
|
||||||
|
total?: number;
|
||||||
|
current: number;
|
||||||
|
timestamp?: Date;
|
||||||
|
started?: Date;
|
||||||
|
completed?: Date;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/client/graph.go#L32-L37
|
||||||
|
export interface VertexLog {
|
||||||
|
vertex?: Digest;
|
||||||
|
stream?: number;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
data: any;
|
||||||
|
timestamp: Date;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/client/graph.go#L39-L48
|
||||||
|
export interface VertexWarning {
|
||||||
|
vertex?: Digest;
|
||||||
|
level?: number;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
short?: any;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
detail?: Array<any>;
|
||||||
|
url?: string;
|
||||||
|
|
||||||
|
sourceInfo?: SourceInfo;
|
||||||
|
range?: Array<Range>;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/client/graph.go#L50-L55
|
||||||
|
export interface SolveStatus {
|
||||||
|
vertexes?: Array<Vertex>;
|
||||||
|
statuses?: Array<VertexStatus>;
|
||||||
|
logs?: Array<VertexLog>;
|
||||||
|
warnings?: Array<VertexWarning>;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/client/graph.go#L57-L60
|
||||||
|
export interface SolveResponse {
|
||||||
|
exporterResponse: Record<string, string>;
|
||||||
|
}
|
||||||
108
src/types/buildkit/control.ts
Normal file
108
src/types/buildkit/control.ts
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import {Descriptor} from '../oci/descriptor';
|
||||||
|
import {Digest} from '../oci/digest';
|
||||||
|
import {ProgressGroup, Range, SourceInfo} from './ops';
|
||||||
|
import {RpcStatus} from './rpc';
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/api/services/control/control.pb.go#L1504-L1525
|
||||||
|
export interface BuildHistoryRecord {
|
||||||
|
Ref: string;
|
||||||
|
Frontend: string;
|
||||||
|
FrontendAttrs: Record<string, string>;
|
||||||
|
Exporters: Array<Exporter>;
|
||||||
|
error?: RpcStatus;
|
||||||
|
CreatedAt?: Date;
|
||||||
|
CompletedAt?: Date;
|
||||||
|
logs?: Descriptor;
|
||||||
|
ExporterResponse: Record<string, string>;
|
||||||
|
Result?: BuildResultInfo;
|
||||||
|
Results: Record<string, BuildResultInfo>;
|
||||||
|
Generation: number;
|
||||||
|
trace?: Descriptor;
|
||||||
|
pinned: boolean;
|
||||||
|
numCachedSteps: number;
|
||||||
|
numTotalSteps: number;
|
||||||
|
numCompletedSteps: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/api/services/control/control.pb.go#L1909-L1917
|
||||||
|
export interface Exporter {
|
||||||
|
Type: string;
|
||||||
|
Attrs: Record<string, string>;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/api/services/control/control.pb.go#L1845-L1852
|
||||||
|
export interface BuildResultInfo {
|
||||||
|
ResultDeprecated?: Descriptor;
|
||||||
|
Attestations?: Array<Descriptor>;
|
||||||
|
Results?: Record<number, Descriptor>;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/api/services/control/control.pb.go#L751-L759
|
||||||
|
export interface StatusResponse {
|
||||||
|
vertexes?: Array<Vertex>;
|
||||||
|
statuses?: Array<VertexStatus>;
|
||||||
|
logs?: Array<VertexLog>;
|
||||||
|
warnings?: Array<VertexWarning>;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/api/services/control/control.pb.go#L822-L834
|
||||||
|
export interface Vertex {
|
||||||
|
digest: Digest;
|
||||||
|
inputs: Array<Digest>;
|
||||||
|
name?: string;
|
||||||
|
cached?: boolean;
|
||||||
|
started?: Date;
|
||||||
|
completed?: Date;
|
||||||
|
error?: string;
|
||||||
|
progressGroup?: ProgressGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/api/services/control/control.pb.go#L911-L923
|
||||||
|
export interface VertexStatus {
|
||||||
|
ID?: string;
|
||||||
|
vertex: Digest;
|
||||||
|
name?: string;
|
||||||
|
current?: number;
|
||||||
|
total?: number;
|
||||||
|
timestamp: Date;
|
||||||
|
started?: Date;
|
||||||
|
completed?: Date;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/api/services/control/control.pb.go#L1007-L1015
|
||||||
|
export interface VertexLog {
|
||||||
|
vertex: Digest;
|
||||||
|
timestamp: Date;
|
||||||
|
stream?: number;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
msg?: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/api/services/control/control.pb.go#L1071-L1082
|
||||||
|
export interface VertexWarning {
|
||||||
|
vertex: Digest;
|
||||||
|
level?: number;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
short?: any;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
detail?: Array<any>;
|
||||||
|
url?: string;
|
||||||
|
info?: SourceInfo;
|
||||||
|
ranges?: Array<Range>;
|
||||||
|
}
|
||||||
82
src/types/buildkit/ops.ts
Normal file
82
src/types/buildkit/ops.ts
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/solver/pb/ops.pb.go#L1901-L1909
|
||||||
|
export interface Definition {
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
def?: Array<any>;
|
||||||
|
metadata: Record<string, OpMetadata>;
|
||||||
|
Source?: Source;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/solver/pb/ops.pb.go#L1313-L1323
|
||||||
|
export interface OpMetadata {
|
||||||
|
ignore_cache?: boolean;
|
||||||
|
description?: Record<string, string>;
|
||||||
|
export_cache?: ExportCache;
|
||||||
|
caps: Record<string, boolean>;
|
||||||
|
progress_group?: ProgressGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/solver/pb/ops.pb.go#L1390-L1393
|
||||||
|
export interface Source {
|
||||||
|
locations?: Record<string, Locations>;
|
||||||
|
infos?: Array<SourceInfo>;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/solver/pb/ops.pb.go#L1439-L1441
|
||||||
|
export interface Locations {
|
||||||
|
locations?: Array<Location>;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/solver/pb/ops.pb.go#L1545-L1548
|
||||||
|
export interface Location {
|
||||||
|
sourceIndex?: number;
|
||||||
|
ranges?: Array<Range>;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/solver/pb/ops.pb.go#L1594-L1597
|
||||||
|
export interface Range {
|
||||||
|
start: Position;
|
||||||
|
end: Position;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/solver/pb/ops.pb.go#L1643-L1646
|
||||||
|
export interface Position {
|
||||||
|
line: number;
|
||||||
|
character: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/solver/pb/ops.pb.go#L1480-L1485
|
||||||
|
export interface SourceInfo {
|
||||||
|
filename?: string;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
data?: any;
|
||||||
|
definition?: Definition;
|
||||||
|
language?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/solver/pb/ops.pb.go#L1691-L1693
|
||||||
|
export interface ExportCache {
|
||||||
|
Value?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/solver/pb/ops.pb.go#L1731-L1735
|
||||||
|
export interface ProgressGroup {
|
||||||
|
id?: string;
|
||||||
|
name?: string;
|
||||||
|
weak?: boolean;
|
||||||
|
}
|
||||||
31
src/types/buildkit/rpc.ts
Normal file
31
src/types/buildkit/rpc.ts
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/vendor/github.com/gogo/googleapis/google/rpc/status.pb.go#L36-L49
|
||||||
|
export interface RpcStatus {
|
||||||
|
code: number;
|
||||||
|
message: string;
|
||||||
|
details: Array<RpcAny>;
|
||||||
|
}
|
||||||
|
|
||||||
|
// https://github.com/moby/buildkit/blob/v0.14.0/vendor/github.com/gogo/protobuf/types/any.pb.go#L108-L143
|
||||||
|
// Define properties based on google.protobuf.Any. For simplicity, assuming it
|
||||||
|
// has at least a type_url and a value.
|
||||||
|
export interface RpcAny {
|
||||||
|
type_url: string;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
value: any;
|
||||||
|
}
|
||||||
@@ -15,5 +15,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export type BuildMetadata = {
|
export type BuildMetadata = {
|
||||||
[key: string]: string;
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
[key: string]: any;
|
||||||
};
|
};
|
||||||
|
|||||||
20
src/types/intoto/intoto.ts
Normal file
20
src/types/intoto/intoto.ts
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// https://github.com/in-toto/in-toto-golang/blob/dd6278764ab1dae7301609c7510129888e2fd569/in_toto/envelope.go#L17
|
||||||
|
export const MEDIATYPE_PAYLOAD = 'application/vnd.in-toto+json';
|
||||||
|
|
||||||
|
export const MEDIATYPE_PREDICATE = 'in-toto.io/predicate-type';
|
||||||
69
src/types/intoto/slsa_provenance/v0.2/provenance.ts
Normal file
69
src/types/intoto/slsa_provenance/v0.2/provenance.ts
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
/**
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
// https://github.com/in-toto/in-toto-golang/blob/master/in_toto/slsa_provenance/v0.2/provenance.go
|
||||||
|
|
||||||
|
export const PREDICATE_SLSA_PROVENANCE = 'https://slsa.dev/provenance/v0.2';
|
||||||
|
|
||||||
|
export interface ProvenancePredicate {
|
||||||
|
builder: ProvenanceBuilder;
|
||||||
|
buildType: string;
|
||||||
|
invocation?: ProvenanceInvocation;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
buildConfig?: any;
|
||||||
|
metadata: ProvenanceMetadata;
|
||||||
|
materials?: Material[];
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProvenanceBuilder {
|
||||||
|
id: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProvenanceInvocation {
|
||||||
|
configSource?: ConfigSource;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
parameters?: any;
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
environment?: any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface DigestSet {
|
||||||
|
[key: string]: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ConfigSource {
|
||||||
|
uri?: string;
|
||||||
|
digest?: DigestSet;
|
||||||
|
entryPoint?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Completeness {
|
||||||
|
parameters?: boolean;
|
||||||
|
environment?: boolean;
|
||||||
|
materials?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ProvenanceMetadata {
|
||||||
|
buildInvocationId?: string;
|
||||||
|
buildStartedOn?: string;
|
||||||
|
completeness?: Completeness;
|
||||||
|
reproducible?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface Material {
|
||||||
|
uri: string;
|
||||||
|
digest: DigestSet;
|
||||||
|
}
|
||||||
@@ -179,4 +179,10 @@ 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('');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
16
yarn.lock
16
yarn.lock
@@ -2956,11 +2956,11 @@ __metadata:
|
|||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"braces@npm:^3.0.1":
|
"braces@npm:^3.0.1":
|
||||||
version: 3.0.2
|
version: 3.0.3
|
||||||
resolution: "braces@npm:3.0.2"
|
resolution: "braces@npm:3.0.3"
|
||||||
dependencies:
|
dependencies:
|
||||||
fill-range: ^7.0.1
|
fill-range: ^7.1.1
|
||||||
checksum: e2a8e769a863f3d4ee887b5fe21f63193a891c68b612ddb4b68d82d1b5f3ff9073af066c343e9867a393fe4c2555dcb33e89b937195feb9c1613d259edfcd459
|
checksum: b95aa0b3bd909f6cd1720ffcf031aeaf46154dd88b4da01f9a1d3f7ea866a79eba76a6d01cbc3c422b2ee5cdc39a4f02491058d5df0d7bf6e6a162a832df1f69
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -4356,12 +4356,12 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"fill-range@npm:^7.0.1":
|
"fill-range@npm:^7.1.1":
|
||||||
version: 7.0.1
|
version: 7.1.1
|
||||||
resolution: "fill-range@npm:7.0.1"
|
resolution: "fill-range@npm:7.1.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
to-regex-range: ^5.0.1
|
to-regex-range: ^5.0.1
|
||||||
checksum: cc283f4e65b504259e64fd969bcf4def4eb08d85565e906b7d36516e87819db52029a76b6363d0f02d0d532f0033c9603b9e2d943d56ee3b0d4f7ad3328ff917
|
checksum: b4abfbca3839a3d55e4ae5ec62e131e2e356bf4859ce8480c64c4876100f4df292a63e5bb1618e1d7460282ca2b305653064f01654474aa35c68000980f17798
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user