67 Commits

Author SHA1 Message Date
CrazyMax 8cccb8c14b Merge pull request #51 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.79.0
chore(deps): bump @docker/actions-toolkit from 0.77.0 to 0.79.0
2026-03-05 11:18:35 +01:00
CrazyMax 02f131839b Merge pull request #50 from crazy-max/update-readme
readme: update to v2
2026-03-05 10:25:22 +01:00
github-actions[bot] f40737bb30 chore: update generated content 2026-03-05 01:35:40 +00:00
dependabot[bot] 8a9a53a305 chore(deps): bump @docker/actions-toolkit from 0.77.0 to 0.79.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.77.0 to 0.79.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.77.0...v0.79.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-version: 0.79.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-03-05 01:34:41 +00:00
CrazyMax f7c51678a6 readme: update to v2
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-02 14:39:11 +01:00
CrazyMax 112d3e30db Merge pull request #49 from crazy-max/node24
node 24 as default runtime
2026-03-02 14:33:37 +01:00
CrazyMax 9a3285656d node 24 as default runtime
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-02 14:28:30 +01:00
CrazyMax 2dd6325a67 Merge pull request #48 from crazy-max/nits
fix some nits to be consistent across actions
2026-03-02 10:41:10 +01:00
CrazyMax 5cff5dd8b8 fix some nits to be consistent across actions
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-03-02 09:47:03 +01:00
CrazyMax 2fe291b767 Merge pull request #46 from docker/dependabot/npm_and_yarn/minimatch-3.1.4
chore(deps): bump minimatch from 3.1.2 to 3.1.4
2026-02-27 15:02:25 +01:00
github-actions[bot] 8c2139e3cd chore: update generated content 2026-02-27 13:48:33 +00:00
dependabot[bot] e0b48a103c chore(deps): bump minimatch from 3.1.2 to 3.1.4
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.1.2 to 3.1.4.
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.1.2...v3.1.4)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-version: 3.1.4
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-27 13:47:27 +00:00
CrazyMax 76aad036e9 Merge pull request #37 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.75.0
chore(deps): bump @docker/actions-toolkit from 0.62.1 to 0.77.0
2026-02-27 14:44:18 +01:00
github-actions[bot] ada6bc9aca chore: update generated content 2026-02-27 13:38:18 +00:00
dependabot[bot] 8136bb0abf chore(deps): bump @docker/actions-toolkit from 0.62.1 to 0.75.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.62.1 to 0.75.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.62.1...v0.75.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-version: 0.75.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-27 13:37:16 +00:00
CrazyMax 9cdb971c19 Merge pull request #45 from docker/dependabot/npm_and_yarn/actions/core-3.0.0
chore(deps): bump @actions/core from 1.11.1 to 3.0.0
2026-02-27 14:35:34 +01:00
github-actions[bot] 5568a9cbea chore: update generated content 2026-02-27 13:26:18 +00:00
dependabot[bot] 5dae812372 chore(deps): bump @actions/core from 1.11.1 to 3.0.0
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.11.1 to 3.0.0.
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-version: 3.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-27 13:25:10 +00:00
CrazyMax 8482edc805 Merge pull request #47 from crazy-max/esm
switch to ESM and update config/test wiring
2026-02-27 14:23:05 +01:00
CrazyMax 0740da8ac0 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-02-27 14:06:08 +01:00
CrazyMax c497bf8add update dev dependencies
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-02-27 14:06:07 +01:00
CrazyMax 279a65f3bf switch to ESM and update config/test wiring
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-02-27 14:01:57 +01:00
CrazyMax e2b402d143 switch from jest to vitest
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-02-27 13:48:50 +01:00
CrazyMax e79596b1b4 Merge pull request #44 from docker/dependabot/npm_and_yarn/undici-5.29.0
chore(deps): bump undici from 5.28.4 to 5.29.0
2026-01-29 17:11:08 +01:00
github-actions[bot] 8084624251 chore: update generated content 2026-01-29 16:05:18 +00:00
dependabot[bot] 12a53ec263 chore(deps): bump undici from 5.28.4 to 5.29.0
Bumps [undici](https://github.com/nodejs/undici) from 5.28.4 to 5.29.0.
- [Release notes](https://github.com/nodejs/undici/releases)
- [Commits](https://github.com/nodejs/undici/compare/v5.28.4...v5.29.0)

---
updated-dependencies:
- dependency-name: undici
  dependency-version: 5.29.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-29 16:04:13 +00:00
CrazyMax 279c22640e Merge pull request #39 from docker/dependabot/npm_and_yarn/lodash-4.17.23
chore(deps): bump lodash from 4.17.21 to 4.17.23
2026-01-29 17:01:47 +01:00
CrazyMax b1f7f2ca33 Merge pull request #38 from docker/dependabot/npm_and_yarn/js-yaml-3.14.2
chore(deps): bump js-yaml from 3.14.1 to 3.14.2
2026-01-29 17:01:29 +01:00
github-actions[bot] 90f1ae58e3 chore: update generated content 2026-01-29 15:47:00 +00:00
dependabot[bot] ce0a6cec9d chore(deps): bump lodash from 4.17.21 to 4.17.23
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-29 15:45:52 +00:00
dependabot[bot] b1a889425d chore(deps): bump js-yaml from 3.14.1 to 3.14.2
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 3.14.1 to 3.14.2.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/compare/3.14.1...3.14.2)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 3.14.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-29 15:45:52 +00:00
CrazyMax 405c82c48a Merge pull request #43 from crazy-max/yarn-update
update yarn to 4.9.2
2026-01-29 16:44:00 +01:00
CrazyMax af8e2b6e8f update yarn to 4.9.2
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-29 16:42:03 +01:00
CrazyMax f3db6589a5 Merge pull request #42 from crazy-max/dev-deps
update dev dependencies
2026-01-29 16:40:00 +01:00
CrazyMax 0ddb5e8fcf ci: rename job in update-dist workflow
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-29 16:36:38 +01:00
CrazyMax feb56d3c68 chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-29 16:36:17 +01:00
CrazyMax 24f3159974 update jest config since 30.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-29 16:35:17 +01:00
CrazyMax c827c799f9 migrate eslint config to new format required since 9.0.0
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-29 16:34:21 +01:00
CrazyMax 3420918368 update dev dependencies
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-29 16:33:17 +01:00
CrazyMax 5ebb8a1234 Merge pull request #41 from crazy-max/fix-update-dist
ci: fix update-dist workflow
2026-01-29 15:37:05 +01:00
CrazyMax 018a8a74ba ci: fix update-dist workflow
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-29 15:24:38 +01:00
CrazyMax 7502d43660 Merge pull request #28 from docker/dependabot/github_actions/actions/checkout-6
chore(deps): bump actions/checkout from 5 to 6
2026-01-29 15:15:38 +01:00
CrazyMax 1fc6ffe25f Merge pull request #40 from crazy-max/update-dist-workflow
ci: update-dist workflow
2026-01-29 15:14:59 +01:00
CrazyMax 9664d39295 ci: update-dist workflow
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2026-01-29 15:01:11 +01:00
dependabot[bot] 30160f4da4 chore(deps): bump actions/checkout from 5 to 6
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-11-21 01:11:35 +00:00
CrazyMax 23d018c8d3 Merge pull request #22 from docker/dependabot/github_actions/actions/checkout-5
chore(deps): bump actions/checkout from 4 to 5
2025-10-03 15:35:52 +02:00
dependabot[bot] 35f07640c9 chore(deps): bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 10:07:04 +00:00
CrazyMax 8d504d704c Merge pull request #16 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.62.1
chore(deps): bump @docker/actions-toolkit from 0.56.0 to 0.62.1
2025-06-16 14:32:22 +02:00
CrazyMax 65532dcafa chore: update generated content
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
2025-06-16 14:30:32 +02:00
dependabot[bot] 4de0e6e148 chore(deps): bump @docker/actions-toolkit from 0.56.0 to 0.62.1
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.56.0 to 0.62.1.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.56.0...v0.62.1)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-version: 0.62.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-28 01:16:26 +00:00
CrazyMax 23b64c3ea9 Merge pull request #13 from crazy-max/pr-assign-author
pr-assign-author workflow
2025-04-23 16:08:47 +02:00
CrazyMax 0a9030a247 pr-assign-author workflow 2025-04-23 14:19:47 +02:00
CrazyMax 45e44e28e6 Merge pull request #12 from crazy-max/fix-codecov
ci: fix missing source for codecov
2025-04-22 14:37:23 +02:00
CrazyMax 6ffe8afb0f ci: fix missing source for codecov 2025-04-22 14:34:12 +02:00
CrazyMax 364cc21a5d Merge pull request #8 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.56.0
chore(deps): bump @docker/actions-toolkit from 0.54.0 to 0.56.0
2025-02-26 16:14:19 +01:00
CrazyMax 0c7e7f8868 chore: update generated content 2025-02-26 16:00:51 +01:00
dependabot[bot] 757dd6f61d chore(deps): bump @docker/actions-toolkit from 0.54.0 to 0.56.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.54.0 to 0.56.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.54.0...v0.56.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-26 14:26:40 +00:00
CrazyMax abf56a19c6 Merge pull request #6 from docker/dependabot/npm_and_yarn/docker/actions-toolkit-0.54.0
chore(deps): bump @docker/actions-toolkit from 0.53.0 to 0.54.0
2025-02-06 14:21:55 +01:00
CrazyMax 346b937f4c chore: update generated content 2025-02-06 14:18:57 +01:00
dependabot[bot] d267cf76a7 chore(deps): bump @docker/actions-toolkit from 0.53.0 to 0.54.0
Bumps [@docker/actions-toolkit](https://github.com/docker/actions-toolkit) from 0.53.0 to 0.54.0.
- [Release notes](https://github.com/docker/actions-toolkit/releases)
- [Commits](https://github.com/docker/actions-toolkit/compare/v0.53.0...v0.54.0)

---
updated-dependencies:
- dependency-name: "@docker/actions-toolkit"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-05 01:38:53 +00:00
CrazyMax 58d48a7b22 Merge pull request #5 from crazy-max/publish-immutable-action
ci: publish as immutable action workflow
2025-01-28 10:16:00 +01:00
CrazyMax 67ac716098 ci: publish as immutable action workflow 2025-01-28 10:09:24 +01:00
CrazyMax e7d6fbf47d Merge pull request #4 from crazy-max/docs-latest
docs to download latest version
2025-01-27 13:45:13 +01:00
CrazyMax db9182ec53 docs to download latest version 2025-01-27 12:40:56 +01:00
CrazyMax 55fa65fc8b Merge pull request #3 from crazy-max/dependabot
chore: dependabot
2025-01-24 15:46:36 +01:00
CrazyMax 98c033d730 fix readme 2025-01-24 15:44:46 +01:00
CrazyMax 1b5325cd5a chore: dependabot 2025-01-24 14:52:59 +01:00
32 changed files with 3266 additions and 9481 deletions
-3
View File
@@ -1,3 +0,0 @@
/dist/**
/coverage/**
/node_modules/**
-24
View File
@@ -1,24 +0,0 @@
{
"env": {
"node": true,
"es6": true,
"jest": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint",
"jest",
"prettier"
]
}
+19
View File
@@ -0,0 +1,19 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
labels:
- "dependencies"
- "bot"
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
versioning-strategy: "increase"
allow:
- dependency-type: "production"
labels:
- "dependencies"
- "bot"
+4 -4
View File
@@ -31,7 +31,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Compose name: Set up Docker Compose
uses: ./ uses: ./
@@ -43,7 +43,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Compose 1 name: Set up Docker Compose 1
uses: ./ uses: ./
@@ -56,7 +56,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Uninstall docker cli name: Uninstall docker cli
run: | run: |
@@ -80,7 +80,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: Set up Docker Compose name: Set up Docker Compose
uses: ./ uses: ./
+17
View File
@@ -0,0 +1,17 @@
name: pr-assign-author
permissions:
contents: read
on:
pull_request_target:
types:
- opened
- reopened
jobs:
run:
uses: crazy-max/.github/.github/workflows/pr-assign-author.yml@1b673f36fad86812f538c1df9794904038a23cbf
permissions:
contents: read
pull-requests: write
+21
View File
@@ -0,0 +1,21 @@
name: publish
on:
release:
types:
- published
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
packages: write
steps:
-
name: Checkout
uses: actions/checkout@v6
-
name: Publish
uses: actions/publish-immutable-action@v0.0.4
+4
View File
@@ -19,6 +19,9 @@ jobs:
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
-
name: Checkout
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@v3
@@ -29,6 +32,7 @@ jobs:
name: Test name: Test
uses: docker/bake-action@v6 uses: docker/bake-action@v6
with: with:
source: .
targets: test targets: test
- -
name: Upload coverage name: Upload coverage
+49
View File
@@ -0,0 +1,49 @@
name: update-dist
on:
pull_request:
types:
- opened
- synchronize
jobs:
update-dist:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
-
name: GitHub auth token from GitHub App
id: docker-read-app
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.GHACTIONS_REPO_WRITE_APP_ID }}
private-key: ${{ secrets.GHACTIONS_REPO_WRITE_APP_PRIVATE_KEY }}
owner: docker
-
name: Checkout
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
token: ${{ steps.docker-read-app.outputs.token || github.token }}
-
name: Build
uses: docker/bake-action@v6
with:
source: .
targets: build
-
name: Commit and push dist
run: |
if [ -n "$(git status --porcelain -- dist)" ]; then
(
set -x
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add dist
git commit -m "chore: update generated content"
git push
)
else
echo "No changes in dist"
fi
+1 -1
View File
@@ -23,7 +23,7 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v6
- -
name: List targets name: List targets
id: generate id: generate
+1 -2
View File
@@ -6,6 +6,5 @@
"singleQuote": true, "singleQuote": true,
"trailingComma": "none", "trailingComma": "none",
"bracketSpacing": false, "bracketSpacing": false,
"arrowParens": "avoid", "arrowParens": "avoid"
"parser": "typescript"
} }
File diff suppressed because one or more lines are too long
+8 -4
View File
@@ -1,3 +1,9 @@
# https://yarnpkg.com/configuration/yarnrc
compressionLevel: mixed
enableGlobalCache: false
enableHardenedMode: true
logFilters: logFilters:
- code: YN0013 - code: YN0013
level: discard level: discard
@@ -5,9 +11,7 @@ logFilters:
level: discard level: discard
- code: YN0076 - code: YN0076
level: discard level: discard
- code: YN0086
level: discard
nodeLinker: node-modules nodeLinker: node-modules
plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
+17 -5
View File
@@ -1,7 +1,7 @@
[![GitHub release](https://img.shields.io/github/release/docker/setup-compose-action.svg?style=flat-square)](https://github.com/docker/setup-compose-action/releases/latest) [![GitHub release](https://img.shields.io/github/release/docker/setup-compose-action.svg?style=flat-square)](https://github.com/docker/setup-compose-action/releases/latest)
[![GitHub marketplace](https://img.shields.io/badge/marketplace-docker--setup--compose-blue?logo=github&style=flat-square)](https://github.com/marketplace/actions/docker-setup-compose) [![GitHub marketplace](https://img.shields.io/badge/marketplace-docker--setup--compose-blue?logo=github&style=flat-square)](https://github.com/marketplace/actions/docker-setup-compose)
[![CI workflow](https://img.shields.io/github/actions/workflow/status/docker/setup-compose-action/ci.yml?branch=master&label=ci&logo=github&style=flat-square)](https://github.com/docker/setup-compose-action/actions?workflow=ci) [![CI workflow](https://img.shields.io/github/actions/workflow/status/docker/setup-compose-action/ci.yml?label=ci&logo=github&style=flat-square)](https://github.com/docker/setup-compose-action/actions?workflow=ci)
[![Test workflow](https://img.shields.io/github/actions/workflow/status/docker/setup-compose-action/test.yml?branch=master&label=test&logo=github&style=flat-square)](https://github.com/docker/setup-compose-action/actions?workflow=test) [![Test workflow](https://img.shields.io/github/actions/workflow/status/docker/setup-compose-action/test.yml?label=test&logo=github&style=flat-square)](https://github.com/docker/setup-compose-action/actions?workflow=test)
[![Codecov](https://img.shields.io/codecov/c/github/docker/setup-compose-action?logo=codecov&style=flat-square)](https://codecov.io/gh/docker/setup-compose-action) [![Codecov](https://img.shields.io/codecov/c/github/docker/setup-compose-action?logo=codecov&style=flat-square)](https://codecov.io/gh/docker/setup-compose-action)
## About ## About
@@ -30,11 +30,23 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- -
name: Checkout name: Set up Docker Compose
uses: actions/checkout@v4 uses: docker/setup-compose-action@v2
```
> [!NOTE]
> If Docker Compose is already installed on the runner, the action will skip
> download. Otherwise, it will download and install the latest stable version
> [available on GitHub](https://github.com/docker/compose/releases/latest).
To always download and install the latest version of Docker Compose:
```yaml
- -
name: Set up Docker Compose name: Set up Docker Compose
uses: docker/setup-compose-action@v1 uses: docker/setup-compose-action@v2
with:
version: latest
``` ```
## Customizing ## Customizing
+14 -16
View File
@@ -1,23 +1,23 @@
import {beforeEach, describe, expect, jest, test} from '@jest/globals'; import {beforeEach, describe, expect, vi, test} from 'vitest';
import * as fs from 'fs'; import * as fs from 'fs';
import * as os from 'os';
import * as path from 'path'; import * as path from 'path';
import {Context} from '@docker/actions-toolkit/lib/context'; import {Context} from '@docker/actions-toolkit/lib/context.js';
import * as context from '../src/context'; import * as context from '../src/context.js';
// prettier-ignore const tmpDir = fs.mkdtempSync(path.join(process.env.TEMP || os.tmpdir(), 'context-'));
const tmpDir = path.join(process.env.TEMP || '/tmp', 'setup-compose-jest'); const tmpName = path.join(tmpDir, '.tmpname-vi');
const tmpName = path.join(tmpDir, '.tmpname-jest');
jest.spyOn(Context, 'tmpDir').mockImplementation((): string => { vi.spyOn(Context, 'tmpDir').mockImplementation((): string => {
if (!fs.existsSync(tmpDir)) { if (!fs.existsSync(tmpDir)) {
fs.mkdirSync(tmpDir, {recursive: true}); fs.mkdirSync(tmpDir, {recursive: true});
} }
return tmpDir; return tmpDir;
}); });
jest.spyOn(Context, 'tmpName').mockImplementation((): string => { vi.spyOn(Context, 'tmpName').mockImplementation((): string => {
return tmpName; return tmpName;
}); });
@@ -32,7 +32,7 @@ describe('getInputs', () => {
}); });
// prettier-ignore // prettier-ignore
test.each([ const cases: [number, Map<string, string>, context.Inputs][] = [
[ [
0, 0,
new Map<string, string>([ new Map<string, string>([
@@ -41,7 +41,7 @@ describe('getInputs', () => {
{ {
version: '', version: '',
cacheBinary: true, cacheBinary: true,
} as context.Inputs }
], ],
[ [
1, 1,
@@ -52,18 +52,16 @@ describe('getInputs', () => {
{ {
version: 'v2.32.4', version: 'v2.32.4',
cacheBinary: false cacheBinary: false
} as context.Inputs }
] ]
])( ];
'[%d] given %p as inputs, returns %p', test.each(cases)('[%d] given %o as inputs, returns %o', async (num: number, inputs: Map<string, string>, expected: context.Inputs) => {
async (num: number, inputs: Map<string, string>, expected: context.Inputs) => {
inputs.forEach((value: string, name: string) => { inputs.forEach((value: string, name: string) => {
setInput(name, value); setInput(name, value);
}); });
const res = await context.getInputs(); const res = await context.getInputs();
expect(res).toEqual(expected); expect(res).toEqual(expected);
} });
);
}); });
// See: https://github.com/actions/toolkit/blob/master/packages/core/src/core.ts#L67 // See: https://github.com/actions/toolkit/blob/master/packages/core/src/core.ts#L67
+12
View File
@@ -0,0 +1,12 @@
import fs from 'node:fs';
import os from 'node:os';
import path from 'node:path';
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-setup-compose-action-'));
process.env = Object.assign({}, process.env, {
TEMP: tmpDir,
GITHUB_REPOSITORY: 'docker/setup-compose-action',
RUNNER_TEMP: path.join(tmpDir, 'runner-temp'),
RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache')
});
+1 -1
View File
@@ -16,6 +16,6 @@ inputs:
required: false required: false
runs: runs:
using: 'node20' using: 'node24'
main: 'dist/index.js' main: 'dist/index.js'
post: 'dist/index.js' post: 'dist/index.js'
+18 -9
View File
@@ -1,12 +1,13 @@
# 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 RUN apk add --no-cache cpio findutils git rsync
WORKDIR /src WORKDIR /src
RUN --mount=type=bind,target=.,rw \ RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache <<EOT --mount=type=cache,target=/src/.yarn/cache <<EOT
set -e
corepack enable corepack enable
yarn --version yarn --version
yarn config set --home enableTelemetry 0 yarn config set --home enableTelemetry 0
@@ -34,18 +35,27 @@ RUN --mount=type=bind,target=.,rw <<EOT
EOT EOT
FROM deps AS build FROM deps AS build
RUN --mount=type=bind,target=.,rw \ RUN --mount=target=/context \
--mount=type=cache,target=/src/.yarn/cache \ --mount=type=cache,target=/src/.yarn/cache \
--mount=type=cache,target=/src/node_modules \ --mount=type=cache,target=/src/node_modules <<EOT
yarn run build && mkdir /out && cp -Rf dist /out/ set -e
rsync -a /context/. .
rm -rf dist
yarn run build
mkdir /out
cp -r dist /out
EOT
FROM scratch AS build-update FROM scratch AS build-update
COPY --from=build /out / COPY --from=build /out /
FROM build AS build-validate FROM build AS build-validate
RUN --mount=type=bind,target=.,rw <<EOT RUN --mount=target=/context \
--mount=target=.,type=tmpfs <<EOT
set -e set -e
rsync -a /context/. .
git add -A git add -A
rm -rf dist
cp -rf /out/* . cp -rf /out/* .
if [ -n "$(git status --porcelain -- dist)" ]; then if [ -n "$(git status --porcelain -- dist)" ]; then
echo >&2 'ERROR: Build result differs. Please build first with "docker buildx bake build"' echo >&2 'ERROR: Build result differs. Please build first with "docker buildx bake build"'
@@ -58,8 +68,7 @@ FROM deps AS format
RUN --mount=type=bind,target=.,rw \ RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache \ --mount=type=cache,target=/src/.yarn/cache \
--mount=type=cache,target=/src/node_modules \ --mount=type=cache,target=/src/node_modules \
yarn run format \ yarn run format && mkdir /out && find . -name '*.ts' -not -path './node_modules/*' -not -path './.yarn/*' | cpio -pdm /out
&& mkdir /out && find . -name '*.ts' -not -path './node_modules/*' -not -path './.yarn/*' | cpio -pdm /out
FROM scratch AS format-update FROM scratch AS format-update
COPY --from=format /out / COPY --from=format /out /
@@ -74,7 +83,7 @@ FROM deps AS test
RUN --mount=type=bind,target=.,rw \ RUN --mount=type=bind,target=.,rw \
--mount=type=cache,target=/src/.yarn/cache \ --mount=type=cache,target=/src/.yarn/cache \
--mount=type=cache,target=/src/node_modules \ --mount=type=cache,target=/src/node_modules \
yarn run test --coverage --coverageDirectory=/tmp/coverage yarn run test --coverage --coverage.reportsDirectory=/tmp/coverage
FROM scratch AS test-coverage FROM scratch AS test-coverage
COPY --from=test /tmp/coverage / COPY --from=test /tmp/coverage /
Generated Vendored
+301
View File
@@ -0,0 +1,301 @@
export const id = 606;
export const ids = [606];
export const modules = {
/***/ 606:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "default": () => (/* binding */ pMap)
/* harmony export */ });
/* unused harmony exports pMapIterable, pMapSkip */
async function pMap(
iterable,
mapper,
{
concurrency = Number.POSITIVE_INFINITY,
stopOnError = true,
signal,
} = {},
) {
return new Promise((resolve_, reject_) => {
if (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) {
throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
}
if (typeof mapper !== 'function') {
throw new TypeError('Mapper function is required');
}
if (!((Number.isSafeInteger(concurrency) && concurrency >= 1) || concurrency === Number.POSITIVE_INFINITY)) {
throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
}
const result = [];
const errors = [];
const skippedIndexesMap = new Map();
let isRejected = false;
let isResolved = false;
let isIterableDone = false;
let resolvingCount = 0;
let currentIndex = 0;
const iterator = iterable[Symbol.iterator] === undefined ? iterable[Symbol.asyncIterator]() : iterable[Symbol.iterator]();
const signalListener = () => {
reject(signal.reason);
};
const cleanup = () => {
signal?.removeEventListener('abort', signalListener);
};
const resolve = value => {
resolve_(value);
cleanup();
};
const reject = reason => {
isRejected = true;
isResolved = true;
reject_(reason);
cleanup();
};
if (signal) {
if (signal.aborted) {
reject(signal.reason);
}
signal.addEventListener('abort', signalListener, {once: true});
}
const next = async () => {
if (isResolved) {
return;
}
const nextItem = await iterator.next();
const index = currentIndex;
currentIndex++;
// Note: `iterator.next()` can be called many times in parallel.
// This can cause multiple calls to this `next()` function to
// receive a `nextItem` with `done === true`.
// The shutdown logic that rejects/resolves must be protected
// so it runs only one time as the `skippedIndex` logic is
// non-idempotent.
if (nextItem.done) {
isIterableDone = true;
if (resolvingCount === 0 && !isResolved) {
if (!stopOnError && errors.length > 0) {
reject(new AggregateError(errors)); // eslint-disable-line unicorn/error-message
return;
}
isResolved = true;
if (skippedIndexesMap.size === 0) {
resolve(result);
return;
}
const pureResult = [];
// Support multiple `pMapSkip`'s.
for (const [index, value] of result.entries()) {
if (skippedIndexesMap.get(index) === pMapSkip) {
continue;
}
pureResult.push(value);
}
resolve(pureResult);
}
return;
}
resolvingCount++;
// Intentionally detached
(async () => {
try {
const element = await nextItem.value;
if (isResolved) {
return;
}
const value = await mapper(element, index);
// Use Map to stage the index of the element.
if (value === pMapSkip) {
skippedIndexesMap.set(index, value);
}
result[index] = value;
resolvingCount--;
await next();
} catch (error) {
if (stopOnError) {
reject(error);
} else {
errors.push(error);
resolvingCount--;
// In that case we can't really continue regardless of `stopOnError` state
// since an iterable is likely to continue throwing after it throws once.
// If we continue calling `next()` indefinitely we will likely end up
// in an infinite loop of failed iteration.
try {
await next();
} catch (error) {
reject(error);
}
}
}
})();
};
// Create the concurrent runners in a detached (non-awaited)
// promise. We need this so we can await the `next()` calls
// to stop creating runners before hitting the concurrency limit
// if the iterable has already been marked as done.
// NOTE: We *must* do this for async iterators otherwise we'll spin up
// infinite `next()` calls by default and never start the event loop.
(async () => {
for (let index = 0; index < concurrency; index++) {
try {
// eslint-disable-next-line no-await-in-loop
await next();
} catch (error) {
reject(error);
break;
}
if (isIterableDone || isRejected) {
break;
}
}
})();
});
}
function pMapIterable(
iterable,
mapper,
{
concurrency = Number.POSITIVE_INFINITY,
backpressure = concurrency,
} = {},
) {
if (iterable[Symbol.iterator] === undefined && iterable[Symbol.asyncIterator] === undefined) {
throw new TypeError(`Expected \`input\` to be either an \`Iterable\` or \`AsyncIterable\`, got (${typeof iterable})`);
}
if (typeof mapper !== 'function') {
throw new TypeError('Mapper function is required');
}
if (!((Number.isSafeInteger(concurrency) && concurrency >= 1) || concurrency === Number.POSITIVE_INFINITY)) {
throw new TypeError(`Expected \`concurrency\` to be an integer from 1 and up or \`Infinity\`, got \`${concurrency}\` (${typeof concurrency})`);
}
if (!((Number.isSafeInteger(backpressure) && backpressure >= concurrency) || backpressure === Number.POSITIVE_INFINITY)) {
throw new TypeError(`Expected \`backpressure\` to be an integer from \`concurrency\` (${concurrency}) and up or \`Infinity\`, got \`${backpressure}\` (${typeof backpressure})`);
}
return {
async * [Symbol.asyncIterator]() {
const iterator = iterable[Symbol.asyncIterator] === undefined ? iterable[Symbol.iterator]() : iterable[Symbol.asyncIterator]();
const promises = [];
let pendingPromisesCount = 0;
let isDone = false;
let index = 0;
function trySpawn() {
if (isDone || !(pendingPromisesCount < concurrency && promises.length < backpressure)) {
return;
}
pendingPromisesCount++;
const promise = (async () => {
const {done, value} = await iterator.next();
if (done) {
pendingPromisesCount--;
return {done: true};
}
// Spawn if still below concurrency and backpressure limit
trySpawn();
try {
const returnValue = await mapper(await value, index++);
pendingPromisesCount--;
if (returnValue === pMapSkip) {
const index = promises.indexOf(promise);
if (index > 0) {
promises.splice(index, 1);
}
}
// Spawn if still below backpressure limit and just dropped below concurrency limit
trySpawn();
return {done: false, value: returnValue};
} catch (error) {
pendingPromisesCount--;
isDone = true;
return {error};
}
})();
promises.push(promise);
}
trySpawn();
while (promises.length > 0) {
const {error, done, value} = await promises[0]; // eslint-disable-line no-await-in-loop
promises.shift();
if (error) {
throw error;
}
if (done) {
return;
}
// Spawn if just dropped below backpressure limit and below the concurrency limit
trySpawn();
if (value === pMapSkip) {
continue;
}
yield value;
}
},
};
}
const pMapSkip = Symbol('skip');
/***/ })
};
//# sourceMappingURL=606.index.js.map
Generated Vendored
+1
View File
File diff suppressed because one or more lines are too long
Generated Vendored
+34 -88
View File
File diff suppressed because one or more lines are too long
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
Generated Vendored
+1 -3865
View File
File diff suppressed because it is too large Load Diff
Generated Vendored
+3
View File
@@ -0,0 +1,3 @@
{
"type": "module"
}
+1
View File
File diff suppressed because one or more lines are too long
Generated Vendored
-1
View File
File diff suppressed because one or more lines are too long
+52
View File
@@ -0,0 +1,52 @@
import {defineConfig} from 'eslint/config';
import js from '@eslint/js';
import tseslint from '@typescript-eslint/eslint-plugin';
import vitest from '@vitest/eslint-plugin';
import globals from 'globals';
import eslintConfigPrettier from 'eslint-config-prettier/flat';
import eslintPluginPrettier from 'eslint-plugin-prettier';
export default defineConfig([
{
ignores: ['.yarn/**/*', 'coverage/**/*', 'dist/**/*']
},
js.configs.recommended,
...tseslint.configs['flat/recommended'],
eslintConfigPrettier,
{
languageOptions: {
globals: {
...globals.node
}
}
},
{
files: ['__tests__/**'],
...vitest.configs.recommended,
languageOptions: {
globals: {
...globals.node,
...vitest.environments.env.globals
}
},
rules: {
...vitest.configs.recommended.rules,
'vitest/no-conditional-expect': 'error',
'vitest/no-disabled-tests': 0
}
},
{
plugins: {
prettier: eslintPluginPrettier
},
rules: {
'prettier/prettier': 'error',
'@typescript-eslint/no-require-imports': [
'error',
{
allowAsImport: true
}
]
}
}
]);
-29
View File
@@ -1,29 +0,0 @@
import fs from 'fs';
import os from 'os';
import path from 'path';
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'docker-setup-compose-action-')).split(path.sep).join(path.posix.sep);
process.env = Object.assign({}, process.env, {
TEMP: tmpDir,
GITHUB_REPOSITORY: 'docker/setup-compose-action',
RUNNER_TEMP: path.join(tmpDir, 'runner-temp').split(path.sep).join(path.posix.sep),
RUNNER_TOOL_CACHE: path.join(tmpDir, 'runner-tool-cache').split(path.sep).join(path.posix.sep)
}) as {
[key: string]: string;
};
module.exports = {
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
testMatch: ['**/*.test.ts'],
transform: {
'^.+\\.ts$': 'ts-jest'
},
moduleNameMapper: {
'^csv-parse/sync': '<rootDir>/node_modules/csv-parse/dist/cjs/sync.cjs'
},
collectCoverageFrom: ['src/**/{!(main.ts),}.ts'],
coveragePathIgnorePatterns: ['lib/', 'node_modules/', '__tests__/'],
verbose: true
};
+21 -23
View File
@@ -1,16 +1,13 @@
{ {
"name": "docker-setup-compose", "name": "docker-setup-compose",
"description": "Set up Docker Compose", "description": "Set up Docker Compose",
"type": "module",
"main": "src/main.ts", "main": "src/main.ts",
"scripts": { "scripts": {
"build": "ncc build --source-map --minify --license licenses.txt", "build": "ncc build --source-map --minify --license licenses.txt",
"lint": "yarn run prettier && yarn run eslint", "lint": "eslint --max-warnings=0 .",
"format": "yarn run prettier:fix && yarn run eslint:fix", "format": "eslint --fix .",
"eslint": "eslint --max-warnings=0 .", "test": "vitest run"
"eslint:fix": "eslint --fix .",
"prettier": "prettier --check \"./**/*.ts\"",
"prettier:fix": "prettier --write \"./**/*.ts\"",
"test": "jest"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
@@ -23,24 +20,25 @@
], ],
"author": "Docker Inc.", "author": "Docker Inc.",
"license": "Apache-2.0", "license": "Apache-2.0",
"packageManager": "yarn@3.6.3", "packageManager": "yarn@4.9.2",
"dependencies": { "dependencies": {
"@actions/core": "^1.11.1", "@actions/core": "^3.0.0",
"@docker/actions-toolkit": "^0.53.0" "@docker/actions-toolkit": "^0.79.0"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^20.12.12", "@eslint/js": "^9.39.3",
"@typescript-eslint/eslint-plugin": "^7.9.0", "@types/node": "^24.11.0",
"@typescript-eslint/parser": "^7.9.0", "@typescript-eslint/eslint-plugin": "^8.56.1",
"@vercel/ncc": "^0.38.1", "@typescript-eslint/parser": "^8.56.1",
"eslint": "^8.57.0", "@vercel/ncc": "^0.38.4",
"eslint-config-prettier": "^9.1.0", "@vitest/coverage-v8": "^4.0.18",
"eslint-plugin-jest": "^28.5.0", "@vitest/eslint-plugin": "^1.6.9",
"eslint-plugin-prettier": "^5.1.3", "eslint": "^9.39.3",
"jest": "^29.7.0", "eslint-config-prettier": "^10.1.8",
"prettier": "^3.2.5", "eslint-plugin-prettier": "^5.5.5",
"ts-jest": "^29.1.2", "globals": "^17.3.0",
"ts-node": "^10.9.2", "prettier": "^3.8.1",
"typescript": "^5.4.5" "typescript": "^5.9.3",
"vitest": "^4.0.18"
} }
} }
+3 -3
View File
@@ -1,10 +1,10 @@
import * as core from '@actions/core'; import * as core from '@actions/core';
import * as actionsToolkit from '@docker/actions-toolkit'; import * as actionsToolkit from '@docker/actions-toolkit';
import {Docker} from '@docker/actions-toolkit/lib/docker/docker'; import {Docker} from '@docker/actions-toolkit/lib/docker/docker.js';
import {Toolkit} from '@docker/actions-toolkit/lib/toolkit'; import {Toolkit} from '@docker/actions-toolkit/lib/toolkit.js';
import * as context from './context'; import * as context from './context.js';
actionsToolkit.run( actionsToolkit.run(
// main // main
+4 -8
View File
@@ -1,9 +1,8 @@
{ {
"compilerOptions": { "compilerOptions": {
"module": "nodenext",
"moduleResolution": "nodenext",
"esModuleInterop": true, "esModuleInterop": true,
"target": "es6",
"module": "commonjs",
"strict": true,
"newLine": "lf", "newLine": "lf",
"outDir": "./lib", "outDir": "./lib",
"rootDir": "./src", "rootDir": "./src",
@@ -12,10 +11,7 @@
"resolveJsonModule": true, "resolveJsonModule": true,
"useUnknownInCatchVariables": false, "useUnknownInCatchVariables": false,
}, },
"exclude": [ "include": [
"./__tests__/**/*", "src/**/*.ts"
"./lib/**/*",
"node_modules",
"jest.config.ts"
] ]
} }
+16
View File
@@ -0,0 +1,16 @@
import {defineConfig} from 'vitest/config';
export default defineConfig({
test: {
clearMocks: true,
environment: 'node',
setupFiles: ['./__tests__/setup.unit.ts'],
include: ['**/*.test.ts'],
coverage: {
provider: 'v8',
reporter: ['clover'],
include: ['src/**/*.ts'],
exclude: ['src/**/main.ts']
}
}
});
+2637 -4848
View File
File diff suppressed because it is too large Load Diff