🔑 File to Secret for GitHub Actions (deprecated)

A GitHub Action to upload a file as a GitHub Actions Secret.
Deprecation notice
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
...
Usage
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 the workflow
permission, the standard GITHUB_TOKEN
does not work
scope
- name of the organisation or username and repository
secret
- name of the secret
file
- file to be stored in secret
visibility
- visibility of the secret within the organization, currently only private and all are supported
Contributing
This repository is archived and therefore frozen. Please maintain your own copies and forks.
License
This project is licensed under the MIT license.