From f5ba25296570ecbe7a3744d522b1c9bf15e08a6a 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/5] 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 35ebfb10a6510a378745c1b3d39e2c292fa804ca 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/5] 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 07ce5f3c048475031daecab599a77b0dcb3d78f7 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/5] 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 8f1da6277ab9922c809c6cf7598076d60696d54d 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/5] 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 From 1117b0e13f2b84c3ea932a315bdc72870bdc1682 Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Mon, 27 Jan 2025 09:43:57 +0000 Subject: [PATCH 5/5] Fixes --- docs/installing.md | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/docs/installing.md b/docs/installing.md index 7be2fca092..67a773948e 100644 --- a/docs/installing.md +++ b/docs/installing.md @@ -134,7 +134,23 @@ 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. +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/) +to alter its behavior. + +To also enable [dependabot][dependabot] automatic updates, the newer versions of +ansible-lint action you should create a file similar to +[.github/dependabot.yml][.github/dependabot.yml] + +[dependabot]: https://docs.github.com/en/code-security/dependabot +[.github/dependabot.yml]: + https://github.com/ansible/ansible-lint/blob/main/.github/dependabot.yml#L13-L19 + +### Installing roles and collections from private repositories + 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. @@ -149,16 +165,3 @@ To install roles and collections from private repositories, you can: - -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/) -to alter its behavior. - -To also enable [dependabot][dependabot] automatic updates, the newer versions of -ansible-lint action you should create a file similar to -[.github/dependabot.yml][.github/dependabot.yml] - -[dependabot]: https://docs.github.com/en/code-security/dependabot -[.github/dependabot.yml]: - https://github.com/ansible/ansible-lint/blob/main/.github/dependabot.yml#L13-L19