This commit is contained in:
Serhiy Mytrovtsiy 2019-10-25 19:45:54 +02:00
parent 6a304cd134
commit 183ae371e8
4 changed files with 28 additions and 20 deletions

3
.gitignore vendored
View File

@ -1,3 +1,2 @@
.idea
.git
.DS_Store
.git

View File

@ -1,17 +1,6 @@
FROM alpine:3.10.2
MAINTAINER Serhiy Mitrovtsiy <mitrovtsiy@ukr.net>
LABEL name="kubectl"
LABEL version="1.0.0"
LABEL repository="https://github.com/exelban/gcloud"
LABEL homepage="https://github.com/exelban/gcloud"
LABEL maintainer="Serhiy Mytrovtsiy <mitrovtsiy@ukr.net>"
LABEL com.github.actions.name="Kuberentes (k8s) cli - kubectl"
LABEL com.github.actions.description="GitHub Action for interacting with kubectl (k8s)"
LABEL com.github.actions.icon="terminal"
LABEL com.github.actions.color="blue"
ARG KUBE_VERSION="1.15.4"
COPY entrypoint.sh /entrypoint.sh

View File

@ -9,7 +9,7 @@ To use kubectl put this step into your workflow:
### Authorization with config file
```yaml
- uses: exelban/kubectl@master
- uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
@ -18,7 +18,7 @@ To use kubectl put this step into your workflow:
### Authorization with credentials
```yaml
- uses: exelban/kubectl@master
- uses: actions-hub/kubectl@master
env:
KUBE_HOST: ${{ secrets.KUBE_HOST }}
KUBE_USERNAME: ${{ secrets.KUBE_USERNAME }}
@ -73,7 +73,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: exelban/kubectl@master
- uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
@ -91,11 +91,11 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: exelban/kubectl@master
- uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
- uses: exelban/kubectl@master
- uses: actions-hub/kubectl@master
with:
args: get pods
```
@ -106,7 +106,7 @@ After accepting PR the new release will be created.
To use a specific version of kubectl use:
```yaml
- uses: exelban/kubectl@1.14.3
- uses: actions-hub/kubectl@1.14.3
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
with:
@ -114,4 +114,4 @@ To use a specific version of kubectl use:
```
## Licence
[MIT License](https://github.com/exelban/kubectl/blob/master/LICENSE)
[MIT License](https://github.com/actions-hub/kubectl/blob/master/LICENSE)

20
action.yml Normal file
View File

@ -0,0 +1,20 @@
name: 'Kuberentes (k8s) cli - kubectl'
description: 'GitHub Action for interacting with kubectl (k8s)'
author: 'Serhiy Mytrovtsiy <mitrovtsiy@ukr.net>'
branding:
icon: 'terminal'
color: 'blue'
inputs:
KUBE_CONFIG:
description: 'Kubernetes configuration'
KUBE_HOST:
description: 'Kubernetes cluster host (IP only, without protocol)'
KUBE_USERNAME:
description: 'Kubernetes cluster username'
KUBE_PASSWORD:
description: 'Kubernetes cluster password'
KUBE_CERTIFICATE:
description: 'Cluster CA certificate'
runs:
using: 'docker'
image: 'Dockerfile'