Skip to content

wip: run in docker

wip: run in docker #5

---
name: "Latest pylint-nautobot"
on: # yamllint disable-line rule:truthy rule:comments
schedule:
- cron: "0 3 */2 * *" # every other day at 3am
# TBD: Remove running on push
push: ~
jobs:
latest-pylint-nautobot:
runs-on: "ubuntu-22.04"
strategy:
fail-fast: true
matrix:
python-version: ["3.11"]
nautobot-version: ["stable"]
env:
INVOKE_NAUTOBOT_DEV_EXAMPLE_PYTHON_VER: "${{ matrix.python-version }}"
INVOKE_NAUTOBOT_DEV_EXAMPLE_NAUTOBOT_VER: "${{ matrix.nautobot-version }}"
steps:
- name: "Check out repository code"
uses: "actions/checkout@v4"
- name: "Setup environment"
uses: "networktocode/gh-action-setup-poetry-environment@v6"
- name: "Set up Docker Buildx"
id: "buildx"
uses: "docker/setup-buildx-action@v3"
- name: "Build"
uses: "docker/build-push-action@v5"
with:
builder: "${{ steps.buildx.outputs.name }}"
context: "./"
push: false
load: true
tags: "${{ env.APP_NAME }}/nautobot:${{ matrix.nautobot-version }}-py${{ matrix.python-version }}"
file: "./development/Dockerfile"
cache-from: "type=gha,scope=${{ matrix.nautobot-version }}-py${{ matrix.python-version }}"
cache-to: "type=gha,scope=${{ matrix.nautobot-version }}-py${{ matrix.python-version }}"
build-args: |
NAUTOBOT_VER=${{ matrix.nautobot-version }}
PYTHON_VER=${{ matrix.python-version }}
- name: "Copy credentials"
run: "cp development/creds.example.env development/creds.env"
- name: "Linting: pylint"
run: "poetry run invoke pylint --ref=u/snaselj-fix-deps"