Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions do-setup-kubectl/action.yml

This file was deleted.

32 changes: 15 additions & 17 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,27 @@ A collection of Kubernetes related GitHub actions.

## Actions

### Setup DigitalOcean
### Setup kubectl and Helm

Setup Digital-Ocean CLI and configure Kubernetes.
Setup kubectl and Helm using kubeconfig file.

#### Example

```yaml
- uses: aboutbits/github-actions-kubernetes/do-setup-kubectl@v2
- uses: aboutbits/github-actions-kubernetes/setup-kubectl-and-helm@v3
with:
digital-ocean-token: ${{ secrets.DIGITALOCEAN_TOKEN }}
cluster-name: ${{ env.CLUSTER_NAME }}
kubeconfig: ${{ secrets.KUBECONFIG }}
```

#### Inputs

The following inputs can be used as `step.with` keys:

| Name | Required/Default | Description |
|-----------------------|------------------|----------------------------------------|
| `digital-ocean-token` | required | DigitalOcean access token |
| `cluster-name` | required | Kubernetes cluster name |
| `helm-version` | `3.17.1` | The version of Helm to install and use |

| Name | Required/Default | Description |
|----------------|------------------|-----------------------------|
| `kubeconfig` | required | The kubeconfig file content |
| `kube-version` | `1.33.1` | The version of kubectl |
| `helm-version` | `3.17.3` | The version of Helm |

### Deploy to Kubernetes using kubectl

Expand All @@ -35,7 +33,7 @@ Deploy application to a Kubernetes Cluster. Requires Kubernetes to be configured
#### Example

```yaml
- uses: aboutbits/github-actions-kubernetes/kubectl-deploy@v2
- uses: aboutbits/github-actions-kubernetes/kubectl-deploy@v3
with:
deployment-file: 'infrastructure/kubernetes.prod.yml'
namespace-name: ${{ env.NAMESPACE_NAME }}
Expand All @@ -60,7 +58,7 @@ Deploy an application to a Kubernetes cluster using its Helm chart. Requires Kub
#### Example

```yaml
- uses: aboutbits/github-actions-kubernetes/helm-deploy@v2
- uses: aboutbits/github-actions-kubernetes/helm-deploy@v3
with:
helm-chart-version: "1.0.0"
helm-package: "my-app-chart"
Expand Down Expand Up @@ -99,16 +97,16 @@ In order to have a versioning in place and working, create lightweight tags that
Creating a new minor release:

```bash
git tag v2
git tag v3
git push --tags
```

Replacing an already existing minor release:

```bash
git tag -d v2
git push origin :refs/tags/v2
git tag v2
git tag -d v3
git push origin :refs/tags/v3
git tag v3
git push --tags
```

Expand Down
34 changes: 34 additions & 0 deletions setup-kubectl-and-helm/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 'Setup kubectl and Helm.'
description: 'Setup kubectl and Helm using kubeconfig file.'

inputs:
kubeconfig:
description: 'The kubeconfig file content'
required: true
kubectl-version:
description: 'kubectl version'
required: false
default: '1.33.1'
helm-version:
description: 'Helm version'
required: false
default: '3.17.3'

runs:
using: "composite"
steps:
- name: Setup kubectl
uses: azure/setup-kubectl@v4
with:
version: ${{ inputs.kubectl-version }}

- name: Setup kubeconfig file
run: |
mkdir -p ~/.kube
echo "${{ inputs.kubeconfig }}" > ~/.kube/config
chmod 600 ~/.kube/config

- name: Setup Helm
uses: azure/setup-helm@v4
with:
version: ${{ inputs.helm-version }}