Compare commits

...

24 Commits

Author SHA1 Message Date
CrazyMax
1107934206 Merge pull request #622 from crazy-max/codeql
ci: enable SAST scanning with CodeQL
2026-03-20 16:57:23 +01:00
CrazyMax
50e32640d5 ci: enable SAST scanning with CodeQL
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-20 11:51:51 +01:00
CrazyMax
d24d429af2 Merge pull request #619 from docker/dependabot/npm_and_yarn/moment-timezone-0.6.1
chore(deps): Bump moment-timezone from 0.6.0 to 0.6.1
2026-03-18 23:06:56 +01:00
github-actions[bot]
d3cc762016 chore: update generated content 2026-03-18 19:24:41 +00:00
dependabot[bot]
e724a31677 chore(deps): Bump moment-timezone from 0.6.0 to 0.6.1
Bumps [moment-timezone](https://github.com/moment/moment-timezone) from 0.6.0 to 0.6.1.
- [Release notes](https://github.com/moment/moment-timezone/releases)
- [Changelog](https://github.com/moment/moment-timezone/blob/develop/changelog.md)
- [Commits](https://github.com/moment/moment-timezone/compare/0.6.0...0.6.1)

---
updated-dependencies:
- dependency-name: moment-timezone
  dependency-version: 0.6.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-18 19:23:34 +00:00
Tõnis Tiigi
dde548f160 Merge pull request #608 from crazy-max/update-readme
readme: update to v6
2026-03-16 17:57:09 -07:00
Tõnis Tiigi
b13d25e5fc Merge pull request #609 from docker/dependabot/github_actions/docker/bake-action-7
chore(deps): Bump docker/bake-action from 6 to 7
2026-03-09 12:35:19 -07:00
CrazyMax
f58488e265 Merge pull request #612 from docker/dependabot/github_actions/docker/build-push-action-7
chore(deps): Bump docker/build-push-action from 6 to 7
2026-03-09 16:25:29 +01:00
CrazyMax
414af88e96 ci: switch to matrix subaction
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-09 16:22:40 +01:00
dependabot[bot]
2c2d4fb584 chore(deps): Bump docker/build-push-action from 6 to 7
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6 to 7.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-06 19:22:22 +00:00
CrazyMax
85e876bd3a Merge pull request #610 from docker/dependabot/github_actions/docker/setup-buildx-action-4
chore(deps): Bump docker/setup-buildx-action from 3 to 4
2026-03-06 09:54:50 +01:00
CrazyMax
0b0903be56 readme: update to v6
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-05 22:25:27 +01:00
dependabot[bot]
e2d26b25bd chore(deps): Bump docker/setup-buildx-action from 3 to 4
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-05 19:22:33 +00:00
dependabot[bot]
a26abf68b2 chore(deps): Bump docker/bake-action from 6 to 7
Bumps [docker/bake-action](https://github.com/docker/bake-action) from 6 to 7.
- [Release notes](https://github.com/docker/bake-action/releases)
- [Commits](https://github.com/docker/bake-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: docker/bake-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-05 19:22:30 +00:00
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
17 changed files with 813 additions and 1324 deletions

View File

@@ -46,7 +46,7 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v4
with: with:
version: ${{ env.BUILDX_VERSION }} version: ${{ env.BUILDX_VERSION }}
driver: docker driver: docker
@@ -83,7 +83,7 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v4
with: with:
version: ${{ env.BUILDX_VERSION }} version: ${{ env.BUILDX_VERSION }}
driver: docker driver: docker
@@ -119,7 +119,7 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v4
with: with:
version: ${{ env.BUILDX_VERSION }} version: ${{ env.BUILDX_VERSION }}
driver: docker driver: docker
@@ -153,7 +153,7 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v4
with: with:
version: ${{ env.BUILDX_VERSION }} version: ${{ env.BUILDX_VERSION }}
driver: docker driver: docker
@@ -184,7 +184,7 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v4
with: with:
version: ${{ env.BUILDX_VERSION }} version: ${{ env.BUILDX_VERSION }}
driver: docker driver: docker
@@ -207,7 +207,7 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v4
with: with:
version: ${{ env.BUILDX_VERSION }} version: ${{ env.BUILDX_VERSION }}
driver: docker driver: docker
@@ -228,7 +228,7 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v4
with: with:
version: ${{ env.BUILDX_VERSION }} version: ${{ env.BUILDX_VERSION }}
driver: docker driver: docker
@@ -258,7 +258,7 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v4
with: with:
version: ${{ env.BUILDX_VERSION }} version: ${{ env.BUILDX_VERSION }}
driver: docker driver: docker
@@ -288,7 +288,7 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v4
with: with:
version: ${{ env.BUILDX_VERSION }} version: ${{ env.BUILDX_VERSION }}
driver: docker driver: docker
@@ -323,7 +323,7 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v4
with: with:
version: ${{ env.BUILDX_VERSION }} version: ${{ env.BUILDX_VERSION }}
driver-opts: network=host driver-opts: network=host
@@ -345,7 +345,7 @@ jobs:
type=sha type=sha
- -
name: Build and push to local registry name: Build and push to local registry
uses: docker/build-push-action@v6 uses: docker/build-push-action@v7
with: with:
context: ./test context: ./test
file: ./test/Dockerfile file: ./test/Dockerfile
@@ -371,7 +371,7 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v4
with: with:
version: ${{ env.BUILDX_VERSION }} version: ${{ env.BUILDX_VERSION }}
- -
@@ -393,7 +393,7 @@ jobs:
type=sha type=sha
- -
name: Build name: Build
uses: docker/bake-action@v6 uses: docker/bake-action@v7
with: with:
files: | files: |
./test/docker-bake.hcl ./test/docker-bake.hcl
@@ -416,7 +416,7 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v4
with: with:
version: ${{ env.BUILDX_VERSION }} version: ${{ env.BUILDX_VERSION }}
driver: docker driver: docker
@@ -444,7 +444,7 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v4
with: with:
version: ${{ env.BUILDX_VERSION }} version: ${{ env.BUILDX_VERSION }}
driver: docker driver: docker
@@ -462,7 +462,7 @@ jobs:
maintainer=Foo maintainer=Foo
- -
name: Build name: Build
uses: docker/build-push-action@v6 uses: docker/build-push-action@v7
with: with:
context: ./test context: ./test
file: ./test/output.Dockerfile file: ./test/output.Dockerfile
@@ -507,7 +507,7 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v4
with: with:
version: ${{ env.BUILDX_VERSION }} version: ${{ env.BUILDX_VERSION }}
- -
@@ -531,7 +531,7 @@ jobs:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
- -
name: Build name: Build
uses: docker/bake-action@v6 uses: docker/bake-action@v7
with: with:
files: | files: |
./test/docker-bake.hcl ./test/docker-bake.hcl
@@ -548,7 +548,7 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v4
with: with:
version: ${{ env.BUILDX_VERSION }} version: ${{ env.BUILDX_VERSION }}
driver: docker driver: docker
@@ -574,7 +574,7 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v4
with: with:
version: latest version: latest
- -
@@ -583,7 +583,7 @@ jobs:
uses: ./ uses: ./
- -
name: Build name: Build
uses: docker/bake-action@v6 uses: docker/bake-action@v7
with: with:
source: . source: .
files: | files: |
@@ -607,7 +607,7 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3 uses: docker/setup-buildx-action@v4
with: with:
version: ${{ env.BUILDX_VERSION }} version: ${{ env.BUILDX_VERSION }}
driver: docker driver: docker

45
.github/workflows/codeql.yml vendored Normal file
View File

@@ -0,0 +1,45 @@
name: codeql
on:
push:
branches:
- 'master'
- 'releases/v*'
pull_request:
permissions:
actions: read
contents: read
security-events: write
env:
NODE_VERSION: "24"
jobs:
analyze:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v6
-
name: Enable corepack
run: |
corepack enable
yarn --version
-
name: Set up Node
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
-
name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: javascript-typescript
build-mode: none
-
name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:javascript-typescript"

View File

@@ -20,7 +20,7 @@ jobs:
uses: actions/checkout@v6 uses: actions/checkout@v6
- -
name: Test name: Test
uses: docker/bake-action@v6 uses: docker/bake-action@v7
with: with:
source: . source: .
targets: test targets: test

View File

@@ -28,7 +28,7 @@ jobs:
token: ${{ steps.docker-read-app.outputs.token || github.token }} token: ${{ steps.docker-read-app.outputs.token || github.token }}
- -
name: Build name: Build
uses: docker/bake-action@v6 uses: docker/bake-action@v7
with: with:
source: . source: .
targets: build targets: build

View File

@@ -15,15 +15,15 @@ jobs:
prepare: prepare:
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
targets: ${{ steps.generate.outputs.targets }} matrix: ${{ steps.generate.outputs.matrix }}
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v6 uses: actions/checkout@v6
- -
name: List targets name: Generate matrix
id: generate id: generate
uses: docker/bake-action/subaction/list-targets@v6 uses: docker/bake-action/subaction/matrix@v7
with: with:
target: validate target: validate
@@ -34,10 +34,10 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
target: ${{ fromJson(needs.prepare.outputs.targets) }} include: ${{ fromJson(needs.prepare.outputs.matrix) }}
steps: steps:
- -
name: Validate name: Validate
uses: docker/bake-action@v6 uses: docker/bake-action@v7
with: with:
targets: ${{ matrix.target }} targets: ${{ matrix.target }}

View File

@@ -75,27 +75,23 @@ jobs:
docker: docker:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
-
name: Checkout
uses: actions/checkout@v6
- -
name: Docker meta name: Docker meta
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v6
with: with:
images: name/app images: name/app
- -
name: Login to DockerHub name: Login to DockerHub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v3 uses: docker/login-action@v4
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v6 uses: docker/build-push-action@v7
with: with:
context: .
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
@@ -129,13 +125,10 @@ jobs:
docker: docker:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
-
name: Checkout
uses: actions/checkout@v6
- -
name: Docker meta name: Docker meta
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v6
with: with:
images: | images: |
name/app name/app
@@ -147,15 +140,14 @@ jobs:
- -
name: Login to DockerHub name: Login to DockerHub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v3 uses: docker/login-action@v4
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v6 uses: docker/build-push-action@v7
with: with:
context: .
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
@@ -210,7 +202,7 @@ jobs:
- -
name: Docker meta name: Docker meta
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v6
with: with:
images: | images: |
name/app name/app
@@ -222,7 +214,7 @@ jobs:
type=sha type=sha
- -
name: Build name: Build
uses: docker/bake-action@v6 uses: docker/bake-action@v7
with: with:
files: | files: |
./docker-bake.hcl ./docker-bake.hcl
@@ -269,7 +261,7 @@ similar to the previous one:
```yaml ```yaml
- -
name: Build name: Build
uses: docker/bake-action@v6 uses: docker/bake-action@v7
with: with:
files: | files: |
./docker-bake.hcl ./docker-bake.hcl
@@ -336,7 +328,7 @@ Alternatively, each output is also exported as an environment variable when `DOC
So it can be used with our [Docker Build Push action](https://github.com/docker/build-push-action/): So it can be used with our [Docker Build Push action](https://github.com/docker/build-push-action/):
```yaml ```yaml
- uses: docker/build-push-action@v6 - uses: docker/build-push-action@v7
with: with:
build-args: | build-args: |
DOCKER_METADATA_OUTPUT_JSON DOCKER_METADATA_OUTPUT_JSON
@@ -728,7 +720,7 @@ increase this length for larger repositories by setting the
- -
name: Docker meta name: Docker meta
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v6
with: with:
images: | images: |
name/app name/app
@@ -939,13 +931,13 @@ that you can reuse them further in your workflow using the [`fromJSON` function]
```yaml ```yaml
- -
name: Docker meta name: Docker meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v6
id: meta id: meta
with: with:
images: name/app images: name/app
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v6 uses: docker/build-push-action@v7
with: with:
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
@@ -965,7 +957,7 @@ this:
- -
name: Docker meta name: Docker meta
id: meta id: meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v6
with: with:
images: name/app images: name/app
labels: | labels: |
@@ -987,12 +979,12 @@ of the `metadata-action`:
```yaml ```yaml
- -
name: Docker meta name: Docker meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v6
with: with:
images: name/app images: name/app
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v6 uses: docker/build-push-action@v7
with: with:
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
annotations: ${{ steps.meta.outputs.annotations }} annotations: ${{ steps.meta.outputs.annotations }}
@@ -1003,12 +995,12 @@ The same can be done with the [`bake-action`](https://github.com/docker/bake-act
```yaml ```yaml
- -
name: Docker meta name: Docker meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v6
with: with:
images: name/app images: name/app
- -
name: Build name: Build
uses: docker/bake-action@v6 uses: docker/bake-action@v7
with: with:
files: | files: |
./docker-bake.hcl ./docker-bake.hcl
@@ -1032,14 +1024,14 @@ Please consult the documentation of your registry.
```yaml ```yaml
- -
name: Docker meta name: Docker meta
uses: docker/metadata-action@v5 uses: docker/metadata-action@v6
with: with:
images: name/app images: name/app
env: env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index DOCKER_METADATA_ANNOTATIONS_LEVELS: manifest,index
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v6 uses: docker/build-push-action@v7
with: with:
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
annotations: ${{ steps.meta.outputs.annotations }} annotations: ${{ steps.meta.outputs.annotations }}

View File

@@ -79,6 +79,67 @@ describe('getInputs', () => {
tags: [], 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) => { 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) => { inputs.forEach((value: string, name: string) => {

View File

@@ -3,9 +3,9 @@ import * as fs from 'fs';
import * as path from 'path'; import * as path from 'path';
import * as dotenv from 'dotenv'; import * as dotenv from 'dotenv';
import {GitHub} from '@docker/actions-toolkit/lib/github.js'; import {GitHub} from '@docker/actions-toolkit/lib/github/github.js';
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit.js'; import {Toolkit} from '@docker/actions-toolkit/lib/toolkit.js';
import {GitHubRepo} from '@docker/actions-toolkit/lib/types/github.js'; import {GitHubRepo} from '@docker/actions-toolkit/lib/types/github/github.js';
import {ContextSource, getContext, getInputs, Inputs} from '../src/context.js'; import {ContextSource, getContext, getInputs, Inputs} from '../src/context.js';
import type {Context as MetadataContext} from '../src/context.js'; import type {Context as MetadataContext} from '../src/context.js';

View File

@@ -1,259 +1,252 @@
import fs from 'node:fs'; import fs from 'node:fs';
import {createRequire} from 'node:module';
import os from 'node:os'; import os from 'node:os';
import path from 'node:path'; import path from 'node:path';
import {vi} from 'vitest'; import {vi} from 'vitest';
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-metadata-action-')); const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-metadata-action-'));
const githubPayload = {
after: '860c1904a1ce19322e91ac35af1ab07466440c37',
base_ref: null,
before: '5f3331d7f7044c18ca9f12c77d961c4d7cf3276a',
commits: [
{
author: {
email: 'crazy-max@users.noreply.github.com',
name: 'CrazyMax',
username: 'crazy-max'
},
committer: {
email: 'crazy-max@users.noreply.github.com',
name: 'CrazyMax',
username: 'crazy-max'
},
distinct: true,
id: '5f3331d7f7044c18ca9f12c77d961c4d7cf3276a',
message: 'hello dev',
timestamp: '2024-11-13T13:42:28Z',
tree_id: 'd2c60af597e863787d2d27f569e30495b0b92820',
url: 'https://github.com/docker/test-docker-action/commit/5f3331d7f7044c18ca9f12c77d961c4d7cf3276a'
}
],
compare: 'https://github.com/docker/test-docker-action/compare/5f3331d7f704...860c1904a1ce',
created: false,
deleted: false,
forced: false,
head_commit: {
author: {
email: 'crazy-max@users.noreply.github.com',
name: 'CrazyMax',
username: 'crazy-max'
},
committer: {
email: 'crazy-max@users.noreply.github.com',
name: 'CrazyMax',
username: 'crazy-max'
},
distinct: true,
id: '5f3331d7f7044c18ca9f12c77d961c4d7cf3276a',
message: 'hello dev',
timestamp: '2024-11-13T13:42:28Z',
tree_id: 'd2c60af597e863787d2d27f569e30495b0b92820',
url: 'https://github.com/docker/test-docker-action/commit/5f3331d7f7044c18ca9f12c77d961c4d7cf3276a'
},
organization: {
avatar_url: 'https://avatars.githubusercontent.com/u/5429470?v=4',
description: 'Docker helps developers bring their ideas to life by conquering the complexity of app development.',
events_url: 'https://api.github.com/orgs/docker/events',
hooks_url: 'https://api.github.com/orgs/docker/hooks',
id: 5429470,
issues_url: 'https://api.github.com/orgs/docker/issues',
login: 'docker',
members_url: 'https://api.github.com/orgs/docker/members{/member}',
node_id: 'MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=',
public_members_url: 'https://api.github.com/orgs/docker/public_members{/member}',
repos_url: 'https://api.github.com/orgs/docker/repos',
url: 'https://api.github.com/orgs/docker'
},
pusher: {
email: 'github@crazymax.dev',
name: 'crazy-max'
},
ref: 'refs/heads/dev',
repository: {
allow_forking: true,
archive_url: 'https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}',
archived: false,
assignees_url: 'https://api.github.com/repos/docker/test-docker-action/assignees{/user}',
blobs_url: 'https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}',
branches_url: 'https://api.github.com/repos/docker/test-docker-action/branches{/branch}',
clone_url: 'https://github.com/docker/test-docker-action.git',
collaborators_url: 'https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}',
comments_url: 'https://api.github.com/repos/docker/test-docker-action/comments{/number}',
commits_url: 'https://api.github.com/repos/docker/test-docker-action/commits{/sha}',
compare_url: 'https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}',
contents_url: 'https://api.github.com/repos/docker/test-docker-action/contents/{+path}',
contributors_url: 'https://api.github.com/repos/docker/test-docker-action/contributors',
created_at: 1596792180,
default_branch: 'master',
deployments_url: 'https://api.github.com/repos/docker/test-docker-action/deployments',
description: 'Test "Docker" Actions',
disabled: false,
downloads_url: 'https://api.github.com/repos/docker/test-docker-action/downloads',
events_url: 'https://api.github.com/repos/docker/test-docker-action/events',
fork: false,
forks: 1,
forks_count: 1,
forks_url: 'https://api.github.com/repos/docker/test-docker-action/forks',
full_name: 'docker/test-docker-action',
git_commits_url: 'https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}',
git_refs_url: 'https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}',
git_tags_url: 'https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}',
git_url: 'git://github.com/docker/test-docker-action.git',
has_downloads: true,
has_issues: true,
has_pages: false,
has_projects: true,
has_wiki: true,
homepage: '',
hooks_url: 'https://api.github.com/repos/docker/test-docker-action/hooks',
html_url: 'https://github.com/docker/test-docker-action',
id: 285789493,
is_template: false,
issue_comment_url: 'https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}',
issue_events_url: 'https://api.github.com/repos/docker/test-docker-action/issues/events{/number}',
issues_url: 'https://api.github.com/repos/docker/test-docker-action/issues{/number}',
keys_url: 'https://api.github.com/repos/docker/test-docker-action/keys{/key_id}',
labels_url: 'https://api.github.com/repos/docker/test-docker-action/labels{/name}',
language: 'JavaScript',
languages_url: 'https://api.github.com/repos/docker/test-docker-action/languages',
license: {
key: 'mit',
name: 'MIT License',
node_id: 'MDc6TGljZW5zZTEz',
spdx_id: 'MIT',
url: 'https://api.github.com/licenses/mit'
},
master_branch: 'master',
merges_url: 'https://api.github.com/repos/docker/test-docker-action/merges',
milestones_url: 'https://api.github.com/repos/docker/test-docker-action/milestones{/number}',
mirror_url: null,
name: 'test-docker-action',
node_id: 'MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=',
notifications_url: 'https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}',
open_issues: 6,
open_issues_count: 6,
organization: 'docker',
owner: {
avatar_url: 'https://avatars.githubusercontent.com/u/5429470?v=4',
email: 'info@docker.com',
events_url: 'https://api.github.com/users/docker/events{/privacy}',
followers_url: 'https://api.github.com/users/docker/followers',
following_url: 'https://api.github.com/users/docker/following{/other_user}',
gists_url: 'https://api.github.com/users/docker/gists{/gist_id}',
gravatar_id: '',
html_url: 'https://github.com/docker',
id: 5429470,
login: 'docker',
name: 'docker',
node_id: 'MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=',
organizations_url: 'https://api.github.com/users/docker/orgs',
received_events_url: 'https://api.github.com/users/docker/received_events',
repos_url: 'https://api.github.com/users/docker/repos',
site_admin: false,
starred_url: 'https://api.github.com/users/docker/starred{/owner}{/repo}',
subscriptions_url: 'https://api.github.com/users/docker/subscriptions',
type: 'Organization',
url: 'https://api.github.com/users/docker'
},
private: true,
pulls_url: 'https://api.github.com/repos/docker/test-docker-action/pulls{/number}',
pushed_at: 1650360446,
releases_url: 'https://api.github.com/repos/docker/test-docker-action/releases{/id}',
size: 796,
ssh_url: 'git@github.com:docker/test-docker-action.git',
stargazers: 0,
stargazers_count: 0,
stargazers_url: 'https://api.github.com/repos/docker/test-docker-action/stargazers',
statuses_url: 'https://api.github.com/repos/docker/test-docker-action/statuses/{sha}',
subscribers_url: 'https://api.github.com/repos/docker/test-docker-action/subscribers',
subscription_url: 'https://api.github.com/repos/docker/test-docker-action/subscription',
svn_url: 'https://github.com/docker/test-docker-action',
tags_url: 'https://api.github.com/repos/docker/test-docker-action/tags',
teams_url: 'https://api.github.com/repos/docker/test-docker-action/teams',
topics: [],
trees_url: 'https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}',
updated_at: '2022-04-19T09:05:09Z',
url: 'https://github.com/docker/test-docker-action',
visibility: 'private',
watchers: 0,
watchers_count: 0
},
sender: {
avatar_url: 'https://avatars.githubusercontent.com/u/1951866?v=4',
events_url: 'https://api.github.com/users/crazy-max/events{/privacy}',
followers_url: 'https://api.github.com/users/crazy-max/followers',
following_url: 'https://api.github.com/users/crazy-max/following{/other_user}',
gists_url: 'https://api.github.com/users/crazy-max/gists{/gist_id}',
gravatar_id: '',
html_url: 'https://github.com/crazy-max',
id: 1951866,
login: 'crazy-max',
node_id: 'MDQ6VXNlcjE5NTE4NjY=',
organizations_url: 'https://api.github.com/users/crazy-max/orgs',
received_events_url: 'https://api.github.com/users/crazy-max/received_events',
repos_url: 'https://api.github.com/users/crazy-max/repos',
site_admin: false,
starred_url: 'https://api.github.com/users/crazy-max/starred{/owner}{/repo}',
subscriptions_url: 'https://api.github.com/users/crazy-max/subscriptions',
type: 'User',
url: 'https://api.github.com/users/crazy-max'
}
};
const githubEventPath = path.join(tmpDir, 'github-event.json');
fs.writeFileSync(githubEventPath, JSON.stringify(githubPayload));
process.env = Object.assign({}, process.env, { process.env = Object.assign({}, process.env, {
TEMP: tmpDir, TEMP: tmpDir,
GITHUB_REPOSITORY: 'docker/metadata-action', GITHUB_REPOSITORY: 'docker/metadata-action',
GITHUB_REF: 'refs/heads/dev',
GITHUB_RUN_ID: '2188748038',
GITHUB_RUN_ATTEMPT: '1',
GITHUB_RUN_NUMBER: '15',
GITHUB_SHA: '5f3331d7f7044c18ca9f12c77d961c4d7cf3276a',
GITHUB_EVENT_PATH: githubEventPath,
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')
}); });
const require = createRequire(import.meta.url); const getCommitMock = vi.hoisted(() =>
type RequireCacheEntry = NonNullable<(typeof require.cache)[string]>; vi.fn(async () => ({
data: {
const githubMock = { commit: {
context: {
repo: {
owner: 'docker',
repo: 'actions-toolkit'
},
ref: 'refs/heads/dev',
sha: '5f3331d7f7044c18ca9f12c77d961c4d7cf3276a',
runId: 2188748038,
runNumber: 15,
payload: {
after: '860c1904a1ce19322e91ac35af1ab07466440c37',
base_ref: null,
before: '5f3331d7f7044c18ca9f12c77d961c4d7cf3276a',
commits: [
{
author: {
email: 'crazy-max@users.noreply.github.com',
name: 'CrazyMax',
username: 'crazy-max'
},
committer: {
email: 'crazy-max@users.noreply.github.com',
name: 'CrazyMax',
username: 'crazy-max'
},
distinct: true,
id: '860c1904a1ce19322e91ac35af1ab07466440c37',
message: 'hello dev',
timestamp: '2022-04-19T11:27:24+02:00',
tree_id: 'd2c60af597e863787d2d27f569e30495b0b92820',
url: 'https://github.com/docker/test-docker-action/commit/860c1904a1ce19322e91ac35af1ab07466440c37'
}
],
compare: 'https://github.com/docker/test-docker-action/compare/5f3331d7f704...860c1904a1ce',
created: false,
deleted: false,
forced: false,
head_commit: {
author: {
email: 'crazy-max@users.noreply.github.com',
name: 'CrazyMax',
username: 'crazy-max'
},
committer: { committer: {
email: 'crazy-max@users.noreply.github.com', date: '2024-11-13T13:42:28Z'
name: 'CrazyMax', }
username: 'crazy-max'
},
distinct: true,
id: '860c1904a1ce19322e91ac35af1ab07466440c37',
message: 'hello dev',
timestamp: '2022-04-19T11:27:24+02:00',
tree_id: 'd2c60af597e863787d2d27f569e30495b0b92820',
url: 'https://github.com/docker/test-docker-action/commit/860c1904a1ce19322e91ac35af1ab07466440c37'
},
organization: {
avatar_url: 'https://avatars.githubusercontent.com/u/5429470?v=4',
description: 'Docker helps developers bring their ideas to life by conquering the complexity of app development.',
events_url: 'https://api.github.com/orgs/docker/events',
hooks_url: 'https://api.github.com/orgs/docker/hooks',
id: 5429470,
issues_url: 'https://api.github.com/orgs/docker/issues',
login: 'docker',
members_url: 'https://api.github.com/orgs/docker/members{/member}',
node_id: 'MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=',
public_members_url: 'https://api.github.com/orgs/docker/public_members{/member}',
repos_url: 'https://api.github.com/orgs/docker/repos',
url: 'https://api.github.com/orgs/docker'
},
pusher: {
email: 'github@crazymax.dev',
name: 'crazy-max'
},
ref: 'refs/heads/dev',
repository: {
allow_forking: true,
archive_url: 'https://api.github.com/repos/docker/test-docker-action/{archive_format}{/ref}',
archived: false,
assignees_url: 'https://api.github.com/repos/docker/test-docker-action/assignees{/user}',
blobs_url: 'https://api.github.com/repos/docker/test-docker-action/git/blobs{/sha}',
branches_url: 'https://api.github.com/repos/docker/test-docker-action/branches{/branch}',
clone_url: 'https://github.com/docker/test-docker-action.git',
collaborators_url: 'https://api.github.com/repos/docker/test-docker-action/collaborators{/collaborator}',
comments_url: 'https://api.github.com/repos/docker/test-docker-action/comments{/number}',
commits_url: 'https://api.github.com/repos/docker/test-docker-action/commits{/sha}',
compare_url: 'https://api.github.com/repos/docker/test-docker-action/compare/{base}...{head}',
contents_url: 'https://api.github.com/repos/docker/test-docker-action/contents/{+path}',
contributors_url: 'https://api.github.com/repos/docker/test-docker-action/contributors',
created_at: 1596792180,
default_branch: 'master',
deployments_url: 'https://api.github.com/repos/docker/test-docker-action/deployments',
description: 'Test "Docker" Actions',
disabled: false,
downloads_url: 'https://api.github.com/repos/docker/test-docker-action/downloads',
events_url: 'https://api.github.com/repos/docker/test-docker-action/events',
fork: false,
forks: 1,
forks_count: 1,
forks_url: 'https://api.github.com/repos/docker/test-docker-action/forks',
full_name: 'docker/test-docker-action',
git_commits_url: 'https://api.github.com/repos/docker/test-docker-action/git/commits{/sha}',
git_refs_url: 'https://api.github.com/repos/docker/test-docker-action/git/refs{/sha}',
git_tags_url: 'https://api.github.com/repos/docker/test-docker-action/git/tags{/sha}',
git_url: 'git://github.com/docker/test-docker-action.git',
has_downloads: true,
has_issues: true,
has_pages: false,
has_projects: true,
has_wiki: true,
homepage: '',
hooks_url: 'https://api.github.com/repos/docker/test-docker-action/hooks',
html_url: 'https://github.com/docker/test-docker-action',
id: 285789493,
is_template: false,
issue_comment_url: 'https://api.github.com/repos/docker/test-docker-action/issues/comments{/number}',
issue_events_url: 'https://api.github.com/repos/docker/test-docker-action/issues/events{/number}',
issues_url: 'https://api.github.com/repos/docker/test-docker-action/issues{/number}',
keys_url: 'https://api.github.com/repos/docker/test-docker-action/keys{/key_id}',
labels_url: 'https://api.github.com/repos/docker/test-docker-action/labels{/name}',
language: 'JavaScript',
languages_url: 'https://api.github.com/repos/docker/test-docker-action/languages',
license: {
key: 'mit',
name: 'MIT License',
node_id: 'MDc6TGljZW5zZTEz',
spdx_id: 'MIT',
url: 'https://api.github.com/licenses/mit'
},
master_branch: 'master',
merges_url: 'https://api.github.com/repos/docker/test-docker-action/merges',
milestones_url: 'https://api.github.com/repos/docker/test-docker-action/milestones{/number}',
mirror_url: null,
name: 'test-docker-action',
node_id: 'MDEwOlJlcG9zaXRvcnkyODU3ODk0OTM=',
notifications_url: 'https://api.github.com/repos/docker/test-docker-action/notifications{?since,all,participating}',
open_issues: 6,
open_issues_count: 6,
organization: 'docker',
owner: {
avatar_url: 'https://avatars.githubusercontent.com/u/5429470?v=4',
email: 'info@docker.com',
events_url: 'https://api.github.com/users/docker/events{/privacy}',
followers_url: 'https://api.github.com/users/docker/followers',
following_url: 'https://api.github.com/users/docker/following{/other_user}',
gists_url: 'https://api.github.com/users/docker/gists{/gist_id}',
gravatar_id: '',
html_url: 'https://github.com/docker',
id: 5429470,
login: 'docker',
name: 'docker',
node_id: 'MDEyOk9yZ2FuaXphdGlvbjU0Mjk0NzA=',
organizations_url: 'https://api.github.com/users/docker/orgs',
received_events_url: 'https://api.github.com/users/docker/received_events',
repos_url: 'https://api.github.com/users/docker/repos',
site_admin: false,
starred_url: 'https://api.github.com/users/docker/starred{/owner}{/repo}',
subscriptions_url: 'https://api.github.com/users/docker/subscriptions',
type: 'Organization',
url: 'https://api.github.com/users/docker'
},
private: true,
pulls_url: 'https://api.github.com/repos/docker/test-docker-action/pulls{/number}',
pushed_at: 1650360446,
releases_url: 'https://api.github.com/repos/docker/test-docker-action/releases{/id}',
size: 796,
ssh_url: 'git@github.com:docker/test-docker-action.git',
stargazers: 0,
stargazers_count: 0,
stargazers_url: 'https://api.github.com/repos/docker/test-docker-action/stargazers',
statuses_url: 'https://api.github.com/repos/docker/test-docker-action/statuses/{sha}',
subscribers_url: 'https://api.github.com/repos/docker/test-docker-action/subscribers',
subscription_url: 'https://api.github.com/repos/docker/test-docker-action/subscription',
svn_url: 'https://github.com/docker/test-docker-action',
tags_url: 'https://api.github.com/repos/docker/test-docker-action/tags',
teams_url: 'https://api.github.com/repos/docker/test-docker-action/teams',
topics: [],
trees_url: 'https://api.github.com/repos/docker/test-docker-action/git/trees{/sha}',
updated_at: '2022-04-19T09:05:09Z',
url: 'https://github.com/docker/test-docker-action',
visibility: 'private',
watchers: 0,
watchers_count: 0
},
sender: {
avatar_url: 'https://avatars.githubusercontent.com/u/1951866?v=4',
events_url: 'https://api.github.com/users/crazy-max/events{/privacy}',
followers_url: 'https://api.github.com/users/crazy-max/followers',
following_url: 'https://api.github.com/users/crazy-max/following{/other_user}',
gists_url: 'https://api.github.com/users/crazy-max/gists{/gist_id}',
gravatar_id: '',
html_url: 'https://github.com/crazy-max',
id: 1951866,
login: 'crazy-max',
node_id: 'MDQ6VXNlcjE5NTE4NjY=',
organizations_url: 'https://api.github.com/users/crazy-max/orgs',
received_events_url: 'https://api.github.com/users/crazy-max/received_events',
repos_url: 'https://api.github.com/users/crazy-max/repos',
site_admin: false,
starred_url: 'https://api.github.com/users/crazy-max/starred{/owner}{/repo}',
subscriptions_url: 'https://api.github.com/users/crazy-max/subscriptions',
type: 'User',
url: 'https://api.github.com/users/crazy-max'
} }
} }
}, }))
getOctokit: () => ({ );
const getOctokitMock = vi.hoisted(() =>
vi.fn(() => ({
rest: { rest: {
repos: { repos: {
getCommit: async () => ({ getCommit: getCommitMock
data: {
commit: {
committer: {
date: '2024-11-13T13:42:28Z'
}
}
}
})
} }
} }
}) }))
}; );
vi.mock('@actions/github', () => githubMock); vi.mock('@actions/github', async importOriginal => {
const actual = await importOriginal<typeof import('@actions/github')>();
for (const mod of ['@actions/github', '@docker/actions-toolkit/node_modules/@actions/github']) { return {
try { ...actual,
const resolved = require.resolve(mod); context: {
vi.doMock(resolved, () => githubMock); ...actual.context,
require.cache[resolved] = { payload: githubPayload
id: resolved, },
filename: resolved, getOctokit: getOctokitMock
loaded: true, };
exports: githubMock, });
children: [],
paths: []
} as RequireCacheEntry;
} catch {
// Ignore unresolved optional paths; vi.mock handles module-level mocking.
}
}

View File

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

View File

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

147
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,17 +26,17 @@
"dependencies": { "dependencies": {
"@actions/core": "^3.0.0", "@actions/core": "^3.0.0",
"@actions/github": "^9.0.0", "@actions/github": "^9.0.0",
"@docker/actions-toolkit": "^0.68.0", "@docker/actions-toolkit": "^0.79.0",
"@renovate/pep440": "^1.0.0", "@renovate/pep440": "^1.0.0",
"csv-parse": "^6.1.0", "csv-parse": "^6.1.0",
"handlebars": "^4.7.8", "handlebars": "^4.7.8",
"moment": "^2.30.1", "moment": "^2.30.1",
"moment-timezone": "^0.6.0", "moment-timezone": "^0.6.1",
"semver": "^7.7.4" "semver": "^7.7.4"
}, },
"devDependencies": { "devDependencies": {
"@eslint/js": "^9.39.3", "@eslint/js": "^9.39.3",
"@types/node": "^20.19.35", "@types/node": "^24.11.0",
"@types/semver": "^7.7.1", "@types/semver": "^7.7.1",
"@typescript-eslint/eslint-plugin": "^8.56.1", "@typescript-eslint/eslint-plugin": "^8.56.1",
"@typescript-eslint/parser": "^8.56.1", "@typescript-eslint/parser": "^8.56.1",

View File

@@ -2,7 +2,7 @@ import * as core from '@actions/core';
import {Util} from '@docker/actions-toolkit/lib/util.js'; import {Util} from '@docker/actions-toolkit/lib/util.js';
import {Git} from '@docker/actions-toolkit/lib/git.js'; import {Git} from '@docker/actions-toolkit/lib/git.js';
import {GitHub} from '@docker/actions-toolkit/lib/github.js'; import {GitHub} from '@docker/actions-toolkit/lib/github/github.js';
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit.js'; import {Toolkit} from '@docker/actions-toolkit/lib/toolkit.js';
type GithubContext = typeof GitHub.context; type GithubContext = typeof GitHub.context;
@@ -28,11 +28,11 @@ export interface Inputs {
export function getInputs(): Inputs { export function getInputs(): Inputs {
return { return {
context: (core.getInput('context') || ContextSource.workflow) as ContextSource, context: (core.getInput('context') || ContextSource.workflow) as ContextSource,
images: Util.getInputList('images', {ignoreComma: true, comment: '#'}), images: Util.getInputList('images', {ignoreComma: true, comment: '#', commentNoInfix: true}),
tags: Util.getInputList('tags', {ignoreComma: true, comment: '#'}), tags: Util.getInputList('tags', {ignoreComma: true, comment: '#', commentNoInfix: true}),
flavor: Util.getInputList('flavor', {ignoreComma: true, comment: '#'}), flavor: Util.getInputList('flavor', {ignoreComma: true, comment: '#', commentNoInfix: true}),
labels: Util.getInputList('labels', {ignoreComma: true, comment: '#'}), labels: Util.getInputList('labels', {ignoreComma: true, comment: '#', commentNoInfix: true}),
annotations: Util.getInputList('annotations', {ignoreComma: true, comment: '#'}), annotations: Util.getInputList('annotations', {ignoreComma: true, comment: '#', commentNoInfix: true}),
sepTags: core.getInput('sep-tags', {trimWhitespace: false}) || `\n`, sepTags: core.getInput('sep-tags', {trimWhitespace: false}) || `\n`,
sepLabels: core.getInput('sep-labels', {trimWhitespace: false}) || `\n`, sepLabels: core.getInput('sep-labels', {trimWhitespace: false}) || `\n`,
sepAnnotations: core.getInput('sep-annotations', {trimWhitespace: false}) || `\n`, sepAnnotations: core.getInput('sep-annotations', {trimWhitespace: false}) || `\n`,

View File

@@ -6,7 +6,7 @@ import * as pep440 from '@renovate/pep440';
import * as semver from 'semver'; import * as semver from 'semver';
import * as core from '@actions/core'; import * as core from '@actions/core';
import {Context as ToolkitContext} from '@docker/actions-toolkit/lib/context.js'; import {Context as ToolkitContext} from '@docker/actions-toolkit/lib/context.js';
import {GitHubRepo} from '@docker/actions-toolkit/lib/types/github.js'; import {GitHubRepo} from '@docker/actions-toolkit/lib/types/github/github.js';
import {Inputs, Context} from './context.js'; import {Inputs, Context} from './context.js';
import * as icl from './image.js'; import * as icl from './image.js';

1281
yarn.lock

File diff suppressed because it is too large Load Diff