From 06f4ca6b7cddd0ec41bcea41328afe237dc6717c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Moen?= Date: Fri, 24 Jan 2025 08:06:24 +0100 Subject: [PATCH 1/4] docs: add documentation about how to use private repositories with the github action Add information from https://github.com/ansible/ansible-lint/issues/4060 to the documentation. --- docs/installing.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/docs/installing.md b/docs/installing.md index ec26ccdb66..3a70df4506 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -134,6 +134,20 @@ 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. +In order to install roles and collections from private repositories, you can +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), +then add it as a +[deploy secret](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository) +and add the following step before the ansible-lint step. +```yaml +- name: Prepare Git for Github + shell: bash + run: | + git config --global url."https://${{ secrets.ANSIBLE_LINT_TOKEN }}@github.com".insteadOf "https://github.com" + +``` + 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/) From d92a5eccc88bb6ce697d65e835663f12189c206a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Moen?= Date: Fri, 24 Jan 2025 08:24:25 +0100 Subject: [PATCH 2/4] docs: escape mkdocs makro --- docs/installing.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/installing.md b/docs/installing.md index 3a70df4506..40d18d6991 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -140,6 +140,7 @@ create an then add it as a [deploy secret](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository) and add the following step before the ansible-lint step. + ```yaml - name: Prepare Git for Github shell: bash @@ -147,6 +148,7 @@ and add the following step before the ansible-lint step. git config --global url."https://${{ secrets.ANSIBLE_LINT_TOKEN }}@github.com".insteadOf "https://github.com" ``` + 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 From bca5c68b095d49e6c1104443e6a65a5956d10436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Moen?= Date: Fri, 24 Jan 2025 08:35:15 +0100 Subject: [PATCH 3/4] ci: ignore spellcheck for endraw --- docs/installing.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/installing.md b/docs/installing.md index 40d18d6991..6ddc28f342 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -148,7 +148,9 @@ and add the following step before the ansible-lint step. git config --global url."https://${{ secrets.ANSIBLE_LINT_TOKEN }}@github.com".insteadOf "https://github.com" ``` - + 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 From ae3975581598acca530404c9994759d34ad5f12f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5vard=20Moen?= Date: Fri, 24 Jan 2025 17:56:28 +0100 Subject: [PATCH 4/4] docs: update with input from PR --- docs/installing.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/docs/installing.md b/docs/installing.md index 6ddc28f342..7be2fca092 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -134,12 +134,10 @@ 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. -In order to install roles and collections from private repositories, you can -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), -then add it as a -[deploy secret](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository) -and add the following step before the ansible-lint step. +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. ```yaml - name: Prepare Git for Github