{"id":23359788,"url":"https://github.com/firehed/deploy-to-kubernetes-action","last_synced_at":"2026-02-11T18:33:12.605Z","repository":{"id":37900281,"uuid":"390466957","full_name":"Firehed/deploy-to-kubernetes-action","owner":"Firehed","description":null,"archived":false,"fork":false,"pushed_at":"2022-06-14T16:56:33.000Z","size":36,"stargazers_count":2,"open_issues_count":6,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T09:21:12.432Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Firehed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-28T18:49:10.000Z","updated_at":"2024-09-18T16:03:00.000Z","dependencies_parsed_at":"2023-01-11T17:21:25.175Z","dependency_job_id":null,"html_url":"https://github.com/Firehed/deploy-to-kubernetes-action","commit_stats":{"total_commits":17,"total_committers":2,"mean_commits":8.5,"dds":0.3529411764705882,"last_synced_commit":"b651fe96d385988dd795880c81ddab4bca2b3228"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firehed%2Fdeploy-to-kubernetes-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firehed%2Fdeploy-to-kubernetes-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firehed%2Fdeploy-to-kubernetes-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Firehed%2Fdeploy-to-kubernetes-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Firehed","download_url":"https://codeload.github.com/Firehed/deploy-to-kubernetes-action/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248199136,"owners_count":21063641,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-21T11:11:58.236Z","updated_at":"2026-02-11T18:33:12.567Z","avatar_url":"https://github.com/Firehed.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deploy to Kubernetes Action\n\nThis action will run the `kubectl` commands to deploy an image to Kubernetes, and create all of the relevant release tracking information in Github's Deployments.\n\n## Inputs\n\n| Input | Required | Default | Description |\n|---|---|---|---|\n| `token` | **yes** | | Github Token (to create the Deployment record). Typically provide `${{ secrets.GITHUB_TOKEN }}`. |\n| `namespace` | no | | Namespace of the Kubernetes Deployment |\n| `deployment` | **yes** | | Deployment name |\n| `container` | **yes** | | Container name within the deployment |\n| `image` | **yes** | | Image to set in the container |\n| `environment` | **yes** | | Github environment name |\n| `ref` | no | Current commit hash | `ref` to attach to the deployment |\n| `production` | no | (varies) | Boolean indicating if this is an environment users will interact with |\n| `transient` | no | (varies) | Boolean indicating if this is an environment that may go away in the future |\n| `url` | no | | URL for where the deployment is accessible |\n| `wait` | no | `true` | Whether to wait for the rollout to complete before finishing |\n| `wait-timeout` | no | `5m` | Maximum time to wait for the rollout. If this timeout is reached, the step will fail and the deployment will be marked as failed on GitHub. Ignored if `wait` is `false`. |\n\n## Outputs\n\n| Output | Description |\n|---|---|\n| | |\n\n## Status tracking\n\nStarting in `v0.3.0`, this action will by default watch the rollout in the cluster and try to keep the status in GitHub in sync.\nIf the rollout does not complete within the timeout window (`wait-timeout`), the Deployment will be marked as failed.\nIt is advisable to tune the timeout based on your deployment circimstances; any value accepted by the `kubectl rollout status`'s `--timeout` flag will work (`3s`, `5m`, etc).\n\nNote: long deployments will result in increased billable time.\nTo disable rollout tracking entirely, run this action with `wait: false`.\nThis will cause the step to finish when the deployment command is _run_ without regard for completion or success (beyond the command failing outright), which was the default behavior in previous versions.\nIf you deploy very frequently, your deployments take a long time, or are cost-sensitive, this may be a better choice for you.\nSee [About billing for GitHub Actions](https://docs.github.com/en/billing/managing-billing-for-github-actions/about-billing-for-github-actions) for more info.\n\n## Authentication\n\nThis action uses `kubectl` internally to deploy images; you must already be authenticated to the cluster (and be using the correct context).\n\nDepending on a number of factors (e.g. managed vs self-run, which provder, etc.), this process can be cluster-specific.\nIf you are deploying to a managed Kubernetes cluster, it's best to follow any guidance they offer on how to securely authenticate within Github Actions.\n\nHowever, a bare-minimum guide is included in [AUTHENTICATION.md](AUTHENTICATION.md).\n\n## Example\n\nThe following Actions workflow file will:\n\n- Authenticate to the cluster\n- Deploy the image\n\n```yaml\non:\n  push:\n    branches:\n      - main\n\njobs:\n  deploy:\n    name: Deploy head of main to prod\n    runs-on: ubuntu-latest\n    steps:\n\n      - name: Get GKE credentials\n        uses: google-github-actions/get-gke-credentials@main\n        with:\n          cluster_name: ${{ secrets.GKE_CLUSTER_NAME }}\n          location: ${{ secrets.GKE_CLUSTER_LOCATION }}\n          credentials: ${{ secrets.GCP_SA_KEY }}\n\n      - uses: firehed/deploy-to-kubernetes-action@v0.3.0\n        with:\n          namespace: github-actions\n          deployment: www\n          container: server\n          image: my/image:${{ github.sha }}\n          token: ${{ secrets.GITHUB_TOKEN }}\n```\n\n## Known issues/Future features\n\n- You must authenticate to your cluster before this action\n- Specifically if using Google's `get-gke-credentials` action, if you are checking out code during the workflow job, you must do so before running that step (it creates a file, and checking out code after will remove that file)\n- Due to some conflicting magic behavior on Github's end, use of this action will produce strange results if used in conjunction with `jobs.\u003cjob_id\u003e.environment` configuration.\n  See [#4](https://github.com/Firehed/deploy-to-kubernetes-action/pull/4#issuecomment-897798467)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirehed%2Fdeploy-to-kubernetes-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffirehed%2Fdeploy-to-kubernetes-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffirehed%2Fdeploy-to-kubernetes-action/lists"}