Code Monkey home page Code Monkey logo

gha-create-repo-secret-env's Introduction

GitHub Action - Secret creation/updation

This action is made for creating and updating GitHub secrets for a specific environment.

Usage

The action is quite simple and can be used for any GitHub organization, the main need is an [Personal Access Token] with the necessary permissions.

When something go wrong the action will throw an error and break the workflow.

Example workflow

name: My Workflow
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - name: Run action

      uses: <orgnization>/gha-create-repo-secret-for-env@main
      with:
        GitHubToken: ${{ secrets.PAT }}
        SecretName: "secret-name"
        SecretValue: "secret-value"
        Environment: "dev"
        Organization: "<orgnization>"
        Repository: "repository name"

Inputs

Input Description
GitHubToken Personal access token from GitHub - it must have permission to create projects in the requested organization
SecretName Secret name that needs to be added to a specific reposistpory within an environment
SecretValue Secret value that needs to be created/updated to a specific reposistpory within an environment
Environment Environment to which the secret needs to be created/updated
Organization Organization where to create the environments
Repository Repository name where the environment secret needs to be created/updated

Examples

Using the optional input

This is how to use the optional input.

    uses: ./gha-create-repo-secret-for-env/
    with:
      GitHubToken: ${{ secrets.PAT }}
      SecretName: "ClientID"
      SecretValue: "ClientID_Value"
      Environment: "dev"
      Organization: "<orgnization>"
      Repository: "npet-testingsolutionrepo"

gha-create-repo-secret-env's People

Contributors

aviavinashkr avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.