From d5e4f8eed07b7ff78881d4a6891f27f80229e034 Mon Sep 17 00:00:00 2001 From: Jaypee Ignacio <7437006+jaypeeig@users.noreply.github.com> Date: Fri, 10 Jan 2025 14:25:36 +0800 Subject: [PATCH] Create action.yml --- .github/actions/files/check-affected/action.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/actions/files/check-affected/action.yml diff --git a/.github/actions/files/check-affected/action.yml b/.github/actions/files/check-affected/action.yml new file mode 100644 index 0000000..3bd2377 --- /dev/null +++ b/.github/actions/files/check-affected/action.yml @@ -0,0 +1,17 @@ +name: Check Affected Files +description: This action checks the affected files by comparing the current commit with the previous commit. +inputs: + commit_ref: + description: The commit reference to compare against. + required: false + default: 'HEAD^1' +runs: + using: 'composite' + steps: + - name: Get affected files + id: get_diff + shell: bash + run: | + echo "Fetching affected files..." + files=$(git diff --name-only ${{ inputs.commit_ref }} HEAD) + echo "Affected files: $files"