Skip to content

saucal/action-maybe-create-repo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maybe Create Repo

This action ensures existence of a particular repo in GH. If it doesn't exist, it attempts to create it with the provided token.

Limitations

  • Requires organization to work. Doesn't currently support personal accounts.

Getting Started

The following example will create a repo within the same organization with the built suffix. Eg, if this runs on sample/repo, a repo would be created under sample/repo-built

- name: Ensure Repo Exists
  id: repo-check
  uses: saucal/action-maybe-create-repo@v1
  with:
    token: "GH_PERSONAL_TOKEN" # need a token that can create repos in an organization
    repo-suffix: "built"

Full options

- uses: saucal/action-maybe-create-repo@v1
  with:
    # Repo to use as a base
    repo: "${{ github.repository }}"

    # Token to use to create the repo. 
    # Defaults to autogenerated one but won't work due to permissions 🤪
    token: "${{ github.token }}"

    # Suffix to use on newly generated repo (appended to the current repo name)
    repo-suffix: "built"

    # Whether to exclude or not outside collaborators.
    exclude-outside-collaborators: true

Outputs

# Slug of the repo created
- ${{ steps.*.outputs.repo }}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published