generated from linux-system-roles/template
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: support ansible-lint 2.16, ansible-test 2.16
- Loading branch information
Showing
6 changed files
with
22 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,9 @@ on: # yamllint disable-line rule:truthy | |
branches: | ||
- main | ||
workflow_dispatch: | ||
env: | ||
LSR_ROLE2COLL_NAMESPACE: fedora | ||
LSR_ROLE2COLL_NAME: linux_system_roles | ||
permissions: | ||
contents: read | ||
jobs: | ||
|
@@ -26,18 +29,21 @@ jobs: | |
- name: Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: Fix up role meta/main.yml namespace and name | ||
- name: Install tox, tox-lsr | ||
run: | | ||
set -euxo pipefail | ||
mm=meta/main.yml | ||
if [ -f "$mm" ]; then | ||
if ! grep -q '^ *namespace:' "$mm"; then | ||
sed "/galaxy_info:/a\ namespace: linux_system_roles" -i "$mm" | ||
fi | ||
if ! grep -q '^ *role_name:' "$mm"; then | ||
sed "/galaxy_info:/a\ role_name: bootloader" -i "$mm" | ||
fi | ||
fi | ||
pip3 install "git+https://github.com/linux-system-roles/[email protected]" | ||
- name: Convert role to collection format | ||
run: | | ||
set -euxo pipefail | ||
TOXENV=collection lsr_ci_runtox | ||
coll_dir=".tox/ansible_collections/$LSR_ROLE2COLL_NAMESPACE/$LSR_ROLE2COLL_NAME" | ||
# ansible-lint action requires a .git directory??? | ||
# https://github.com/ansible/ansible-lint/blob/main/action.yml#L45 | ||
mkdir -p "$coll_dir/.git" | ||
- name: Run ansible-lint | ||
uses: ansible-community/ansible-lint-action@v6 | ||
uses: ansible/ansible-lint@v6 | ||
with: | ||
working_directory: .tox/ansible_collections/${{ env.LSR_ROLE2COLL_NAMESPACE }}/${{ env.LSR_ROLE2COLL_NAME }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
--- | ||
# Default state for all rules | ||
default: true | ||
|
||
|