Skip to content
file-plus

GitHub Action

Changed Filenames

v1 Latest version

Changed Filenames

file-plus

Changed Filenames

GitHub Action to fetch changed filenames in pull pequests

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Changed Filenames

uses: DawChihLiou/changed-files-action@v1

Learn more about this action in DawChihLiou/changed-files-action

Choose a version

Changed Files GitHub Action

This action returns all changed files in a pull request. The changed files includes added, modified, renamed, and removed files.

Inputs

Key Description Optional Default
token GitHub API Token secrets.GITHUB_TOKEN
output Output format string

Example

The following usage will use the default GitHub token and return changed filenames in string format.

- uses: DawChihLiou/changed-files@v1

The following usage will use a custom GitHub toek and return changed filenames in JSON.

- uses: DawChihLiou/changed-files@v1
  with:
    token: ${{ secrets.YOUR_GITHUB_TOKEN }}
    output: 'json'

Using the Action

- uses: DawChihLiou/changed-files@v1
  id: changed-files
  with:
    token: ${{ secrets.YOUR_GITHUB_TOKEN }}
    output: 'string'
  run: |
    echo "${{ steps.changed-files.outputs.filenames }}"