Compare commits

..

10 Commits

Author SHA1 Message Date
Tõnis Tiigi
030e881283 Merge pull request #607 from crazy-max/allow-comments
preserve comments in list input values with commentNoInfix
2026-03-05 08:21:07 -08:00
CrazyMax
4b529ac4e5 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-05 17:02:53 +01:00
CrazyMax
b0082b33bc preserve comments in list input values with commentNoInfix
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-05 17:02:53 +01:00
CrazyMax
7b19fec715 Merge pull request #604 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.77.0
chore(deps): Bump @docker/actions-toolkit from 0.68.0 to 0.79.0
2026-03-05 17:00:40 +01:00
CrazyMax
281c9b0599 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-05 09:24:56 +01:00
CrazyMax
5f43b3b4f4 test: stabilize github mock setup since ESM
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-05 09:23:56 +01:00
CrazyMax
9d53276575 github class moved since actions-toolkit v0.77.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-05 09:23:56 +01:00
dependabot[bot]
eaa3d3973e chore(deps): Bump @docker/actions-toolkit from 0.68.0 to 0.77.0
Dependabot couldn't find the original pull request head commit, cdad825a9dc17122e84ab473271a55d7b8b3da06.
2026-03-05 08:21:31 +00:00
Tõnis Tiigi
6b695f7a8a Merge pull request #605 from crazy-max/node24
node 24 as default runtime
2026-03-04 17:36:23 -08:00
CrazyMax
a1afadcb28 node 24 as default runtime
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-04 12:40:47 +01:00
8 changed files with 87 additions and 26 deletions

View File

