Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add documentation about how to use private repositories with the github action #4491

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/installing.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,22 @@ All the arguments are optional and most users should not need them:
- `requirements_file`: Path to the requirements.yml file to install role and
collection dependencies.

To install roles and collections from private repositories, you can:
1. Create an [access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#about-personal-access-tokens)
1. Add the token as an [deploy secret](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository)
1. Add the following step before the ansible-lint step.
<!-- {% raw %} -->
```yaml
- name: Prepare Git for Github
shell: bash
run: |
git config --global url."https://${{ secrets.ANSIBLE_LINT_TOKEN }}@github.com".insteadOf "https://github.com"

```
<!--
# spell-checker:ignore endraw
{% endraw %} -->

Due to limitations on how GitHub Actions are processing arguments, we do not
plan to provide extra options. You will have to make use of
[ansible-lint own configuration file](https://ansible.readthedocs.io/projects/lint/configuring/)
Expand Down
Loading