Skip to content

[zuul] Use the stf-crc-jobs project template (#34) #68

[zuul] Use the stf-crc-jobs project template (#34)

[zuul] Use the stf-crc-jobs project template (#34) #68

Workflow file for this run

name: lint-and-build
on: push
jobs:
clang-lint:
name: Lint code base
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Run clang-format-lint
uses: DoozyX/clang-format-lint-action@v0.11
with:
source: '.'
exclude: './build'
clangFormatVersion: 10
inplace: True
- name: Check build
run: docker run -i --volume $GITHUB_WORKSPACE:/src/sg-bridge:z --workdir /src/sg-bridge fedora:latest /bin/sh -c 'sh ./build/build_checks.sh'
- name: Commit in-place changes based on linting recommendations
uses: EndBug/add-and-commit@v9
with:
author_name: InfraWatch CI
author_email: robot@infra.watch
message: 'Committing clang-format changes'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
docker-build-check:
name: Check Dockerfile results in successful build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Check build of Dockerfile is successful
run: docker build -t sg-bridge:check-build -f build/Dockerfile .