@@ -79,6 +79,67 @@ describe('getInputs', () => {
tags: [],
}
],
[
3,
new Map<string, string>([
['labels', 'mylabel=foo#bar\n#comment\nanother=bar'],
]),
{
context: context.ContextSource.workflow,
bakeTarget: 'docker-metadata-action',
flavor: [],
githubToken: '',
images: [],
labels: ['mylabel=foo#bar', 'another=bar'],
annotations: [],
sepLabels: '\n',
sepTags: '\n',
sepAnnotations: '\n',
tags: [],
}
],
[
4,
new Map<string, string>([
['annotations', 'org.opencontainers.image.url=https://example.com/path#readme\n#comment\norg.opencontainers.image.source=https://github.com/docker/metadata-action'],
]),
{
context: context.ContextSource.workflow,
bakeTarget: 'docker-metadata-action',
flavor: [],
githubToken: '',
images: [],
labels: [],
annotations: [
'org.opencontainers.image.url=https://example.com/path#readme',
'org.opencontainers.image.source=https://github.com/docker/metadata-action'
],
sepLabels: '\n',
sepTags: '\n',
sepAnnotations: '\n',
tags: [],
}
],
[
5,
new Map<string, string>([
['tags', 'type=raw,value=foo#bar\n#comment'],
['flavor', 'prefix=v#1\n#comment'],
]),
{
context: context.ContextSource.workflow,
bakeTarget: 'docker-metadata-action',
flavor: ['prefix=v#1'],
githubToken: '',
images: [],
labels: [],
annotations: [],
sepLabels: '\n',
sepTags: '\n',
sepAnnotations: '\n',
tags: ['type=raw,value=foo#bar'],
}
],
];
test.each(cases)('[%d] given %o as inputs, returns %o', async (num: number, inputs: Map<string, string>, expected: context.Inputs) => {
inputs.forEach((value: string, name: string) => {

View File

@@ -66,5 +66,5 @@ outputs:
description: 'Bake definition file with tags and labels'
runs:
using: 'node20'
using: 'node24'
main: 'dist/index.js'

View File

@@ -1,6 +1,6 @@
# syntax=docker/dockerfile:1
ARG NODE_VERSION=20
ARG NODE_VERSION=24
FROM node:${NODE_VERSION}-alpine AS base
RUN apk add --no-cache cpio findutils git rsync

2
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@@ -26,7 +26,7 @@
"dependencies": {
"@actions/core": "^3.0.0",
"@actions/github": "^9.0.0",
"@docker/actions-toolkit": "^0.77.0",
"@docker/actions-toolkit": "^0.79.0",
"@renovate/pep440": "^1.0.0",
"csv-parse": "^6.1.0",
"handlebars": "^4.7.8",
@@ -36,7 +36,7 @@
},
"devDependencies": {
"@eslint/js": "^9.39.3",
"@types/node": "^20.19.35",
"@types/node": "^24.11.0",
"@types/semver": "^7.7.1",
"@typescript-eslint/eslint-plugin": "^8.56.1",
"@typescript-eslint/parser": "^8.56.1",

View File

@@ -28,11 +28,11 @@ export interface Inputs {
export function getInputs(): Inputs {
return {
context: (core.getInput('context') || ContextSource.workflow) as ContextSource,
images: Util.getInputList('images', {ignoreComma: true, comment: '#'}),
tags: Util.getInputList('tags', {ignoreComma: true, comment: '#'}),
flavor: Util.getInputList('flavor', {ignoreComma: true, comment: '#'}),
labels: Util.getInputList('labels', {ignoreComma: true, comment: '#'}),
annotations: Util.getInputList('annotations', {ignoreComma: true, comment: '#'}),
images: Util.getInputList('images', {ignoreComma: true, comment: '#', commentNoInfix: true}),
tags: Util.getInputList('tags', {ignoreComma: true, comment: '#', commentNoInfix: true}),
flavor: Util.getInputList('flavor', {ignoreComma: true, comment: '#', commentNoInfix: true}),
labels: Util.getInputList('labels', {ignoreComma: true, comment: '#', commentNoInfix: true}),
annotations: Util.getInputList('annotations', {ignoreComma: true, comment: '#', commentNoInfix: true}),
sepTags: core.getInput('sep-tags', {trimWhitespace: false}) || `\n`,
sepLabels: core.getInput('sep-labels', {trimWhitespace: false}) || `\n`,
sepAnnotations: core.getInput('sep-annotations', {trimWhitespace: false}) || `\n`,

View File

@@ -376,9 +376,9 @@ __metadata:
languageName: node
linkType: hard
"@docker/actions-toolkit@npm:^0.77.0":
version: 0.77.0
resolution: "@docker/actions-toolkit@npm:0.77.0"
"@docker/actions-toolkit@npm:^0.79.0":
version: 0.79.0
resolution: "@docker/actions-toolkit@npm:0.79.0"
dependencies:
"@actions/artifact": "npm:^6.2.0"
"@actions/cache": "npm:^6.0.0"
@@ -402,7 +402,7 @@ __metadata:
semver: "npm:^7.7.4"
tar-stream: "npm:^3.1.7"
tmp: "npm:^0.2.5"
checksum: 10/f3ae817a5a6827efc63d1a1730e918801a8fa33867cda72bd7a1f78309631c45d91de60bc57985c7520fae168e96daed0fcab0003b5fab9b50bdd7aa355d651b
checksum: 10/d64849ba49b2b59e2e93237a70be03fd7c43b1f7f01bac3f7557616ba5f59be785cb12a273bbb6a71c1e0d959f1bc6c673111b587c57bd2d6da105dcc500921a
languageName: node
linkType: hard
@@ -1325,12 +1325,12 @@ __metadata:
languageName: node
linkType: hard
"@types/node@npm:^20.19.35":
version: 20.19.35
resolution: "@types/node@npm:20.19.35"
"@types/node@npm:^24.11.0":
version: 24.11.0
resolution: "@types/node@npm:24.11.0"
dependencies:
undici-types: "npm:~6.21.0"
checksum: 10/f14fa74f9ae4d1109d8a8e3ec31b6518122b3d31c28fd5725cb3eef8ff64d7cf6f8da9c84c78b512e2968006ec325c82a413cc2062da7b3c3230c882e88babba
undici-types: "npm:~7.16.0"
checksum: 10/d2f4f898c6a0f14980e55c697904fb58681729fc46b4e264d5f64dc391b23da73c9b422cfffbca28c045e6e8eca72dab5f28ed633faa95398ef1528af5398382
languageName: node
linkType: hard
@@ -2142,10 +2142,10 @@ __metadata:
dependencies:
"@actions/core": "npm:^3.0.0"
"@actions/github": "npm:^9.0.0"
"@docker/actions-toolkit": "npm:^0.77.0"
"@docker/actions-toolkit": "npm:^0.79.0"
"@eslint/js": "npm:^9.39.3"
"@renovate/pep440": "npm:^1.0.0"
"@types/node": "npm:^20.19.35"
"@types/node": "npm:^24.11.0"
"@types/semver": "npm:^7.7.1"
"@typescript-eslint/eslint-plugin": "npm:^8.56.1"
"@typescript-eslint/parser": "npm:^8.56.1"
@@ -4521,10 +4521,10 @@ __metadata:
languageName: node
linkType: hard
"undici-types@npm:~6.21.0":
version: 6.21.0
resolution: "undici-types@npm:6.21.0"
checksum: 10/ec8f41aa4359d50f9b59fa61fe3efce3477cc681908c8f84354d8567bb3701fafdddf36ef6bff307024d3feb42c837cf6f670314ba37fc8145e219560e473d14
"undici-types@npm:~7.16.0":
version: 7.16.0
resolution: "undici-types@npm:7.16.0"
checksum: 10/db43439f69c2d94cc29f75cbfe9de86df87061d6b0c577ebe9bb3255f49b22c50162a7d7eb413b0458b6510b8ca299ac7cff38c3a29fbd31af9f504bcf7fbc0d
languageName: node
linkType: hard