{"id":21496488,"url":"https://github.com/mlibrary/deploy-to-kubernetes","last_synced_at":"2026-03-19T20:37:32.537Z","repository":{"id":41965303,"uuid":"404757083","full_name":"mlibrary/deploy-to-kubernetes","owner":"mlibrary","description":"Action for deploying a ghcr image to a kuberenetes cluster","archived":false,"fork":false,"pushed_at":"2023-04-07T14:29:38.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-02-21T04:02:33.348Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mlibrary.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-09T14:37:13.000Z","updated_at":"2022-03-07T13:50:31.000Z","dependencies_parsed_at":"2023-01-21T12:00:54.589Z","dependency_job_id":null,"html_url":"https://github.com/mlibrary/deploy-to-kubernetes","commit_stats":{"total_commits":21,"total_committers":2,"mean_commits":10.5,"dds":"0.19047619047619047","last_synced_commit":"78ccb4e15169b330ed98ae0479fbab4d6c8ef76d"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlibrary%2Fdeploy-to-kubernetes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlibrary%2Fdeploy-to-kubernetes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlibrary%2Fdeploy-to-kubernetes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mlibrary%2Fdeploy-to-kubernetes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mlibrary","download_url":"https://codeload.github.com/mlibrary/deploy-to-kubernetes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244031154,"owners_count":20386534,"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-11-23T16:16:39.093Z","updated_at":"2026-01-03T21:45:28.056Z","avatar_url":"https://github.com/mlibrary.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# deploy-to-kubernetes\nAction for deploying a ghcr image to a kuberenetes cluster\n\nUses [kubectl set image](https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#-em-image-em-) command.\n\n## Example\nTo use this action to deploy a deployment image to the `web` deployment and `web` container:\n```\n   - name: Deploy to NAMESPACE\n      uses: mlibrary/deploy-to-kubernetes@v3\n      with:\n        registry_token: ${{ secrets.GITHUB_TOKEN }}\n        image: ghcr.io/myorganization/my_app:latest\n        cluster_ca: ${{ secrets.KUBERNETES_CA }}\n        cluster_server: my-kubernetes-server\n        namespace_token: ${{ secrets.NAMESPACE_CA }}\n        namespace: my-app-namespace\n       \n```\n\nTo use this action to deploy a cronjob image\n```\n   - name: Deploy to NAMESPACE\n      uses: mlibrary/deploy-to-kubernetes@v3\n      with:\n        registry_token: ${{ secrets.GITHUB_TOKEN }}\n        image: ghcr.io/myorganization/my_app:latest\n        cluster_ca: ${{ secrets.KUBERNETES_CA }}\n        cluster_server: my-kubernetes-server\n        namespace_token: ${{ secrets.NAMESPACE_CA }}\n        namespace: my-app-namespace\n        resource_type: cronjob\n        resource_name: my-cronjob-name\n        container: my-cronjob-name\n       \n```\n\n## Inputs\n\n### Required\n\n| Name | Description | \n|----------|-------------|\n| `registry_token` | The token to use to log in to the registry. For GHCR this shold be `${{ secrets.GITHUB_TOKEN }}`.|\n| `image`          | Image to deploy, e.g. `registry/organization/image_name:tag` |\n|`cluster_server`  | The Kubernetes server |\n| `cluster_ca`     | The Kubernetes cluster CA certificate, base64-encoded, e.g. from: \u003cbr/\u003e `cat ~/.kube/certs/my-cluster/k8s-ca.crt \\| base64`  |\n| `namespace_token`| A base64-encoded Kubernetes service account token that can be used to set the image for the given deployment in the given namespace, e.g. from: \u003cbr\u003e `kubectl -n my-namespace get -o json secret my-service-token \\| jq -r .data.token` |\n|`namespace`       | The Kubernetes namespace to deploy to.  |\n\n### Optional \n\n| Name | Description | Value |\n|------|-------------|-------|\n|`registry`| Registry to log in to | `ghcr.io` |\n|`registry_username`|  Username to log into the registry with | `${{ github.actor }}` |\n|`resource_type`| Any resource type, comma-separated set of resource types, or 'all'| `deployment` |\n|`resource_name`| Name of the resource whose image to set, a label selector like `--selector='app=someapp'`, or `--all` | `web` |\n|`container`| The container in the resource whose image to set, or \"*\" for all containers | `web` | \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlibrary%2Fdeploy-to-kubernetes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmlibrary%2Fdeploy-to-kubernetes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmlibrary%2Fdeploy-to-kubernetes/lists"}