COMP: Add Github workflow for keeping pre-commit configuration up-to-… #3
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: CI (Build) | |
on: | |
# Triggers the workflow on push or pull request events | |
push: | |
branches: | |
- "main" | |
pull_request: | |
branches: | |
- "*" | |
# Allows running this workflow manually from the Actions tab | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
build-slicer: | |
name: Build Slicer | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
id: changes | |
with: | |
filters: | | |
paths-to-include: | |
- ".github/actions/slicer-build/**" | |
- "Applications/**" | |
- "Base/**" | |
- "CMake/**" | |
- "Extensions/**" | |
- "Libs/**" | |
- "Modules/**" | |
- "Resources/**" | |
- "Testing/**" | |
- "CMakeLists.txt" | |
- name: 'Build Slicer' | |
id: slicer-build | |
if: steps.changes.outputs.paths-to-include == 'true' | |
uses: ./.github/actions/slicer-build | |
- name: 'Upload Slicer package' | |
if: steps.changes.outputs.paths-to-include == 'true' | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
with: | |
name: slicer-package | |
path: ${{ github.workspace }}/${{ steps.slicer-build.outputs.package }} | |
retention-days: 1 |