I have a Application Code in a Github Repo and I would like to customise certain stages of my Pipeline and would like to write my own custom action (in a private repo) since these custom action has to be placed in the repo where the actions is to be run can I save multiple actions in a single repo?
also is there any way where these repos can be used within a Organization in a private repo?
If you're building an action that you don't plan to make available to the public, you can store the action's files in any location in your repository. If you plan to combine action, workflow, and application code in a single repository, we recommend storing actions in the
.githubdirectory. For example,.github/actions/action-aand.github/actions/action-b.
source: https://docs.github.com/en/actions/creating-actions/about-custom-actions#choosing-a-location-for-your-action
name: Workflow using an action
on:
[your trigger here ...]
jobs:
job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/action-a
This works with private repositories in an organization, if you checkout the private repository containing the action and reference it relatively like in the example above.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With