Skip to content

Commit 3759ffb

Browse files
authored
Merge pull request #9 from cityofships/fix-ci-linting
Revive CI workflow
2 parents b0ab37e + d832a79 commit 3759ffb

File tree

3 files changed

+24
-14
lines changed

3 files changed

+24
-14
lines changed

.github/workflows/main.yml

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# This is a basic workflow to help you get started with Actions
21

3-
name: Ansible lint
2+
name: CI
43

5-
# Controls when the action will run.
4+
# Controls when the action will run.
65
on:
76
# Triggers the workflow on push or pull request events but only for the master branch
87
push:
@@ -13,18 +12,27 @@ on:
1312
# Allows you to run this workflow manually from the Actions tab
1413
workflow_dispatch:
1514

16-
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1715
jobs:
18-
# This workflow contains a single job called "build"
19-
build:
20-
# The type of runner that the job will run on
16+
lint:
2117
runs-on: ubuntu-latest
22-
23-
# Steps represent a sequence of tasks that will be executed as part of the job
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
ansible:
22+
- stable-2.9
23+
- stable-2.10
24+
- devel
2425
steps:
25-
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26+
# Checks-out the repository under $GITHUB_WORKSPACE, so it's accessible to the job
2627
- uses: actions/checkout@v2
2728

28-
# Runs a single command using the runners shell
29-
- name: Lint Ansible playbook
30-
uses: ansible/ansible-lint-action@master
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
pip install git+https://github.com/ansible/ansible.git@${{ matrix.ansible }}
33+
pip install 'ansible-lint<5'
34+
ansible-galaxy collection install pulp.squeezer
35+
36+
- name: Linting code
37+
run: |
38+
ansible-lint -v --force-color

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# StackHPC pulp collection
22

3+
[![CI](https://github.com/stackhpc/ansible-collection-pulp/actions/workflows/main.yml/badge.svg)](https://github.com/stackhpc/ansible-collection-pulp/actions/workflows/main.yml)
4+
35
This repo contains `stackhpc.pulp` Ansible Collection. The collection includes roles supported by StackHPC for Pulp repository server configuration.
46
Note: Pulp server installation is out of this collection's scope - for this purpose please see [an official collection](https://galaxy.ansible.com/pulp/pulp_installer).
57

roles/pulp_repository/tasks/rpm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@
2626
password: "{{ pulp_password }}"
2727
repository: "{{ item.name }}"
2828
remote: "{{ item.name }}-remote"
29-
with_items: "{{ pulp_repository_rpm_repos}}"
29+
with_items: "{{ pulp_repository_rpm_repos }}"
3030
when: item.state == "present"

0 commit comments

Comments
 (0)