file-secret-action

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2021 License: MIT Imports: 11 Imported by: 0

README

🔑 File to Secret for GitHub Actions (deprecated)

Go Report Card container

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

Input variables

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.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL