Skip to content

plieberg/action-get-changed-files

 
 

Repository files navigation

Get changed folders github action

Get the changes folders/files between the latest commit, and the previous latest commit

Usage

- uses: Stockopedia/action-get-changed-files@v1
  id: get_changed
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    ignore: "**/*.js" # glob
    foldersOnly: true # to only include folders in the output
    format: json # either json, csv or newline
- name: Echo
  run: echo ${{ steps.get_changed.outputs.changed }}

Examples

In a scenario where your folder structure is like so

.github/
src/
    feature1/
    auth/
    health/
readme.md

Given an example action defined like

- uses: Stockopedia/action-get-changed-files@v1
  id: get_changed
  with:
    github-token: ${{ secrets.GITHUB_TOKEN }}
    ignore: "**/+(.github)"
    foldersOnly: false 
    format: csv
- name: Echo changed files
  run: echo ${{ steps.get_changed.outputs.changed }}

And you change a file in the feature1 folder, a file in the .github folder and the readme.md file, the result of echo ${{ steps.get_changed.outputs.changed }} above would be

feature1, readme.md

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.4%
  • JavaScript 1.6%