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.
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.
# .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: ...
Now we assume that this action run on ubuntu.