Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee6e7bbd95 | ||
|
|
fe58cc26f5 | ||
|
|
1bf4b58db1 | ||
|
|
82d10009f7 | ||
|
|
bf985d0056 | ||
|
|
129955ee04 | ||
|
|
6d74aad91b | ||
|
|
24546185f6 | ||
|
|
1b5c574732 | ||
|
|
2ace0cd1f7 |
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": {
|
||||||
|
|||||||
2
.github/workflows/test.yml
vendored
2
.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:
|
||||||
|
|||||||
@@ -97,7 +97,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');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -31,6 +31,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');
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -131,7 +131,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 +140,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 +158,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,10 @@ 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 {
|
public static workflowRunURL(setAttempts?: boolean): string {
|
||||||
const runID = process.env.GITHUB_RUN_ID || github.context.runId;
|
// TODO: runAttempt is not yet part of github.context but will be in a
|
||||||
const runAttempt = process.env.GITHUB_RUN_ATTEMPT || 1;
|
// future release of @actions/github package: https://github.com/actions/toolkit/commit/faa425440f86f9c16587a19dfb59491253a2c92a
|
||||||
return `${GitHub.serverURL}/${GitHub.repository}/actions/runs/${runID}/attempts/${runAttempt}`;
|
return `${GitHub.serverURL}/${GitHub.repository}/actions/runs/${github.context.runId}${setAttempts ? `/attempts/${process.env.GITHUB_RUN_ATTEMPT || 1}` : ''}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
static get actionsRuntimeToken(): GitHubActionsRuntimeToken | undefined {
|
static get actionsRuntimeToken(): GitHubActionsRuntimeToken | undefined {
|
||||||
@@ -191,7 +191,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 {
|
||||||
|
|||||||
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