qazz92 / kubectl

13 stars 6 forks source link

Can't access files in my repo #1

Open aqabawe opened 4 years ago

aqabawe commented 4 years ago

Hello! I have a repo that has a file deployment.yaml in the root folder, I am trying to use this action to apply that file to my cluster. Using set image on a deployment that's already there works fine, I'm trying to figure out the case where I want to create a new deployment from scratch in a new namespace.

Here's the relevant snippet from my workflow:

- uses: actions/checkout@v2
- name: Create the deployment
  uses: qazz92/kubectl@1.0.3
  env:
    kube_confg_data: ${{ secrets.KUBE_CONFIG_DATA }}
    aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
    aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    aws_region: ${{ secrets.AWS_DEFAULT_REGION }}
  with:
    args: apply -f deployment.yaml -n ${{ needs.namespace.outputs.namespace }}

How ever deployment.yaml is not found, I get the following error:

+ sh -c 'aws configure set aws_access_key_id ***'
+ sh -c 'aws configure set aws_secret_access_key ***'
+ sh -c 'aws configure set region ***'
+ echo ***
+ base64 --decode
+ export 'KUBECONFIG=/tmp/config'
+ sh -c 'kubectl apply -f deployment.yaml -n namespace'
error: the path "deployment.yaml" does not exist