Skip to content

Update

Update #102

Workflow file for this run

name: Checking Files Changed
on:
push:
branches:
- main
jobs:
# -------------------------------------------------------------
# Using GitHub's API is not supported for push events
# -------------------------------------------------------------
#
# ----------------------------------------------------------------------------------------------
# Using local .git history
# ----------------------------------------------------------------------------------------------
# Event `push`: Compare the preceding remote commit -> to the current commit of the main branch
# ----------------------------------------------------------------------------------------------
changed_files:
runs-on: ubuntu-latest # windows-latest || macos-latest
name: Test changed-files
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
# NOTE: `since_last_remote_commit: true` is implied by default and falls back to the previous local commit.
- name: List all changed files
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
for file in ${ALL_CHANGED_FILES}; do
echo "$file was changed"
done