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?
CodePudding user response:
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
.github
directory. For example,.github/actions/action-a
and.github/actions/action-b
.
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.