Skip to content
This repository has been archived by the owner on Apr 10, 2023. It is now read-only.

private repository checkout action via github apps

License

Notifications You must be signed in to change notification settings

caddijp/checkout-private-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

checkout-private-action

NOTE! Now, actions of the same owner's private repository are able to uses directly. Please see this article

This action checkout your private repository using GitHub Apps. You can use other private repository GitHub Actions code.

Prerequirements

Github Apps

To checkout private repository, you need to create Github Apps, and install it in your organizations. This GitHub Apps need contents read permission.

Then, you need to keep GitHub Apps ID and private key. We reccommend to keep these in GitHub Actions secrets.

Usage

# .github/worlflows/example.yml

jobs:
  example:
    # Assumed to run on ubuntu
    runs-on: ubuntu-latest
    ...
    steps:
    # checkout `<organiztion>/<repo>` contents to `./github/actions/common`
    - uses: caddijp/checkout-private-action@main
      with:
        app_id: ${{secrets.APP_ID}}
        secret_key: ${{secrets.APP_SECRET}}
        org: "<organiztion>"
        repo: "<repo>"
        ref: "main"
        dist: "./github/actions/common"
    # use action in checkout contents 
    - uses: ./github/actions/common/some_actions1
      with: ...
    - uses: ./github/actions/common/some_actions2
      with: ...

Limitation

Now we assume that this action run on ubuntu.

About

private repository checkout action via github apps

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages