Skip to content

fix: Update Lint CI to work with new precommits and repo structure #88

fix: Update Lint CI to work with new precommits and repo structure

fix: Update Lint CI to work with new precommits and repo structure #88

Workflow file for this run

---
name: Pi-Bot CI
# yamllint disable-line rule:truthy
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
# Cache version to control pre-commit caches
CACHE_VERSION: 0
# Location of the pre-commit cache. This is set by pre-commit, not us!
PRE_COMMIT_CACHE: ~/.cache/pre-commit
# Cancels previous runs targeting the same hash
concurrency:
group: >
${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.2.2
- name: Setup Python
uses: actions/setup-python@v5.6.0
- name: Install hadolint
run: >
sudo wget -O
/bin/hadolint
https://github.com/hadolint/hadolint/releases/download/v2.10.0/hadolint-Linux-x86_64
sudo chmod +x /bin/hadolint
- name: Setup precommit
uses: pre-commit/action@v3.0.1
env:
SKIP: no-commit-to-branch
build:
name: Build Image
needs: lint
if: "github.ref == 'refs/heads/main'"
uses: ./.github/workflows/build.yml