Update README.md
This commit is contained in:
parent
927a8c5ba3
commit
89890d6f77
17
README.md
17
README.md
@ -93,18 +93,23 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
# -------------------------------------------------------------
|
||||||
|
# Using GitHub's API
|
||||||
# -------------------------------------------------------------
|
# -------------------------------------------------------------
|
||||||
# Event `pull_request`: Returns all changed pull request files.
|
# Event `pull_request`: Returns all changed pull request files.
|
||||||
# --------------------------------------------------------------
|
# --------------------------------------------------------------
|
||||||
job1: # Example 1 - Using GitHub's API
|
job1:
|
||||||
# NOTE:
|
# NOTE:
|
||||||
# - This is limited to pull_request* events and would raise an error for other events.
|
# - This is limited to pull_request* events and would raise an error for other events.
|
||||||
# - A maximum of 3000 files can be returned.
|
# - A maximum of 3000 files can be returned.
|
||||||
|
# - For more flexibility and no limitations see "Using local .git directory" below.
|
||||||
|
|
||||||
runs-on: ubuntu-latest # windows-latest | macos-latest
|
runs-on: ubuntu-latest # windows-latest | macos-latest
|
||||||
name: Test changed-files
|
name: Test changed-files
|
||||||
if: github.event_name != 'push'
|
if: github.event_name != 'push'
|
||||||
permissions:
|
permissions:
|
||||||
pull-requests: read
|
pull-requests: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
@ -116,11 +121,13 @@ jobs:
|
|||||||
echo "$file was changed"
|
echo "$file was changed"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# ------------------------------------------------------------------------------------------------------------
|
||||||
|
# Using local .git directory
|
||||||
# ------------------------------------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------------------------------------
|
||||||
# Event `push`: Compare the preceding commit -> to the current commit of the main branch.
|
# Event `push`: Compare the preceding commit -> to the current commit of the main branch.
|
||||||
# Event `pull_request`: Compare the last commit of main -> to the current commit of a Pull Request branch.
|
# Event `pull_request`: Compare the last commit of main -> to the current commit of a Pull Request branch.
|
||||||
# ------------------------------------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------------------------------------
|
||||||
job2: # Example 2 - Using local .git directory
|
job2:
|
||||||
runs-on: ubuntu-latest # windows-latest | macos-latest
|
runs-on: ubuntu-latest # windows-latest | macos-latest
|
||||||
name: Test changed-files
|
name: Test changed-files
|
||||||
steps:
|
steps:
|
||||||
@ -142,7 +149,7 @@ jobs:
|
|||||||
echo "$file was changed"
|
echo "$file was changed"
|
||||||
done
|
done
|
||||||
|
|
||||||
job3: # Example 3 - Using local .git directory
|
job3:
|
||||||
runs-on: ubuntu-latest # windows-latest | macos-latest
|
runs-on: ubuntu-latest # windows-latest | macos-latest
|
||||||
name: Test changed-files
|
name: Test changed-files
|
||||||
steps:
|
steps:
|
||||||
@ -162,7 +169,7 @@ jobs:
|
|||||||
echo "One or more files in the docs folder has changed."
|
echo "One or more files in the docs folder has changed."
|
||||||
echo "List all the files that have changed: ${{ steps.changed-files-specific.outputs.all_changed_files }}"
|
echo "List all the files that have changed: ${{ steps.changed-files-specific.outputs.all_changed_files }}"
|
||||||
|
|
||||||
job4: # Example 4 - Using local .git directory
|
job4:
|
||||||
runs-on: ubuntu-latest # windows-latest | macos-latest
|
runs-on: ubuntu-latest # windows-latest | macos-latest
|
||||||
name: Test changed-files
|
name: Test changed-files
|
||||||
steps:
|
steps:
|
||||||
@ -185,7 +192,7 @@ jobs:
|
|||||||
echo "One or more .js file(s) or any file in the static folder but not in the doc folder has changed."
|
echo "One or more .js file(s) or any file in the static folder but not in the doc folder has changed."
|
||||||
echo "List all the files that have changed: ${{ steps.changed-files-excluded.outputs.all_changed_files }}"
|
echo "List all the files that have changed: ${{ steps.changed-files-excluded.outputs.all_changed_files }}"
|
||||||
|
|
||||||
job5: # Example 5 - Using local .git directory
|
job5:
|
||||||
runs-on: ubuntu-latest # windows-latest | macos-latest
|
runs-on: ubuntu-latest # windows-latest | macos-latest
|
||||||
name: Test changed-files
|
name: Test changed-files
|
||||||
steps:
|
steps:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user