Docs: using a GitHub Action from another private repository
See original GitHub issueI think it would be great to update our README to showcase how to use a GitHub Action from another private repository.
As of actions/checkout@v2-beta
, it is possible to checkout a different private repository:
https://github.com/actions/checkout#checkout-a-different-private-repository
If the just-cloned private repository is a Docker container action containing a Dockerfile, action metadata file, and entrypoint, it’s possible to run it since uses
syntax supports citing actions in the same repository as the workflow:
Example:
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2-beta
with:
# Private version of https://github.com/actions/hello-world-docker-action
repository: USER/private-hello-world-docker-action
ref: refs/tags/v1
token: ${{ secrets.GitHub_PAT }} # `GitHub_PAT` is a secret that contains your PAT to clone that private repo
- name: Run the private action
uses: ./
with:
who-to-greet: "Mona the Octocat"
If the team is open to getting this documented, I’m happy to cut a PR. ✌️
Issue Analytics
- State:
- Created 4 years ago
- Reactions:62
- Comments:26 (1 by maintainers)
Top Results From Across the Web
Sharing actions and workflows from your private repository
You can share actions and reusable workflows from your private repository, without publishing them publicly, by allowing GitHub Actions workflows to access a ......
Read more >Managing GitHub Actions settings for a repository - GitHub Docs
On GitHub, navigate to the main page of the private repository. · Under your repository name, click Settings. · In the left sidebar,...
Read more >Sharing workflows, secrets, and runners with your organization
Learn how you can use organization features to collaborate with your team, by sharing starter workflows, secrets, and self-hosted runners.
Read more >Reusing workflows - GitHub Docs
The called workflow is stored in a private repository and the settings for that repository allow it to be accessed. For more information,...
Read more >Call actions and workflow of private repository #16243 - GitHub
It is possible to call actions of private repositories. However, calling workflows of private repositories is not possible. Are there any plans on...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
i am surprised this is not yet supported. For a lot of orgs with private repo’s this is going to be useful. I am hopeful that it comes back on a near roadmap.
Thanks for the documentation! Are there any concrete plans to support private actions natively in GH Actions?