Skip to content

Dependency image refactor #332

Dependency image refactor

Dependency image refactor #332

Workflow file for this run

name: Run Linter
on:
pull_request:
workflow_run:
workflows: [ "First Workflow" ]
types:
- completed
concurrency:
group: linter-${{ github.ref }}
cancel-in-progress: true
env:
DOCKER_DEPENDENCY_IMAGE_NAME: ghcr.io/genspectrum/lapis-silo-dependencies
jobs:
linter:
name: Build And Run linter
needs: linterDependencies
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event_name == 'pull_request' }}
env:
PR_NUMBER: ${{ github.event.number }}
container:
image: ${{ env.DOCKER_DEPENDENCY_IMAGE_NAME }}:commit-${{ github.sha }}

Check failure on line 26 in .github/workflows/linter.yml

View workflow run for this annotation

GitHub Actions / Run Linter

Invalid workflow file

The workflow is not valid. .github/workflows/linter.yml (Line: 26, Col: 14): Unrecognized named-value: 'env'. Located at position 1 within expression: env.DOCKER_DEPENDENCY_IMAGE_NAME
steps:
- uses: actions/checkout@v4
- shell: bash
name: Configure and run clang-tidy on changed files
run: |
mv /src/build .
cmake -DBUILD_WITH_CLANG_TIDY=on -D CMAKE_BUILD_TYPE=Debug -B build/Debug
echo "Successfully configured cmake"
files=""
PAGE=1
while true; do
page_files=$(curl -s \
"https://api.github.com/repos/${{ github.repository }}/pulls/${PR_NUMBER}/files?per_page=100&page=$PAGE" \
| jq -r '.[] | select(.status != "removed") | .filename')
# If there are no more files, break the loop
if [[ -z "$page_files" ]]; then
break
fi
files+="$page_files"$'\n'
PAGE=$((PAGE + 1))
done
echo "Changed files of this PR:"
echo "$files"
IFS=$'\n'
for file in $files; do
echo "Check ending for file: $file"
if [[ $file == *.cpp ]]; then
echo "Now linting the file: $file"
echo "cmake --build build/Debug --target ${file%.cpp}.o"
cmake --build build/Debug --target ${file%.cpp}.o
fi
done