corso/.github/workflows/_filechange_checker.yml
Keepers b739526bb5
use dorny version of skipping workflow jobs (#768)
## Description

The current action workflow skips cause requried
actions to be marked as passing until they fail,
not marked as incomplete until either passed,
failed, or skipped.  This change should provide
the latter behavior.


## Type of change

- [x] 🌻 Feature

## Issue(s)

* #744

## Test Plan

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-09-14 22:23:17 +00:00

37 lines
1.1 KiB
YAML

name: Filechange Checker
on:
workflow_call:
outputs:
fileschanged:
description: "'true' if src/** or .github/workflows/** files have changed in the branch"
value: ${{ jobs.file-change-check.outputs.fileschanged }}
jobs:
file-change-check:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
outputs:
fileschanged: ${{ steps.checker.outputs.fileschanged }}
steps:
- uses: actions/checkout@v3
# only run CI tests if the src folder or workflow actions have changed
- name: Check for file changes in src/ or .github/workflows/
uses: dorny/paths-filter@v2
id: dornycheck
with:
list-files: json
filters: |
src:
- 'src/**'
actions:
- '.github/workflows/**'
- name: Check dorny for changes in specified filepaths
id: checker
if: steps.dornycheck.outputs.src == 'true' || steps.dornycheck.outputs.actions == 'true'
run: |
echo "src or workflow file changes occurred"
echo ::set-output name=fileschanged::true