2 ms·
I generally like Actions but occasionally run into limitations (possibly my own). For example, I'd like to build an action that triggers a documentation update
by newman314 4y ago
I generally like Actions but occasionally run into limitations (possibly my own).
For example, I'd like to build an action that triggers a documentation update based on the path and filename that is changed.
on:
push:
branches:
- main
paths:
- */README.md
But there does not appear to be a way to pass a list of changed paths to the job.
- hk1337 4y agoMaybe keep your documentation in a single directory? on: push: branches: - main paths: - docs/** - README.md I use something similar for triggering different app workflows in a monorepo. *EDIT* Or in multiple directories but grouped into multiple documentation directories. on: push: branches: - main paths: - package1/docs/** - package2/docs/** - package3/docs/** - README.md
- thaeli 4y agoSee this action: https://github.com/tj-actions/changed-files https://github.com/tj-actions/changed-files
- callahad 4y agoGitHub Actions doesn't do anything to make this easy for you, but it's entirely possible to fall back on normal git operations to determine the files changed between two commits, e.g., https://stackoverflow.com/questions/1552340/how-to-list-only-the-names-of-files-that-changed-between-two-commits https://stackoverflow.com/questions/1552340/how-to-list-only...