Bumps [actions/setup-python](https://github.com/actions/setup-python) from 1 to 4. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v1...v4) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
75 lines
2.1 KiB
YAML
75 lines
2.1 KiB
YAML
---
|
|
name: "devsec.ssh_hardening"
|
|
on: # yamllint disable-line rule:truthy
|
|
workflow_dispatch:
|
|
push:
|
|
branches: [master]
|
|
paths:
|
|
- 'roles/ssh_hardening/**'
|
|
- 'molecule/ssh_hardening/**'
|
|
- '.github/workflows/ssh_hardening.yml'
|
|
pull_request:
|
|
branches: [master]
|
|
paths:
|
|
- 'roles/ssh_hardening/**'
|
|
- 'molecule/ssh_hardening/**'
|
|
- '.github/workflows/ssh_hardening.yml'
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-18.04
|
|
env:
|
|
PY_COLORS: 1
|
|
ANSIBLE_FORCE_COLOR: 1
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
molecule_distro:
|
|
- centos7
|
|
- centosstream8
|
|
- centosstream9
|
|
- rocky8
|
|
- rocky9
|
|
- fedora
|
|
- ubuntu1804
|
|
- ubuntu2004
|
|
- ubuntu2204
|
|
- debian10
|
|
- debian11
|
|
- amazon
|
|
# - arch # needs to be fixed
|
|
# - opensuse_tumbleweed # baseline is not compatible with suse
|
|
steps:
|
|
- name: Checkout repo
|
|
uses: actions/checkout@v3
|
|
with:
|
|
path: ansible_collections/devsec/hardening
|
|
submodules: true
|
|
|
|
- name: Set up Python 3.7
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: 3.7
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt install git
|
|
python -m pip install --no-cache-dir --upgrade pip
|
|
pip install -r requirements.txt
|
|
working-directory: ansible_collections/devsec/hardening
|
|
|
|
- name: Create default collection path symlink
|
|
run: |
|
|
mkdir -p /home/runner/.ansible
|
|
ln -s /home/runner/work/ansible-os-hardening/ansible-os-hardening /home/runner/.ansible/collections
|
|
|
|
- name: Test with molecule
|
|
run: |
|
|
if [ "$MOLECULE_DISTRO" = "opensuse_tumbleweed" ]; then
|
|
export MOLECULE_DOCKER_COMMAND="/usr/lib/systemd/systemd"
|
|
fi
|
|
molecule --version
|
|
molecule test -s ssh_hardening
|
|
env:
|
|
MOLECULE_DISTRO: ${{ matrix.molecule_distro }}
|
|
working-directory: ansible_collections/devsec/hardening
|