This action returns all changed files in a pull request. The changed files includes added, modified, renamed, and removed files.
- 🦄 It is actively maintained
- 💅 Minimalistic implementation
- 🌈 PRs and discussion are welcomed
Parameter | Description | Optional | Default |
---|---|---|---|
token | GitHub API Token | ✔ | secrets.GITHUB_TOKEN |
output | Output format | ✔ | string |
Property | Description | Type | Default |
---|---|---|---|
filenames | A list of filenames in the output format given in the input parameters | string | JSON |
"" |
Using The Default Parameters
The following usage will use the default GitHub token and return changed filenames in string format.
- uses: DawChihLiou/changed-files-action@v1
The output will look like this:
.github/workflows/ci.yaml src/index.js README.md
Using Custom Parameters
The following usage will use a custom GitHub toek and return changed filenames in JSON.
- uses: DawChihLiou/changed-files-action@v1
with:
token: ${{ secrets.YOUR_GITHUB_TOKEN }}
output: 'json'
The output will look like this:
[".github/workflows/ci.yaml", "src/index.js", "README.md"]
- uses: DawChihLiou/changed-files@v1
id: changed-files
with:
token: ${{ secrets.YOUR_GITHUB_TOKEN }}
output: 'string'
- name: Echo files
run: |
echo "${{ steps.changed-files.outputs.filenames }}"