No description
  • TypeScript 99.6%
  • JavaScript 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
dependabot[bot] db352ae5e5
Some checks failed
CodeQL Advanced / Analyze (javascript-typescript) (push) Has been cancelled
Run prettify / Prettier Check (push) Has been cancelled
Run unit tests. / build (push) Has been cancelled
build(deps-dev): bump the minor-and-patch group with 3 updates (#300)
Bumps the minor-and-patch group with 3 updates: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [esbuild](https://github.com/evanw/esbuild) and [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest).


Updates `@types/node` from 26.2.0 to 26.3.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `esbuild` from 0.28.1 to 0.28.2
- [Release notes](https://github.com/evanw/esbuild/releases)
- [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md)
- [Commits](https://github.com/evanw/esbuild/compare/v0.28.1...v0.28.2)

Updates `vitest` from 4.1.10 to 4.1.11
- [Release notes](https://github.com/vitest-dev/vitest/releases)
- [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md)
- [Commits](https://github.com/vitest-dev/vitest/commits/v4.1.11/packages/vitest)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 26.3.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: minor-and-patch
- dependency-name: esbuild
  dependency-version: 0.28.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
- dependency-name: vitest
  dependency-version: 4.1.11
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: minor-and-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-09-10 10:50:46 -07:00
.github build(deps): bump the minor-and-patch group (#301) 2026-09-10 10:50:37 -07:00
.husky Add husky pre-commit hook. (#163) 2025-07-01 12:15:48 -07:00
src fix: write baked manifest into the workspace (#286) (#289) 2026-08-06 10:28:44 -07:00
testResources Vidya reddy/prettier code (#62) 2022-06-28 14:39:10 -04:00
.gitignore signed commit (#218) 2025-12-11 13:05:15 -08:00
.npmrc chore: enforce 7-day dependency freshness period + signed commit check (#295) 2026-08-07 13:19:41 -07:00
.prettierignore Vidya reddy/prettier code (#62) 2022-06-28 14:39:10 -04:00
.prettierrc.json Vidya reddy/prettier code (#62) 2022-06-28 14:39:10 -04:00
action.yml fix: write baked manifest into the workspace (#286) (#289) 2026-08-06 10:28:44 -07:00
CHANGELOG.md release: prepare v4.1.1 (#291) 2026-08-07 11:15:12 -04:00
CODE_OF_CONDUCT.md Security: remove updated action and fix prettier (#128) 2025-02-10 13:10:03 -08:00
CONTRIBUTING.md Vidya reddy/prettier code (#62) 2022-06-28 14:39:10 -04:00
esbuild.config.mjs fix: write baked manifest into the workspace (#286) (#289) 2026-08-06 10:28:44 -07:00
LICENSE Initial LICENSE commit 2019-10-22 02:44:46 -07:00
package-lock.json build(deps-dev): bump the minor-and-patch group with 3 updates (#300) 2026-09-10 10:50:46 -07:00
package.json build(deps-dev): bump the minor-and-patch group with 3 updates (#300) 2026-09-10 10:50:46 -07:00
README.md docs: refresh action versions in README examples (#296) 2026-08-11 19:30:34 -04:00
SECURITY.md Security: remove updated action and fix prettier (#128) 2025-02-10 13:10:03 -08:00
tsconfig.json migrate project to esm with esbuild and vitest (#252) 2026-04-10 17:00:35 +00:00
vitest.config.ts migrate project to esm with esbuild and vitest (#252) 2026-04-10 17:00:35 +00:00

Kubernetes bake action

Use this action to bake manifest files to be used for deployments using helm, kustomize or kompose.

Sets output variable 'manifestsBundle' which contains the location of the manifest bundles created by bake action.

Example

Bake using helm

- uses: azure/k8s-bake@v4
   with:
      renderEngine: 'helm'
      helmChart: './aks-helloworld/'
      arguments: |
          --ca-file
          ./ca-file/
      overrideFiles: './aks-helloworld/values-override.yaml'
      overrides: |
          replicas:2
      helm-version: '^3.0.0' # Use 'latest' to get the latest stable release (may include breaking changes across major versions)
      silent: 'false'

Helm Version Selection

The helm-version input supports semver-compatible version ranges. This is useful for ensuring compatibility while allowing automatic updates within a major version.

Examples:

  • ^3.0.0 - Use the latest helm v3.x.x release (default). This avoids breaking changes that may occur with helm v4.
  • ~3.12.0 - Use the latest helm v3.12.x patch release
  • v3.12.1 - Use an exact version
  • latest - Use the latest stable release (may include breaking changes across major versions)

Bake using Kompose

- uses: azure/k8s-bake@v4
  with:
     renderEngine: 'kompose'
     dockerComposeFile: './docker-compose.yml'
     kompose-version: 'latest'

Bake using Kubernetes Kustomize

- uses: azure/k8s-bake@v4
  with:
     renderEngine: 'kustomize'
     kustomizationPath: './kustomizeexample/'
     arguments: |
        --ca-file
        ./ca-file/
     kubectl-version: 'latest'

Refer to the action metadata file for details about all the inputs.

Output location

The baked manifest is written to a .k8s-bake directory inside GITHUB_WORKSPACE, and its full path is exposed as the manifestsBundle output. The manifest is removed at the end of the job, along with the directory if nothing else is in it.

Always consume the result through the output variable rather than hardcoding a path:

manifests: ${{ steps.bake.outputs.manifestsBundle }}

If your workflow checks for an unmodified checkout part way through the job, add the directory to your .gitignore:

.k8s-bake/

Note. Earlier versions wrote to RUNNER_TEMP, which sits outside GITHUB_WORKSPACE. k8s-deploy v7 rejects manifests that resolve outside the workspace, so bake output could no longer be deployed (#286). Workflows that read manifestsBundle need no changes.

End to end workflow for building container images and deploying to a Kubernetes cluster

on: [push]

jobs:
   build:
      runs-on: ubuntu-latest
      steps:
         - uses: actions/checkout@v7

         - uses: Azure/docker-login@v2
           with:
              login-server: contoso.azurecr.io
              username: ${{ secrets.REGISTRY_USERNAME }}
              password: ${{ secrets.REGISTRY_PASSWORD }}

         - run: |
              docker build . -t contoso.azurecr.io/k8sdemo:${{ github.sha }}
              docker push contoso.azurecr.io/k8sdemo:${{ github.sha }}

         - uses: Azure/k8s-set-context@v5
           with:
              kubeconfig: ${{ secrets.KUBE_CONFIG }}

         - uses: Azure/k8s-create-secret@v6
           with:
              container-registry-url: contoso.azurecr.io
              container-registry-username: ${{ secrets.REGISTRY_USERNAME }}
              container-registry-password: ${{ secrets.REGISTRY_PASSWORD }}
              secret-name: demo-k8s-secret

         - uses: azure/k8s-bake@v4
           with:
              renderEngine: 'helm'
              helmChart: './aks-helloworld/'
              overrideFiles: './aks-helloworld/values-override.yaml'
              overrides: |
                 replicas:2
              helm-version: 'latest'
           id: bake

         - uses: Azure/k8s-deploy@v7
           with:
              manifests: ${{ steps.bake.outputs.manifestsBundle }}
              images: |
                 demo.azurecr.io/k8sdemo:${{ github.sha }}
              imagepullsecrets: |
                 demo-k8s-secret

Development

This repository enforces a 7-day dependency freshness ("bake") period: newly published npm packages are not adopted until they have been available for at least 7 days, giving the ecosystem time to catch broken or malicious releases.

  • Dependabot uses a 7-day cooldown and opens PRs on the 1st and 15th of each month, grouping minor/patch updates into a single PR. Major updates are still raised individually so they get their own review.
  • .npmrc sets min-release-age=7 (days), which applies the same rule to local npm install. This requires npm >= 11.10.0; the version bundled with Node 24 (this action's runtime) satisfies that. On older npm the setting is ignored, so Dependabot's cooldown remains the authoritative control.

Security exception: to adopt an urgent patch that is less than 7 days old, install it once with the age check disabled:

npm install <pkg> --min-release-age=0

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

Support

k8s-bake is an open source project that is not covered by the Microsoft Azure support policy. Please search open issues here, and if your issue isn't already represented please open a new one. The project maintainers will respond to the best of their abilities.