Within a single Github action script, I'm looking to differentiate between commits on 2 different paths/directories. The below script is essentially what I'm trying to do. What I'm unsure about is how to determine the path committed to within an expression. For now I have github.event.path but that's probably wrong.
on:
push:
branches: [ master ]
paths:
- 'Path1/**'
- 'Path2/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: do something when Path1 directory has a commit
if: github.event.path == 'Path1/**'
run: <do something>
- name: do something when Path2 directory has a commit
if: github.event.path == 'Path2/**'
run: <do something else>