A GitHub Action to upload a file as a GitHub Actions Secret.
This repository is deprecated. I recommend to use the Github CLI instead and set up the following step:
...
- name: Upload kubeconfig as pipeline secret
run: |
echo ${{ secrets.PERSONAL_ACCESS_TOKEN }} | gh auth login --with-token
gh secret set KUBECONFIG -R ${{ github.repository }} -e ${{ env.ENVIRONMENT }} < kubeconfig.yml
...
name: file-secret
on:
- push
jobs:
file-secret:
name: File Secret
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@master
- name: Upload kubeconfig
uses: nicklasfrahm/file-secret-action@main
with:
token: ${{ secrets.PAT }}
scope: ${{ github.repository }}
secret: KUBECONFIG
file: kubeconfig.yml
See action.yml for more detailed information.
token
- personal access token with theworkflow
permission, the standardGITHUB_TOKEN
does not workscope
- name of the organisation or username and repositorysecret
- name of the secretfile
- file to be stored in secretvisibility
- visibility of the secret within the organization, currently only private and all are supported
This repository is archived and therefore frozen. Please maintain your own copies and forks.
This project is licensed under the MIT license.