Fix reportdb update with container #773
Workflow file for this run
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
name: Python checkstyle | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- '**.py' | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
paths: | |
- '**.py' | |
jobs: | |
checkstyle: | |
runs-on: ubuntu-latest | |
container: registry.opensuse.org/systemsmanagement/uyuni/master/docker/containers_tw/uyuni-master-python:latest | |
steps: | |
- uses: actions/checkout@v4 | |
- id: files | |
uses: Ana06/[email protected] | |
with: | |
filter: '*.py' | |
- id: filter-files | |
run: | | |
echo added_modified_renamed="$( echo '${{ steps.files.outputs.added_modified_renamed }}' | tr ' ' '\n' | grep -E '^(python|spacewalk|susemanager|containers)/' | tr '\n' ' ')" >> $GITHUB_ENV | |
- name: Run black on files | |
run: | | |
if [[ -z "$added_modified_renamed" ]]; then | |
echo "no files to check, OK" | |
else | |
black --check --diff -t py36 $added_modified_renamed | |
fi | |
- name: Run pylint on files | |
run: | | |
if [[ -z "$added_modified_renamed" ]]; then | |
echo "no files to check, OK" | |
else | |
pylint --rcfile=/root/.pylintrc $added_modified_renamed | |
fi |