Skip to content

ansible-lint validation on PR-5 #3

ansible-lint validation on PR-5

ansible-lint validation on PR-5 #3

Workflow file for this run

---
name: Ansible Lint
run-name: ansible-lint validation on PR-${{ github.event.pull_request.number }}
on:
pull_request:
branches: ["main", "devel"]
jobs:
prepare-container:
name: Prepare for container
runs-on: [self-hosted]
steps:
- name: prepare environment for container
run: |
loginctl enable-linger $(id -u)
export XDG_RUNTIME_DIR=/run/user/$(id -u)
export DOCKER_HOST="unix:$XDG_RUNTIME_DIR/podman/podman.sock"
sudo rm -rf /opt/actions-runner/_work/_temp/_github_home/.cache/
ansible-lint:
name: Ansible Lint
runs-on: [self-hosted]
needs: prepare-container
container:
image: ubuntu:22.04
options: --memory-swap "4g" --memory "3g" --security-opt label:disable
env:
DOCKER_HOST: unix:$XDG_RUNTIME_DIR/podman/podman.sock
steps:
- name: Prepare Container
run: |
apt-get -y update
apt-get -y install --no-install-recommends wget
apt-get -y install git lsb-release
env:
DEBIAN_FRONTEND: noninteractive
- name: Git checkout
uses: actions/checkout@v4
- name: Run ansible-lint
uses: ansible/ansible-lint@main
with:
working_directory: /__w/rhis-inventory/rhis-inventory