action-init

a GitHub action to initialize repositories created from templates in Kaskadi

MIT License

Stars
1
Committers
3

CodeClimate


What is this action for?

This action is initializing new repositories generated from the templates in Kaskadi

How to use it?

You can use the following code as a new GitHub Actions Workflow:

name: {YOUR-ACTION-NAME}
on: [{YOUR-ACTION-EVENT}]
jobs:
  {YOUR-JOB-NAME}:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: {YOUR-STEP-NAME}
      uses: kaskadi/action-init@master
      with:
        repoType: {REPOTYPE-VALUE}
      env:
        CC_TOKEN: {CC_TOKEN-VALUE}
        GH_ACCESS_TOKEN: {GH_ACCESS_TOKEN-VALUE}

Note: everything contained in single curly brackets ({ }) needs to be replaced by your desired values

Inputs:

Input Required Default Description
repoType true Type of repository to initialize. Accepted values are: action, api, lambda, element, layer

Environment variables:

Variable Required Description
CC_TOKEN false Code Climate token used for authenticating with Code Climate API. If this is not provided the action will not automatically add your repository to Code Climate.
GH_ACCESS_TOKEN false GitHub personal access token used for interacting with the calling GitHub repository. This must at least contain the repo scope to work as intended. If the token is not provided the action will not automatically update your secrets.

In order to sign the commit made by this action: add the following step before the one using action-init:

    - name: Import GPG key
      uses: crazy-max/ghaction-import-gpg@v2
      with:
        git_user_signingkey: true
        git_commit_gpgsign: true
      env:
        GPG_PRIVATE_KEY: ${{ secrets.{YOUR-GPG-PRIVATE-KEY} }}
        PASSPHRASE: ${{ secrets.{YOUR-GPG-PRIVATE-KEY-PASSPHRASE} }}

If you do not need to sign via GPG: simply replace the Import GPG key step of the job by:

    - name: Configure GitHub user
      run: |
        git config --global user.name $GH_USER_NAME
        git config --global user.email $GH_USER_EMAIL
      env:
        GH_USER_NAME: ${{ secrets.{YOUR-GITHUB-USER-NAME} }}
        GH_USER_EMAIL: ${{ secrets.{YOUR-GITHUB-USER-EMAIL} }}
Package Rankings
Top 21.31% on Github actions
Badges
Extracted from project README
Build status Static code analysis status Docs generation status
Related Projects