actions with secret

im trying to create a secret in k8s using github actions like following (i’ve pre step which install lightweight k8s - k3s)

  - name: example tests
    shell: bash
    env:
      SUPER_SECRET: ${{ secrets.KUBECONFIG }}
   run: |
       kubectl create secret generic mysec --from-literal="$SUPER_SECRET" -n default

But I got error, any idea how to do it using github actions?

I use the settings->secrets and create a KUBECONFIG value and put the file content

in my local env I created a secret successfully with a kubeconfig file like:

 kubectl create secret generic mysec --from-file=./kubeconfig -n default

But in the CI I want to use it from the secret env in github …

what am I missing here?

What is the error you get?