Skip to content

Commit 6745e7c

Browse files
umglurfssbarnea
andauthored
Add documentation about how to use private repositories with the github action (#4491)
Co-authored-by: Sorin Sbarnea <[email protected]>
1 parent e885de5 commit 6745e7c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

docs/installing.md

+19
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,22 @@ ansible-lint action you should create a file similar to
146146
[dependabot]: https://docs.github.com/en/code-security/dependabot
147147
[.github/dependabot.yml]:
148148
https://github.com/ansible/ansible-lint/blob/main/.github/dependabot.yml#L13-L19
149+
150+
### Installing roles and collections from private repositories
151+
152+
To install roles and collections from private repositories, you can:
153+
154+
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)
155+
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)
156+
1. Add the following step before the ansible-lint step.
157+
<!-- {% raw %} -->
158+
```yaml
159+
- name: Prepare Git for Github
160+
shell: bash
161+
run: |
162+
git config --global url."https://${{ secrets.ANSIBLE_LINT_TOKEN }}@github.com".insteadOf "https://github.com"
163+
164+
```
165+
<!--
166+
# spell-checker:ignore endraw
167+
{% endraw %} -->

0 commit comments

Comments
 (0)