Compare commits
74 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ec75ae5ab7 | ||
|
|
4333ab5b20 | ||
|
|
e3cac49049 | ||
|
|
68bd4537bd | ||
|
|
f0ce41b71c | ||
|
|
ce451bf430 | ||
|
|
7592e9e855 | ||
|
|
999653c672 | ||
|
|
6cf4c21fdf | ||
|
|
09ee51bee3 | ||
|
|
8eced8a5df | ||
|
|
13fa1402a7 | ||
|
|
07ac0ac168 | ||
|
|
049d7fd639 | ||
|
|
2e90fbb74b | ||
|
|
2a9db54a6d | ||
|
|
d0d5671ef7 | ||
|
|
97120ff1f5 | ||
|
|
b2d4e1b488 | ||
|
|
9299962a59 | ||
|
|
ea35f7ea00 | ||
|
|
3399f8837f | ||
|
|
ac897da4f1 | ||
|
|
8e56bc097a | ||
|
|
f6d3fe5179 | ||
|
|
efa99ea361 | ||
|
|
6d8f9bd379 | ||
|
|
589fb70c81 | ||
|
|
7daee9e7cf | ||
|
|
99c80bdd47 | ||
|
|
5e7cbf5fdb | ||
|
|
b4d6d28988 | ||
|
|
8370e6e6ef | ||
|
|
aa31060851 | ||
|
|
54c56103aa | ||
|
|
e57fb1b8eb | ||
|
|
926735a61e | ||
|
|
d3ac2a064b | ||
|
|
91df40b882 | ||
|
|
28396e9658 | ||
|
|
3a66e2a7e4 | ||
|
|
35f3202fd5 | ||
|
|
2b30af482a | ||
|
|
a93bcf46e0 | ||
|
|
6d4c555c7d | ||
|
|
507a8c703d | ||
|
|
3a7052c24a | ||
|
|
782eb123a9 | ||
|
|
9134dac8f6 | ||
|
|
df12603b45 | ||
|
|
bb9b5e8363 | ||
|
|
31b9c0a541 | ||
|
|
ba0a561b13 | ||
|
|
8d35cbb00f | ||
|
|
82dd6547dc | ||
|
|
6d42539842 | ||
|
|
08dedfb681 | ||
|
|
f6d9fa10e0 | ||
|
|
9eb0d763ae | ||
|
|
51d2f88f07 | ||
|
|
90a06d6ba9 | ||
|
|
2cb2c9234e | ||
|
|
ac21d93904 | ||
|
|
a4637ea6e7 | ||
|
|
fd9998cf5f | ||
|
|
ea024b2d7f | ||
|
|
db4e584844 | ||
|
|
c6543c497a | ||
|
|
88f9f3efbb | ||
|
|
3af07c2040 | ||
|
|
3680129aa2 | ||
|
|
5d866cbe77 | ||
|
|
346f237a17 | ||
|
|
c037f1e7c5 |
@@ -208,6 +208,43 @@
|
||||
"test",
|
||||
"bug"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "levenleven",
|
||||
"name": "Aleksey Levenstein",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/6463364?v=4",
|
||||
"profile": "https://github.com/levenleven",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "dan-hill2802",
|
||||
"name": "Daniel Hill",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/5046322?v=4",
|
||||
"profile": "https://github.com/dan-hill2802",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "KeisukeYamashita",
|
||||
"name": "KeisukeYamashita",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/23056537?v=4",
|
||||
"profile": "https://keisukeyamashita.com",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "codesculpture",
|
||||
"name": "Aravind",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/63452117?v=4",
|
||||
"profile": "https://github.com/codesculpture",
|
||||
"contributions": [
|
||||
"code",
|
||||
"bug"
|
||||
]
|
||||
}
|
||||
],
|
||||
"contributorsPerLine": 7,
|
||||
|
||||
7
.github/workflows/codacy-analysis.yml
vendored
7
.github/workflows/codacy-analysis.yml
vendored
@@ -24,11 +24,6 @@ permissions:
|
||||
|
||||
jobs:
|
||||
codacy-security-scan:
|
||||
# Cancel other workflows that are running for the same branch
|
||||
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
name: Codacy Security Scan
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -39,7 +34,7 @@ jobs:
|
||||
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
|
||||
- name: Run Codacy Analysis CLI
|
||||
continue-on-error: true
|
||||
uses: codacy/codacy-analysis-cli-action@v4.3.0
|
||||
uses: codacy/codacy-analysis-cli-action@v4.4.0
|
||||
with:
|
||||
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
|
||||
# You can also omit the token and run the tools that support default configurations
|
||||
|
||||
18
.github/workflows/greetings.yml
vendored
Normal file
18
.github/workflows/greetings.yml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
name: Greetings
|
||||
|
||||
on: [pull_request_target, issues]
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
greeting:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/first-interaction@v1
|
||||
continue-on-error: true
|
||||
with:
|
||||
repo-token: ${{ secrets.PAT_TOKEN }}
|
||||
issue-message: "Thanks for reporting this issue, don't forget to star this project if you haven't already to help us reach a wider audience."
|
||||
pr-message: "Thanks for implementing a fix, could you ensure that the test covers your changes if applicable."
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Issue Comment Test
|
||||
name: Issue Comment Job Example
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Manual Test
|
||||
name: Manual Triggered Job Example
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -6,7 +6,6 @@ permissions:
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test changed-files
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Matrix Test
|
||||
name: Matrix Example
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Multi Job Test
|
||||
name: Multi Job Example
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
2
.github/workflows/sync-release-version.yml
vendored
2
.github/workflows/sync-release-version.yml
vendored
@@ -37,7 +37,7 @@ jobs:
|
||||
- name: Run git-cliff
|
||||
uses: tj-actions/git-cliff@v1
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v5.0.2
|
||||
uses: peter-evans/create-pull-request@v6.0.0
|
||||
with:
|
||||
base: "main"
|
||||
labels: "merge when passing"
|
||||
|
||||
114
.github/workflows/test.yml
vendored
114
.github/workflows/test.yml
vendored
@@ -2,7 +2,6 @@ name: CI
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -35,6 +34,9 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
files_changed: ${{ steps.changed_files.outputs.files_changed }}
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -43,7 +45,7 @@ jobs:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
|
||||
- name: Use Node.js 20.x
|
||||
uses: actions/setup-node@v4.0.1
|
||||
uses: actions/setup-node@v4.0.2
|
||||
with:
|
||||
cache: 'yarn'
|
||||
node-version: '20.x'
|
||||
@@ -58,7 +60,7 @@ jobs:
|
||||
yarn install
|
||||
|
||||
- name: Run eslint on changed files
|
||||
uses: tj-actions/eslint-changed-files@v22
|
||||
uses: tj-actions/eslint-changed-files@v23
|
||||
if: github.event_name == 'pull_request'
|
||||
with:
|
||||
token: ${{ secrets.PAT_TOKEN }}
|
||||
@@ -70,7 +72,7 @@ jobs:
|
||||
yarn all
|
||||
|
||||
- name: Verify Changed files
|
||||
uses: tj-actions/verify-changed-files@v17
|
||||
uses: tj-actions/verify-changed-files@v18
|
||||
id: changed_files
|
||||
with:
|
||||
files: |
|
||||
@@ -94,7 +96,7 @@ jobs:
|
||||
branch: ${{ github.head_ref }}
|
||||
|
||||
- name: Upload build assets
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: build-assets
|
||||
path: dist
|
||||
@@ -111,6 +113,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: needs.build.outputs.files_changed != 'true'
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout into dir1
|
||||
uses: actions/checkout@v4
|
||||
@@ -121,7 +125,7 @@ jobs:
|
||||
path: dir1
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-assets
|
||||
path: dir1/dist
|
||||
@@ -147,7 +151,7 @@ jobs:
|
||||
bash
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-assets
|
||||
path: dir2/dist
|
||||
@@ -185,7 +189,8 @@ jobs:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push' && needs.build.outputs.files_changed != 'true'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v4
|
||||
@@ -194,7 +199,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-assets
|
||||
|
||||
@@ -243,6 +248,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: needs.build.outputs.files_changed != 'true'
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
@@ -252,7 +259,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-assets
|
||||
|
||||
@@ -285,6 +292,8 @@ jobs:
|
||||
github.event_name == 'push' ||
|
||||
github.event_name == 'pull_request'
|
||||
) && needs.build.outputs.files_changed != 'true'
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
@@ -294,7 +303,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-assets
|
||||
|
||||
@@ -315,6 +324,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: needs.build.outputs.files_changed != 'true'
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -331,7 +342,7 @@ jobs:
|
||||
fetch-depth: ${{ matrix.fetch-depth }}
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-assets
|
||||
|
||||
@@ -354,6 +365,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: github.event_name != 'push' && needs.build.outputs.files_changed != 'true'
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
@@ -362,7 +375,7 @@ jobs:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-assets
|
||||
|
||||
@@ -381,6 +394,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: github.event_name != 'push' && needs.build.outputs.files_changed != 'true'
|
||||
permissions:
|
||||
contents: read
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 4
|
||||
@@ -396,7 +411,7 @@ jobs:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-assets
|
||||
|
||||
@@ -415,13 +430,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: needs.build.outputs.files_changed != 'true'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-assets
|
||||
|
||||
@@ -469,13 +485,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: needs.build.outputs.files_changed != 'true'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-assets
|
||||
|
||||
@@ -535,7 +552,7 @@ jobs:
|
||||
path: dir1
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-assets
|
||||
path: dir1/dist
|
||||
@@ -550,11 +567,46 @@ jobs:
|
||||
shell:
|
||||
bash
|
||||
|
||||
test-non-existing-repository:
|
||||
name: Test changed-files with non existing repository
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: github.event_name == 'push' && needs.build.outputs.files_changed != 'true'
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout into dir1
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
submodules: true
|
||||
fetch-depth: 0
|
||||
path: dir1
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-assets
|
||||
path: dir1/dist
|
||||
|
||||
- name: Run changed-files with non existing repository
|
||||
id: changed-files
|
||||
continue-on-error: true
|
||||
uses: ./dir1
|
||||
|
||||
- name: Verify failed
|
||||
if: steps.changed-files.outcome != 'failure'
|
||||
run: |
|
||||
echo "Expected: (failure) got ${{ steps.changed-files.outcome }}"
|
||||
exit 1
|
||||
|
||||
test-submodules:
|
||||
name: Test changed-files with submodule
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: needs.build.outputs.files_changed != 'true'
|
||||
permissions:
|
||||
contents: read
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 4
|
||||
@@ -570,7 +622,7 @@ jobs:
|
||||
fetch-depth: ${{ matrix.fetch-depth }}
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-assets
|
||||
|
||||
@@ -598,6 +650,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: needs.build.outputs.files_changed != 'true'
|
||||
permissions:
|
||||
contents: read
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 4
|
||||
@@ -613,7 +667,7 @@ jobs:
|
||||
fetch-depth: ${{ matrix.fetch-depth }}
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-assets
|
||||
|
||||
@@ -673,6 +727,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: needs.build.outputs.files_changed != 'true'
|
||||
permissions:
|
||||
contents: read
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 4
|
||||
@@ -688,7 +744,7 @@ jobs:
|
||||
fetch-depth: ${{ matrix.fetch-depth }}
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-assets
|
||||
|
||||
@@ -863,6 +919,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: needs.build.outputs.files_changed != 'true'
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v4
|
||||
@@ -896,6 +954,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: needs.build.outputs.files_changed != 'true'
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout branch
|
||||
uses: actions/checkout@v4
|
||||
@@ -937,6 +997,8 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
if: needs.build.outputs.files_changed != 'true'
|
||||
permissions:
|
||||
contents: read
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 4
|
||||
@@ -953,7 +1015,7 @@ jobs:
|
||||
fetch-depth: ${{ matrix.fetch-depth }}
|
||||
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-assets
|
||||
|
||||
@@ -987,6 +1049,8 @@ jobs:
|
||||
runs-on: ${{ matrix.platform }}
|
||||
needs: build
|
||||
if: needs.build.outputs.files_changed != 'true'
|
||||
permissions:
|
||||
contents: read
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 4
|
||||
@@ -1002,7 +1066,7 @@ jobs:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
fetch-depth: ${{ matrix.fetch-depth }}
|
||||
- name: Download build assets
|
||||
uses: actions/download-artifact@v3
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: build-assets
|
||||
- name: Dump GitHub context
|
||||
@@ -1017,7 +1081,7 @@ jobs:
|
||||
echo '${{ toJSON(steps.changed-files.outputs) }}'
|
||||
shell:
|
||||
bash
|
||||
- name: Run changed-files with dir name
|
||||
- name: Run changed-files with dir name pattern
|
||||
id: changed-files-dir-name
|
||||
uses: ./
|
||||
with:
|
||||
|
||||
4
.github/workflows/update-readme.yml
vendored
4
.github/workflows/update-readme.yml
vendored
@@ -27,7 +27,7 @@ jobs:
|
||||
uses: tj-actions/remark@v3
|
||||
|
||||
- name: Verify Changed files
|
||||
uses: tj-actions/verify-changed-files@v17
|
||||
uses: tj-actions/verify-changed-files@v18
|
||||
id: verify_changed_files
|
||||
with:
|
||||
files: |
|
||||
@@ -41,7 +41,7 @@ jobs:
|
||||
|
||||
- name: Create Pull Request
|
||||
if: failure()
|
||||
uses: peter-evans/create-pull-request@v5
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
with:
|
||||
base: "main"
|
||||
labels: "merge when passing"
|
||||
|
||||
41
.github/workflows/workflow-run-example.yml
vendored
Normal file
41
.github/workflows/workflow-run-example.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Workflow Run Example
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [Matrix Example]
|
||||
types: [completed]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
on-success:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: ./
|
||||
|
||||
- name: Echo list of changed files on success
|
||||
run: |
|
||||
echo "Changed files on success:"
|
||||
echo "${{ steps.changed-files.outputs.all_changed_files }}"
|
||||
|
||||
on-failure:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: ./
|
||||
|
||||
- name: Echo list of changed files on failure
|
||||
run: |
|
||||
echo "Changed files on failure:"
|
||||
echo "${{ steps.changed-files.outputs.all_changed_files }}"
|
||||
20
.github/workflows/workflow-run-test.yml
vendored
20
.github/workflows/workflow-run-test.yml
vendored
@@ -1,20 +0,0 @@
|
||||
name: Workflow Run Example
|
||||
on:
|
||||
workflow_run:
|
||||
workflows: [Matrix Test]
|
||||
types: [completed]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
on-success:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
- run: echo 'The triggering workflow passed'
|
||||
on-failure:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||
steps:
|
||||
- run: echo 'The triggering workflow failed'
|
||||
66
HISTORY.md
66
HISTORY.md
@@ -1,5 +1,71 @@
|
||||
# Changelog
|
||||
|
||||
# [42.0.2](https://github.com/tj-actions/changed-files/compare/v42.0.1...v42.0.2) - (2024-01-25)
|
||||
|
||||
## <!-- 0 -->🚀 Features
|
||||
|
||||
- Enhance error handling for non-git directories ([#1885](https://github.com/tj-actions/changed-files/issues/1885)) ([90a06d6](https://github.com/tj-actions/changed-files/commit/90a06d6ba9543371ab4df8eeca0be07ca6054959)) - (Tonye Jack)
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded to v42.0.1 ([#1884](https://github.com/tj-actions/changed-files/issues/1884))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([2cb2c92](https://github.com/tj-actions/changed-files/commit/2cb2c9234e9dc3b8eaac2ababc3f355e80e47963)) - (tj-actions[bot])
|
||||
|
||||
# [42.0.1](https://github.com/tj-actions/changed-files/compare/v42.0.0...v42.0.1) - (2024-01-24)
|
||||
|
||||
## <!-- 16 -->➕ Add
|
||||
|
||||
- Added missing changes and modified dist assets.
|
||||
([ea024b2](https://github.com/tj-actions/changed-files/commit/ea024b2d7f80389ba16e7084b20265cb7dfe230f)) - (GitHub Action)
|
||||
- Added missing changes and modified dist assets.
|
||||
([3af07c2](https://github.com/tj-actions/changed-files/commit/3af07c2040da68166f613248bd8e9cd28fb581e3)) - (GitHub Action)
|
||||
|
||||
## <!-- 26 -->🔄 Update
|
||||
|
||||
- Update env.ts ([3680129](https://github.com/tj-actions/changed-files/commit/3680129aa2971333ef3d148024520cdc5327a6b7)) - (Tonye Jack)
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- **deps:** Update dependency @types/node to v20.11.6 ([ac21d93](https://github.com/tj-actions/changed-files/commit/ac21d93904fb48e7f76ce4bd2a4d197f67e34abe)) - (renovate[bot])
|
||||
- **deps:** Update typescript-eslint monorepo to v6.19.1 ([a4637ea](https://github.com/tj-actions/changed-files/commit/a4637ea6e7d9a502f6edb845b6c65086c5bce55f)) - (renovate[bot])
|
||||
- **deps:** Update dependency ts-jest to v29.1.2 ([fd9998c](https://github.com/tj-actions/changed-files/commit/fd9998cf5fcac4b0fff205a58ec694bf596169c8)) - (renovate[bot])
|
||||
- **deps:** Lock file maintenance ([db4e584](https://github.com/tj-actions/changed-files/commit/db4e5848448e4b540e7e7dcbdc7aab3c88bfcf47)) - (renovate[bot])
|
||||
- Rename example worflows from test to example ([#1878](https://github.com/tj-actions/changed-files/issues/1878)) ([c6543c4](https://github.com/tj-actions/changed-files/commit/c6543c497aea61c2263b735dece03b23383441f0)) - (Tonye Jack)
|
||||
- Update README.md ([#1877](https://github.com/tj-actions/changed-files/issues/1877)) ([88f9f3e](https://github.com/tj-actions/changed-files/commit/88f9f3efbb5a8fe2acff4139babc1d6aeafa5e72)) - (Tonye Jack)
|
||||
- **deps:** Lock file maintenance ([5d866cb](https://github.com/tj-actions/changed-files/commit/5d866cbe77002ed91912202826ed253b808a9133)) - (renovate[bot])
|
||||
- **deps:** Update tj-actions/eslint-changed-files action to v23 ([#1875](https://github.com/tj-actions/changed-files/issues/1875)) ([346f237](https://github.com/tj-actions/changed-files/commit/346f237a1734287fa772ee254047beecabcdbdf2)) - (renovate[bot])
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded to v42 ([#1874](https://github.com/tj-actions/changed-files/issues/1874))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([c037f1e](https://github.com/tj-actions/changed-files/commit/c037f1e7c56c7884b2d7d24c36cd8a0bc2c20687)) - (tj-actions[bot])
|
||||
|
||||
# [42.0.0](https://github.com/tj-actions/changed-files/compare/v41.1.2...v42.0.0) - (2024-01-18)
|
||||
|
||||
## <!-- 0 -->🚀 Features
|
||||
|
||||
- Add support for include/exclude all nested files when a directory is specified and ends with a slash ([#1873](https://github.com/tj-actions/changed-files/issues/1873)) ([ae82ed4](https://github.com/tj-actions/changed-files/commit/ae82ed4ae04587b665efad2f206578aa6f0e8539)) - (Tonye Jack)
|
||||
|
||||
## <!-- 1 -->🐛 Bug Fixes
|
||||
|
||||
- Update input warning ([#1870](https://github.com/tj-actions/changed-files/issues/1870)) ([6c9dcea](https://github.com/tj-actions/changed-files/commit/6c9dcea4432fd0eb2f3e07c9149eab2807ce44b2)) - (Tonye Jack)
|
||||
|
||||
## <!-- 18 -->📝 Rename
|
||||
|
||||
- Unsupported REST API inputs constant name ([#1872](https://github.com/tj-actions/changed-files/issues/1872)) ([cbd5907](https://github.com/tj-actions/changed-files/commit/cbd59070e8276b539ecdfa0f2316db7b1599ea0f)) - (Tonye Jack)
|
||||
|
||||
## <!-- 7 -->⚙️ Miscellaneous Tasks
|
||||
|
||||
- **deps:** Update dependency prettier to v3.2.4 ([79b060d](https://github.com/tj-actions/changed-files/commit/79b060d4450764e6b54a73696c2d99134757db95)) - (renovate[bot])
|
||||
|
||||
## <!-- 9 -->⬆️ Upgrades
|
||||
|
||||
- Upgraded to v41.1.2 ([#1869](https://github.com/tj-actions/changed-files/issues/1869))
|
||||
|
||||
Co-authored-by: jackton1 <jackton1@users.noreply.github.com> ([434b67e](https://github.com/tj-actions/changed-files/commit/434b67ebc3051662cf28de12b8a7adb77aea522a)) - (tj-actions[bot])
|
||||
|
||||
# [41.1.2](https://github.com/tj-actions/changed-files/compare/v41.1.1...v41.1.2) - (2024-01-17)
|
||||
|
||||
## <!-- 0 -->🚀 Features
|
||||
|
||||
127
README.md
127
README.md
@@ -9,13 +9,13 @@
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||
|
||||
[](#contributors-)
|
||||
[](#contributors-)
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||
|
||||
## changed-files
|
||||
|
||||
Effortlessly track all changed files and directories relative to a target branch, preceding commit or the last remote commit returning **relative paths** from the project root using this GitHub action.
|
||||
Effortlessly track all changed files and directories relative to a target branch, the current branch (preceding commit or the last remote commit), multiple branches, or custom commits returning **relative paths** from the project root using this GitHub action.
|
||||
|
||||
> \[!NOTE]
|
||||
>
|
||||
@@ -28,7 +28,7 @@ Effortlessly track all changed files and directories relative to a target branch
|
||||
* [Features 🚀](#features-)
|
||||
* [Usage 💻](#usage-)
|
||||
* [On `pull_request` 🔀](#on-pull_request-)
|
||||
* [Using local .git history 📁](#using-local-git-history-)
|
||||
* [Using local .git directory 📁](#using-local-git-directory-)
|
||||
* [Using Github's API :octocat:](#using-githubs-api-octocat)
|
||||
* [On `push` ⬆️](#on-push-️)
|
||||
* [Other supported events :electron:](#other-supported-events-electron)
|
||||
@@ -54,7 +54,7 @@ Effortlessly track all changed files and directories relative to a target branch
|
||||
* Scales to handle large/mono repositories.
|
||||
* Supports Git submodules.
|
||||
* Supports [merge queues](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue) for pull requests.
|
||||
* Generates escaped [JSON output for running matrix jobs](https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-test.yml) based on changed files.
|
||||
* Generates escaped [JSON output for running matrix jobs](https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-example.yml) based on changed files.
|
||||
* Lists changed directories.
|
||||
* Limits matching changed directories to a specified maximum depth.
|
||||
* Optionally excludes the current directory.
|
||||
@@ -97,7 +97,7 @@ Visit the [discussions for more information](https://github.com/tj-actions/chang
|
||||
|
||||
Detect changes to all files in a Pull request relative to the target branch or since the last pushed commit.
|
||||
|
||||
#### Using local .git history 📁
|
||||
#### Using local .git directory 📁
|
||||
|
||||
```yaml
|
||||
name: CI
|
||||
@@ -119,10 +119,12 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0 # OR "2" -> To retrieve the preceding commit.
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------
|
||||
# Example 1
|
||||
# -----------------------------------------------------------------------------------------------------------
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
# To compare changes between the current commit and the last pushed remote commit set `since_last_remote_commit: true`. e.g
|
||||
# with:
|
||||
# since_last_remote_commit: true
|
||||
@@ -131,14 +133,16 @@ jobs:
|
||||
env:
|
||||
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
run: |
|
||||
for file in "$ALL_CHANGED_FILES"; do
|
||||
for file in ${ALL_CHANGED_FILES}; do
|
||||
echo "$file was changed"
|
||||
done
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------
|
||||
# Example 2
|
||||
# -----------------------------------------------------------------------------------------------------------
|
||||
- name: Get all changed markdown files
|
||||
id: changed-markdown-files
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
# Avoid using single or double quotes for multiline patterns
|
||||
files: |
|
||||
@@ -149,14 +153,16 @@ jobs:
|
||||
env:
|
||||
ALL_CHANGED_FILES: ${{ steps.changed-markdown-files.outputs.all_changed_files }}
|
||||
run: |
|
||||
for file in "$ALL_CHANGED_FILES"; do
|
||||
for file in ${ALL_CHANGED_FILES}; do
|
||||
echo "$file was changed"
|
||||
done
|
||||
|
||||
# -----------------------------------------------------------------------------------------------------------
|
||||
# Example 3
|
||||
# -----------------------------------------------------------------------------------------------------------
|
||||
- name: Get all test, doc and src files that have changed
|
||||
id: changed-files-yaml
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
files_yaml: |
|
||||
doc:
|
||||
@@ -186,10 +192,12 @@ jobs:
|
||||
echo "One or more doc file(s) has changed."
|
||||
echo "List all the files that have changed: $DOC_ALL_CHANGED_FILES"
|
||||
|
||||
# Example 3
|
||||
# -----------------------------------------------------------------------------------------------------------
|
||||
# Example 4
|
||||
# -----------------------------------------------------------------------------------------------------------
|
||||
- name: Get changed files in the docs folder
|
||||
id: changed-files-specific
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
files: docs/*.{js,html} # Alternatively using: `docs/**`
|
||||
files_ignore: docs/static.js
|
||||
@@ -231,13 +239,13 @@ jobs:
|
||||
steps:
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
|
||||
- name: List all changed files
|
||||
env:
|
||||
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
run: |
|
||||
for file in "$ALL_CHANGED_FILES"; do
|
||||
for file in ${ALL_CHANGED_FILES}; do
|
||||
echo "$file was changed"
|
||||
done
|
||||
```
|
||||
@@ -274,14 +282,14 @@ jobs:
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
# 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
|
||||
for file in ${ALL_CHANGED_FILES}; do
|
||||
echo "$file was changed"
|
||||
done
|
||||
...
|
||||
@@ -292,6 +300,7 @@ jobs:
|
||||
* [schedule](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule)
|
||||
* [release](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#release)
|
||||
* [workflow\_dispatch](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch)
|
||||
* [workflow\_run](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run)
|
||||
* [merge\_group](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#merge_group)
|
||||
* [issue\_comment](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment)
|
||||
* ...and many more
|
||||
@@ -312,14 +321,15 @@ Support this project with a :star:
|
||||
>
|
||||
> * When using `files_yaml*` inputs:
|
||||
> * All keys must start with a letter or `_` and contain only alphanumeric characters, `-`, or `_`.
|
||||
> For example, `test` or `test_key` or `tesT-key` are all valid.
|
||||
>
|
||||
> For example, `test` or `test_key` or `test-key` or `_test_key` are all valid.
|
||||
|
||||
## Inputs ⚙️
|
||||
|
||||
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
|
||||
|
||||
```yaml
|
||||
- uses: tj-actions/changed-files@v41
|
||||
- uses: tj-actions/changed-files@v42
|
||||
id: changed-files
|
||||
with:
|
||||
# Github API URL.
|
||||
@@ -478,7 +488,7 @@ Support this project with a :star:
|
||||
|
||||
# Output list of changed files in a JSON formatted
|
||||
# string which can be used for matrix jobs. Example:
|
||||
# https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-test.yml
|
||||
# https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-example.yml
|
||||
# Type: boolean
|
||||
# Default: "false"
|
||||
json: ''
|
||||
@@ -655,7 +665,7 @@ Support this project with a :star:
|
||||
| <a name="output_all_modified_files_count"></a>[all\_modified\_files\_count](#output_all_modified_files_count) | string | Returns the number of `all_modified_files` |
|
||||
| <a name="output_all_old_new_renamed_files"></a>[all\_old\_new\_renamed\_files](#output_all_old_new_renamed_files) | string | Returns only files that are <br>Renamed and lists their old <br>and new names. **NOTE:** This <br>requires setting `include_all_old_new_renamed_files` to `true`. <br>Also, keep in mind that <br>this output is global and <br>wouldn't be nested in outputs <br>generated when the `*_yaml_*` input <br>is used. (R) |
|
||||
| <a name="output_all_old_new_renamed_files_count"></a>[all\_old\_new\_renamed\_files\_count](#output_all_old_new_renamed_files_count) | string | Returns the number of `all_old_new_renamed_files` |
|
||||
| <a name="output_any_changed"></a>[any\_changed](#output_any_changed) | string | Returns `true` when any of <br>the filenames provided using the <br>`files*` or `files_ignore*` inputs has changed. i.e. <br>*includes a combination of all added, copied, modified and renamed files (ACMR)*. |
|
||||
| <a name="output_any_changed"></a>[any\_changed](#output_any_changed) | string | Returns `true` when any of <br>the filenames provided using the <br>`files*` or `files_ignore*` inputs have changed. i.e. <br>*includes a combination of all added, copied, modified and renamed files (ACMR)*. |
|
||||
| <a name="output_any_deleted"></a>[any\_deleted](#output_any_deleted) | string | Returns `true` when any of <br>the filenames provided using the <br>`files*` or `files_ignore*` inputs has been deleted. <br>(D) |
|
||||
| <a name="output_any_modified"></a>[any\_modified](#output_any_modified) | string | Returns `true` when any of <br>the filenames provided using the <br>`files*` or `files_ignore*` inputs has been modified. <br>i.e. *includes a combination of all added, copied, modified, renamed, and deleted files (ACMRD)*. |
|
||||
| <a name="output_changed_keys"></a>[changed\_keys](#output_changed_keys) | string | Returns all changed YAML keys <br>when the `files_yaml` input is <br>used. i.e. *key that contains any path that has either been added, copied, modified, and renamed (ACMR)* |
|
||||
@@ -666,7 +676,7 @@ Support this project with a :star:
|
||||
| <a name="output_modified_files"></a>[modified\_files](#output_modified_files) | string | Returns only files that are <br>Modified (M). |
|
||||
| <a name="output_modified_files_count"></a>[modified\_files\_count](#output_modified_files_count) | string | Returns the number of `modified_files` |
|
||||
| <a name="output_modified_keys"></a>[modified\_keys](#output_modified_keys) | string | Returns all modified YAML keys <br>when the `files_yaml` input is <br>used. i.e. *key that contains any path that has either been added, copied, modified, and deleted (ACMRD)* |
|
||||
| <a name="output_only_changed"></a>[only\_changed](#output_only_changed) | string | Returns `true` when only files <br>provided using the `files*` or `files_ignore*` inputs <br>has changed. i.e. *includes a combination of all added, copied, modified and renamed files (ACMR)*. |
|
||||
| <a name="output_only_changed"></a>[only\_changed](#output_only_changed) | string | Returns `true` when only files <br>provided using the `files*` or `files_ignore*` inputs <br>have changed. i.e. *includes a combination of all added, copied, modified and renamed files (ACMR)*. |
|
||||
| <a name="output_only_deleted"></a>[only\_deleted](#output_only_deleted) | string | Returns `true` when only files <br>provided using the `files*` or `files_ignore*` inputs <br>has been deleted. (D) |
|
||||
| <a name="output_only_modified"></a>[only\_modified](#output_only_modified) | string | Returns `true` when only files <br>provided using the `files*` or `files_ignore*` inputs <br>has been modified. (ACMRD). |
|
||||
| <a name="output_other_changed_files"></a>[other\_changed\_files](#output_other_changed_files) | string | Returns all other changed files <br>not listed in the files <br>input i.e. *includes a combination of all added, copied, modified and renamed files (ACMR)*. |
|
||||
@@ -707,7 +717,7 @@ The format of the version string is as follows:
|
||||
...
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
...
|
||||
```
|
||||
|
||||
@@ -720,7 +730,7 @@ The format of the version string is as follows:
|
||||
...
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
safe_output: false # set to false because we are using an environment variable to store the output and avoid command injection.
|
||||
|
||||
@@ -728,7 +738,7 @@ The format of the version string is as follows:
|
||||
env:
|
||||
ADDED_FILES: ${{ steps.changed-files.outputs.added_files }}
|
||||
run: |
|
||||
for file in "$ADDED_FILES"; do
|
||||
for file in ${ADDED_FILES}; do
|
||||
echo "$file was added"
|
||||
done
|
||||
...
|
||||
@@ -743,7 +753,7 @@ The format of the version string is as follows:
|
||||
...
|
||||
- name: Get all changed files and use a comma separator in the output
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
separator: ","
|
||||
...
|
||||
@@ -760,13 +770,13 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
|
||||
- name: List all added files
|
||||
env:
|
||||
ADDED_FILES: ${{ steps.changed-files.outputs.added_files }}
|
||||
run: |
|
||||
for file in "$ADDED_FILES"; do
|
||||
for file in ${ADDED_FILES}; do
|
||||
echo "$file was added"
|
||||
done
|
||||
...
|
||||
@@ -783,7 +793,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
||||
...
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
|
||||
- name: Run a step if my-file.txt was modified
|
||||
if: contains(steps.changed-files.outputs.modified_files, 'my-file.txt')
|
||||
@@ -804,7 +814,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
||||
|
||||
- name: Get changed files and write the outputs to a Txt file
|
||||
id: changed-files-write-output-files-txt
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
write_output_files: true
|
||||
|
||||
@@ -823,7 +833,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
||||
...
|
||||
- name: Get changed files and write the outputs to a JSON file
|
||||
id: changed-files-write-output-files-json
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
json: true
|
||||
write_output_files: true
|
||||
@@ -843,7 +853,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
||||
...
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
files: |
|
||||
my-file.txt
|
||||
@@ -866,7 +876,7 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Get changed files
|
||||
id: changed-files-specific
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
files: |
|
||||
my-file.txt
|
||||
@@ -891,7 +901,7 @@ See [inputs](#inputs) for more information.
|
||||
env:
|
||||
DELETED_FILES: ${{ steps.changed-files-specific.outputs.deleted_files }}
|
||||
run: |
|
||||
for file in "$DELETED_FILES"; do
|
||||
for file in ${DELETED_FILES}; do
|
||||
echo "$file was deleted"
|
||||
done
|
||||
|
||||
@@ -900,7 +910,7 @@ See [inputs](#inputs) for more information.
|
||||
env:
|
||||
DELETED_FILES: ${{ steps.changed-files-specific.outputs.deleted_files }}
|
||||
run: |
|
||||
for file in "$DELETED_FILES"; do
|
||||
for file in ${DELETED_FILES}; do
|
||||
echo "$file was deleted"
|
||||
done
|
||||
...
|
||||
@@ -917,7 +927,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
||||
...
|
||||
- name: Get changed files using a source file or list of file(s) to populate to files input.
|
||||
id: changed-files-specific-source-file
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
files_from_source_file: test/changed-files-list.txt
|
||||
...
|
||||
@@ -934,7 +944,7 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Get changed files using a source file or list of file(s) to populate to files input and optionally specify more files.
|
||||
id: changed-files-specific-source-file-and-specify-files
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
files_from_source_file: |
|
||||
test/changed-files-list.txt
|
||||
@@ -955,7 +965,7 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Get changed files using a different SHA
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
sha: ${{ github.event.pull_request.head.sha }}
|
||||
...
|
||||
@@ -972,7 +982,7 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Get changed files using a different base SHA
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
base_sha: ${{ github.event.pull_request.base.sha }}
|
||||
...
|
||||
@@ -1004,13 +1014,18 @@ jobs:
|
||||
|
||||
- name: Get changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
|
||||
- name: List changed files
|
||||
env:
|
||||
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||
run: |
|
||||
echo "List all the files that have changed: $ALL_CHANGED_FILES"
|
||||
|
||||
- name: Get changed files in the .github folder
|
||||
id: changed-files-specific
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
base_sha: ${{ steps.get-base-sha.outputs.base_sha }}
|
||||
files: .github/**
|
||||
|
||||
- name: Run step if any file(s) in the .github folder change
|
||||
@@ -1040,7 +1055,7 @@ See [inputs](#inputs) for more information.
|
||||
|
||||
- name: Run changed-files with defaults in dir1
|
||||
id: changed-files-for-dir1
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
path: dir1
|
||||
|
||||
@@ -1049,7 +1064,7 @@ See [inputs](#inputs) for more information.
|
||||
ADDED_FILES: |-
|
||||
${{ steps.changed-files-for-dir1.outputs.added_files }}
|
||||
run: |
|
||||
for file in "$ADDED_FILES"; do
|
||||
for file in ${ADDED_FILES}; do
|
||||
echo "$file was added"
|
||||
done
|
||||
...
|
||||
@@ -1066,13 +1081,13 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Run changed-files with quotepath disabled
|
||||
id: changed-files-quotepath
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
quotepath: "false"
|
||||
|
||||
- name: Run changed-files with quotepath disabled for a specified list of file(s)
|
||||
id: changed-files-quotepath-specific
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
files: test/test-è.txt
|
||||
quotepath: "false"
|
||||
@@ -1105,7 +1120,7 @@ See [inputs](#inputs) for more information.
|
||||
|
||||
- name: Run changed-files with the commit of the last successful test workflow run
|
||||
id: changed-files-base-sha-push
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
base_sha: ${{ steps.last_successful_commit_push.outputs.base }}
|
||||
...
|
||||
@@ -1132,7 +1147,7 @@ See [inputs](#inputs) for more information.
|
||||
|
||||
- name: Run changed-files with the commit of the last successful test workflow run on the main branch
|
||||
id: changed-files-base-sha-pull-request
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
base_sha: ${{ steps.last_successful_commit_pull_request.outputs.base }}
|
||||
...
|
||||
@@ -1158,7 +1173,7 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Run changed-files with dir_names
|
||||
id: changed-files-dir-names
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
dir_names: "true"
|
||||
...
|
||||
@@ -1175,7 +1190,7 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Run changed-files with JSON output
|
||||
id: changed-files-json
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
json: "true"
|
||||
...
|
||||
@@ -1192,13 +1207,13 @@ See [inputs](#inputs) for more information.
|
||||
...
|
||||
- name: Get changed-files since 2022-08-19
|
||||
id: changed-files-since
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
since: "2022-08-19"
|
||||
|
||||
- name: Get changed-files until 2022-08-20
|
||||
id: changed-files-until
|
||||
uses: tj-actions/changed-files@v41
|
||||
uses: tj-actions/changed-files@v42
|
||||
with:
|
||||
until: "2022-08-20"
|
||||
...
|
||||
@@ -1218,7 +1233,7 @@ See [inputs](#inputs) for more information.
|
||||
|
||||
* [coder/code-server: uses tj-actions/changed-files to automate detecting changes and run steps based on the outcome](https://github.com/coder/code-server/blob/c32a31d802f679846876b8ad9aacff6cf7b5361d/.github/workflows/build.yaml#L48)
|
||||
|
||||
* [tldr-pages/tldr: uses tj-actions/changed-files to automate detecting spelling errors](https://github.com/tldr-pages/tldr/blob/main/.github/workflows/codespell.yml#L14)
|
||||
* [tldr-pages/tldr: uses tj-actions/changed-files to automate detecting spelling errors](https://github.com/tldr-pages/tldr/blob/c1b714c55cb0048037b79a681a10d7f3ddb0164c/.github/workflows/codespell.yml#L18-L26)
|
||||
|
||||
* [nodejs/docker-node: uses tj-actions/changed-files to generate matrix jobs based on changes detected](https://github.com/nodejs/docker-node/blob/3c4fa6daf06a4786d202f2f610351837806a0380/.github/workflows/build-test.yml#L29)
|
||||
|
||||
@@ -1226,10 +1241,12 @@ See [inputs](#inputs) for more information.
|
||||
|
||||
* [aws-doc-sdk-examples: uses tj-actions/changed-files to automate testing](https://github.com/awsdocs/aws-doc-sdk-examples/blob/2393723ef6b0cad9502f4852f5c72f7be58ca89d/.github/workflows/javascript.yml#L22)
|
||||
|
||||
* [nhost: uses tj-actions/changed-files to automate testing based on changes detected](https://github.com/nhost/nhost/blob/main/.github/workflows/ci.yaml#L44-L48)
|
||||
* [nhost: uses tj-actions/changed-files to automate testing based on changes detected](https://github.com/nhost/nhost/blob/71a8ce444618a8ac4d660518172fba4883c4014b/.github/workflows/ci.yaml#L44-L48)
|
||||
|
||||
* [qmk\_firmware uses tj-actions/changed-files to run linters](https://github.com/qmk/qmk_firmware/blob/7a737235ffd49c32d2c5561e8fe53fd96baa7f96/.github/workflows/lint.yml#L30)
|
||||
|
||||
* [argo-workflows uses tj-actions/changed-files to run specific jobs based on changes detected](https://github.com/argoproj/argo-workflows/blob/baef4856ff2603c76dbe277c825eaa3f9788fc91/.github/workflows/ci-build.yaml#L34)
|
||||
|
||||
And many more...
|
||||
|
||||
### Scalability Example 📈
|
||||
@@ -1327,6 +1344,10 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/rodrigorfk"><img src="https://avatars.githubusercontent.com/u/1995033?v=4?s=100" width="100px;" alt="Rodrigo Fior Kuntzer"/><br /><sub><b>Rodrigo Fior Kuntzer</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=rodrigorfk" title="Code">💻</a> <a href="https://github.com/tj-actions/changed-files/commits?author=rodrigorfk" title="Tests">⚠️</a> <a href="https://github.com/tj-actions/changed-files/issues?q=author%3Arodrigorfk" title="Bug reports">🐛</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/levenleven"><img src="https://avatars.githubusercontent.com/u/6463364?v=4?s=100" width="100px;" alt="Aleksey Levenstein"/><br /><sub><b>Aleksey Levenstein</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=levenleven" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dan-hill2802"><img src="https://avatars.githubusercontent.com/u/5046322?v=4?s=100" width="100px;" alt="Daniel Hill"/><br /><sub><b>Daniel Hill</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=dan-hill2802" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://keisukeyamashita.com"><img src="https://avatars.githubusercontent.com/u/23056537?v=4?s=100" width="100px;" alt="KeisukeYamashita"/><br /><sub><b>KeisukeYamashita</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=KeisukeYamashita" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/codesculpture"><img src="https://avatars.githubusercontent.com/u/63452117?v=4?s=100" width="100px;" alt="Aravind"/><br /><sub><b>Aravind</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=codesculpture" title="Code">💻</a> <a href="https://github.com/tj-actions/changed-files/issues?q=author%3Acodesculpture" title="Bug reports">🐛</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -127,7 +127,7 @@ inputs:
|
||||
required: false
|
||||
default: "false"
|
||||
json:
|
||||
description: "Output list of changed files in a JSON formatted string which can be used for matrix jobs. Example: https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-test.yml"
|
||||
description: "Output list of changed files in a JSON formatted string which can be used for matrix jobs. Example: https://github.com/tj-actions/changed-files/blob/main/.github/workflows/matrix-example.yml"
|
||||
required: false
|
||||
default: "false"
|
||||
escape_json:
|
||||
@@ -266,9 +266,9 @@ outputs:
|
||||
all_changed_files_count:
|
||||
description: "Returns the number of `all_changed_files`"
|
||||
any_changed:
|
||||
description: "Returns `true` when any of the filenames provided using the `files*` or `files_ignore*` inputs has changed. i.e. *includes a combination of all added, copied, modified and renamed files (ACMR)*."
|
||||
description: "Returns `true` when any of the filenames provided using the `files*` or `files_ignore*` inputs have changed. i.e. *includes a combination of all added, copied, modified and renamed files (ACMR)*."
|
||||
only_changed:
|
||||
description: "Returns `true` when only files provided using the `files*` or `files_ignore*` inputs has changed. i.e. *includes a combination of all added, copied, modified and renamed files (ACMR)*."
|
||||
description: "Returns `true` when only files provided using the `files*` or `files_ignore*` inputs have changed. i.e. *includes a combination of all added, copied, modified and renamed files (ACMR)*."
|
||||
other_changed_files:
|
||||
description: "Returns all other changed files not listed in the files input i.e. *includes a combination of all added, copied, modified and renamed files (ACMR)*."
|
||||
other_changed_files_count:
|
||||
|
||||
25
dist/index.js
generated
vendored
25
dist/index.js
generated
vendored
@@ -1426,7 +1426,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
||||
exports.getEnv = void 0;
|
||||
const core = __importStar(__nccwpck_require__(2186));
|
||||
const getEnv = () => __awaiter(void 0, void 0, void 0, function* () {
|
||||
core.debug(`Process Env: ${JSON.stringify(process.env, null, 2)}`);
|
||||
core.debug(`Env: ${JSON.stringify(process.env, null, 2)}`);
|
||||
return {
|
||||
GITHUB_REF_NAME: process.env.GITHUB_REF_NAME || '',
|
||||
GITHUB_REF: process.env.GITHUB_REF || '',
|
||||
@@ -1868,8 +1868,7 @@ function run() {
|
||||
}
|
||||
else {
|
||||
if (!hasGitDirectory) {
|
||||
core.info(`Running on a ${github.context.eventName} event...`);
|
||||
throw new Error(`Can't find local .git in ${workingDirectory} directory. Please run actions/checkout before this action (Make sure the 'path' input is correct). If you intend to use Github's REST API note that only pull_request* events are supported.`);
|
||||
throw new Error(`Unable to locate the git repository in the given path: ${workingDirectory}.\n Please run actions/checkout before this action (Make sure the 'path' input is correct).\n If you intend to use Github's REST API note that only pull_request* events are supported. Current event is "${github.context.eventName}".`);
|
||||
}
|
||||
core.info('Using local .git directory');
|
||||
yield getChangedFilesFromLocalGitHistory({
|
||||
@@ -2457,6 +2456,9 @@ const isInsideWorkTree = ({ cwd }) => __awaiter(void 0, void 0, void 0, function
|
||||
ignoreReturnCode: true,
|
||||
silent: !core.isDebug()
|
||||
});
|
||||
if (stdout.trim() !== 'true') {
|
||||
core.debug(`The current working directory is not inside a git repository: ${cwd}`);
|
||||
}
|
||||
return stdout.trim() === 'true';
|
||||
});
|
||||
exports.isInsideWorkTree = isInsideWorkTree;
|
||||
@@ -6410,7 +6412,7 @@ var import_graphql = __nccwpck_require__(8467);
|
||||
var import_auth_token = __nccwpck_require__(334);
|
||||
|
||||
// pkg/dist-src/version.js
|
||||
var VERSION = "5.0.2";
|
||||
var VERSION = "5.1.0";
|
||||
|
||||
// pkg/dist-src/index.js
|
||||
var noop = () => {
|
||||
@@ -9726,7 +9728,7 @@ var import_endpoint = __nccwpck_require__(9440);
|
||||
var import_universal_user_agent = __nccwpck_require__(5030);
|
||||
|
||||
// pkg/dist-src/version.js
|
||||
var VERSION = "8.1.6";
|
||||
var VERSION = "8.2.0";
|
||||
|
||||
// pkg/dist-src/is-plain-object.js
|
||||
function isPlainObject(value) {
|
||||
@@ -9870,11 +9872,17 @@ async function getResponseData(response) {
|
||||
function toErrorMessage(data) {
|
||||
if (typeof data === "string")
|
||||
return data;
|
||||
let suffix;
|
||||
if ("documentation_url" in data) {
|
||||
suffix = ` - ${data.documentation_url}`;
|
||||
} else {
|
||||
suffix = "";
|
||||
}
|
||||
if ("message" in data) {
|
||||
if (Array.isArray(data.errors)) {
|
||||
return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`;
|
||||
return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`;
|
||||
}
|
||||
return data.message;
|
||||
return `${data.message}${suffix}`;
|
||||
}
|
||||
return `Unknown error: ${JSON.stringify(data)}`;
|
||||
}
|
||||
@@ -43975,6 +43983,9 @@ function httpRedirectFetch (fetchParams, response) {
|
||||
// https://fetch.spec.whatwg.org/#cors-non-wildcard-request-header-name
|
||||
request.headersList.delete('authorization')
|
||||
|
||||
// https://fetch.spec.whatwg.org/#authentication-entries
|
||||
request.headersList.delete('proxy-authorization', true)
|
||||
|
||||
// "Cookie" and "Host" are forbidden request-headers, which undici doesn't implement.
|
||||
request.headersList.delete('cookie')
|
||||
request.headersList.delete('host')
|
||||
|
||||
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@tj-actions/changed-files",
|
||||
"version": "41.1.2",
|
||||
"version": "42.0.2",
|
||||
"description": "Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.",
|
||||
"main": "lib/main.js",
|
||||
"publishConfig": {
|
||||
@@ -46,8 +46,8 @@
|
||||
"@types/micromatch": "^4.0.2",
|
||||
"@types/node": "^20.3.2",
|
||||
"@types/uuid": "^9.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "^6.0.0",
|
||||
"@typescript-eslint/parser": "^6.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
||||
"@typescript-eslint/parser": "^7.0.0",
|
||||
"@vercel/ncc": "^0.38.0",
|
||||
"eslint": "^8.43.0",
|
||||
"eslint-plugin-github": "^4.8.0",
|
||||
|
||||
@@ -429,7 +429,7 @@ export const getSHAForPullRequestEvent = async (
|
||||
|
||||
if (
|
||||
!github.context.payload.pull_request?.base?.ref ||
|
||||
github.context.payload.head?.repo?.fork === 'true'
|
||||
github.context.payload.pull_request?.head?.repo?.fork === true
|
||||
) {
|
||||
diff = '..'
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ export type Env = {
|
||||
GITHUB_WORKSPACE: string
|
||||
}
|
||||
export const getEnv = async (): Promise<Env> => {
|
||||
core.debug(`Process Env: ${JSON.stringify(process.env, null, 2)}`)
|
||||
core.debug(`Env: ${JSON.stringify(process.env, null, 2)}`)
|
||||
|
||||
return {
|
||||
GITHUB_REF_NAME: process.env.GITHUB_REF_NAME || '',
|
||||
|
||||
@@ -264,9 +264,8 @@ export async function run(): Promise<void> {
|
||||
})
|
||||
} else {
|
||||
if (!hasGitDirectory) {
|
||||
core.info(`Running on a ${github.context.eventName} event...`)
|
||||
throw new Error(
|
||||
`Can't find local .git in ${workingDirectory} directory. Please run actions/checkout before this action (Make sure the 'path' input is correct). If you intend to use Github's REST API note that only pull_request* events are supported.`
|
||||
`Unable to locate the git repository in the given path: ${workingDirectory}.\n Please run actions/checkout before this action (Make sure the 'path' input is correct).\n If you intend to use Github's REST API note that only pull_request* events are supported. Current event is "${github.context.eventName}".`
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -680,6 +680,12 @@ export const isInsideWorkTree = async ({
|
||||
}
|
||||
)
|
||||
|
||||
if (stdout.trim() !== 'true') {
|
||||
core.debug(
|
||||
`The current working directory is not inside a git repository: ${cwd}`
|
||||
)
|
||||
}
|
||||
|
||||
return stdout.trim() === 'true'
|
||||
}
|
||||
|
||||
@@ -902,7 +908,7 @@ export const canDiffCommits = async ({
|
||||
} else {
|
||||
const {exitCode, stderr} = await exec.getExecOutput(
|
||||
'git',
|
||||
['diff', '--quiet', sha1, sha2],
|
||||
['diff', '--no-patch', sha1, sha2],
|
||||
{
|
||||
cwd,
|
||||
ignoreReturnCode: true,
|
||||
|
||||
Reference in New Issue
Block a user