diff --git a/.forgejo/workflows/ansible-galaxy.yml b/.forgejo/workflows/ansible-galaxy.yml index c853bd6..0fd40fb 100644 --- a/.forgejo/workflows/ansible-galaxy.yml +++ b/.forgejo/workflows/ansible-galaxy.yml @@ -16,8 +16,13 @@ jobs: - name: Install dependencies run: | - apt update; apt install --yes python3-pip patch - pip3 install --break-system-packages ansible aar-doc + # Install pipeline dependencies + apt update; apt install --yes python3-pip python3-ruamel.yaml patch + pip3 install --break-system-packages ansible-lint aar-doc + # Install collection dependencies + .forgejo/workflows/requirements.py + ansible-galaxy install -r requirements.yml + rm requirements.yml - name: Patch aar-doc run: | diff --git a/.forgejo/workflows/ansible-lint.yml b/.forgejo/workflows/ansible-lint.yml index 5079e39..ca2e218 100644 --- a/.forgejo/workflows/ansible-lint.yml +++ b/.forgejo/workflows/ansible-lint.yml @@ -13,8 +13,13 @@ jobs: - name: Install dependencies run: | - apt update; apt install --yes python3-pip patch + # Install pipeline dependencies + apt update; apt install --yes python3-pip python3-ruamel.yaml patch pip3 install --break-system-packages ansible-lint aar-doc + # Install collection dependencies + .forgejo/workflows/requirements.py + ansible-galaxy install -r requirements.yml + rm requirements.yml - name: Patch aar-doc run: | diff --git a/.forgejo/workflows/requirements.py b/.forgejo/workflows/requirements.py new file mode 100755 index 0000000..1eb0fe2 --- /dev/null +++ b/.forgejo/workflows/requirements.py @@ -0,0 +1,21 @@ +#!/usr/bin/env python3 + +from ruamel.yaml import YAML + +yaml = YAML() + +with open('galaxy.yml', 'r') as f: + galaxy = yaml.load(f) + +requirements = { + 'collections': [ + { + 'name': name, + 'version': version + } + for name, version in galaxy['dependencies'].items() + ] +} + +with open('requirements.yml', 'w') as f: + yaml.dump(requirements, f) diff --git a/requirements.yml b/requirements.yml new file mode 100644 index 0000000..8eedc77 --- /dev/null +++ b/requirements.yml @@ -0,0 +1,5 @@ +collections: +- name: community.podman + version: '>=1.16.2,<2.0.0' +- name: community.postgresql + version: '>=3.10.2,<4.0.0'