Skip to content

Commit

Permalink
fix: fixed INPUT_ARGS in the entrypoint.sh
Browse files Browse the repository at this point in the history
feat: temporarily removed some tests
  • Loading branch information
exelban committed Jun 3, 2022
1 parent fbe51cd commit c390c8d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 41 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,6 @@ name: tests
on: [push]

jobs:
default-cmd:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
curl --silent --fail https://raw.githubusercontent.com/rancher/k3d/main/install.sh | bash
k3d cluster delete testing
k3d cluster create testing
KUBECONFIG=$(k3d kubeconfig get testing | base64 | sed ':a;N;$!ba;s/\n//g')
echo "KUBE_CONFIG=${KUBECONFIG}" >> $GITHUB_ENV
- uses: ./
get-pods:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
curl --silent --fail https://raw.githubusercontent.com/rancher/k3d/main/install.sh | bash
k3d cluster delete testing
k3d cluster create testing
KUBECONFIG=$(k3d kubeconfig get testing | base64 | sed ':a;N;$!ba;s/\n//g')
echo "KUBE_CONFIG=${KUBECONFIG}" >> $GITHUB_ENV
- uses: ./
with:
args: get pods
multiply:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
curl --silent --fail https://raw.githubusercontent.com/rancher/k3d/main/install.sh | bash
k3d cluster delete testing
k3d cluster create testing
KUBECONFIG=$(k3d kubeconfig get testing | base64 | sed ':a;N;$!ba;s/\n//g')
echo "KUBE_CONFIG=${KUBECONFIG}" >> $GITHUB_ENV
- uses: ./
- uses: ./
with:
args: get pods
kustomize:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ branding:
inputs:
args:
description: 'Arguments for the CLI command'
required: true
required: false
runs:
using: 'docker'
image: 'Dockerfile'
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ if [ ! -f "$HOME/.kube/config" ]; then

kubectl config set-context default --cluster=default --namespace=default --user=cluster-admin > /dev/null
kubectl config use-context default > /dev/null
elif [[ $INPUT_ARGS == "kustomize" ]]; then :;
elif [[ $* == "kustomize" ]]; then :;
else
echo "No authorization data found. Please provide KUBE_CONFIG or KUBE_HOST variables. Exiting..."
exit 1
fi
fi

kubectl $INPUT_ARGS
kubectl $*

0 comments on commit c390c8d

Please sign in to comment.