Compare commits
359 Commits
v45
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f5ff3313fc | ||
|
|
3d37a7ff08 | ||
|
|
445b0eb328 | ||
|
|
4f892cd563 | ||
|
|
611865116d | ||
|
|
e517d7a5ca | ||
|
|
c23d52ba6f | ||
|
|
4750530ff4 | ||
|
|
22103cc46b | ||
|
|
6c02e900a2 | ||
|
|
05f9457d92 | ||
|
|
52ed872dd7 | ||
|
|
1cc5746379 | ||
|
|
de2962f9f4 | ||
|
|
37e96ccbfe | ||
|
|
2180b0f05d | ||
|
|
cf021c158c | ||
|
|
b54ac6f17f | ||
|
|
0f2a510bd7 | ||
|
|
35dace0375 | ||
|
|
9ee99eb5bd | ||
|
|
b7ac303c86 | ||
|
|
7dee1b0c15 | ||
|
|
28b28f6e4e | ||
|
|
875e6e5df8 | ||
|
|
8cba46e29c | ||
|
|
925972f627 | ||
|
|
a98754bb6a | ||
|
|
9c13e73478 | ||
|
|
caee9d94ce | ||
|
|
16d791cc10 | ||
|
|
8e056dec7d | ||
|
|
7d5bbf4e8d | ||
|
|
078e2bcd1e | ||
|
|
8c4da285a3 | ||
|
|
2f2f6cf099 | ||
|
|
8262acc559 | ||
|
|
b3bb1f8753 | ||
|
|
c6a5847dac | ||
|
|
daf9d2d497 | ||
|
|
3c4bc6fa0c | ||
|
|
cd7fbbcebb | ||
|
|
60a1a28396 | ||
|
|
e002140703 | ||
|
|
01ddfae411 | ||
|
|
a364493bbb | ||
|
|
45a2aae7ee | ||
|
|
a4f6de32d5 | ||
|
|
95fbe9b431 | ||
|
|
b3b97244a9 | ||
|
|
503bc3e7d7 | ||
|
|
3e9e5a2aa2 | ||
|
|
2b6c719845 | ||
|
|
043285ef6c | ||
|
|
abdd2f68ea | ||
|
|
1d08ab228c | ||
|
|
085eb10d7e | ||
|
|
72321d1f00 | ||
|
|
8c66df4f78 | ||
|
|
6da3c88b60 | ||
|
|
48b6e9756d | ||
|
|
4206138f17 | ||
|
|
31e663cd71 | ||
|
|
46fd332157 | ||
|
|
2d752abc95 | ||
|
|
70069877f2 | ||
|
|
5df1bad3a5 | ||
|
|
0ff001de08 | ||
|
|
52b808ab08 | ||
|
|
d6388b78bd | ||
|
|
cf5e80aa29 | ||
|
|
cff4543226 | ||
|
|
9dc1b5f80e | ||
|
|
dbf178ceec | ||
|
|
1900262303 | ||
|
|
27e5d78f9b | ||
|
|
d03a93c0db | ||
|
|
df9aabcdef | ||
|
|
d6f020b1d9 | ||
|
|
212f9a7760 | ||
|
|
0dc2215e58 | ||
|
|
28cf3adc4b | ||
|
|
0b7adf7963 | ||
|
|
4563c729c5 | ||
|
|
257f3acedc | ||
|
|
cac596ed08 | ||
|
|
4fb6914af9 | ||
|
|
2371aa7cd2 | ||
|
|
1ac6096503 | ||
|
|
24d32ffd49 | ||
|
|
9a6755550a | ||
|
|
b67e30df88 | ||
|
|
62aef422ff | ||
|
|
e874f3cddd | ||
|
|
8c14441336 | ||
|
|
e995ac4be5 | ||
|
|
3b04099b21 | ||
|
|
e7b6c977e5 | ||
|
|
765d62bc04 | ||
|
|
2036da178f | ||
|
|
239aef84a5 | ||
|
|
a7d5f5f491 | ||
|
|
5107f3abcc | ||
|
|
f963b3f356 | ||
|
|
f956744105 | ||
|
|
9009babdfa | ||
|
|
2ecafed8a9 | ||
|
|
8cdfb7636d | ||
|
|
087c158d0f | ||
|
|
c2ca249319 | ||
|
|
94d97fe3f8 | ||
|
|
18b05b98fc | ||
|
|
db8d0bfea5 | ||
|
|
0e2e8f70c5 | ||
|
|
5f2e971c1f | ||
|
|
498cf3f891 | ||
|
|
8378ac87b7 | ||
|
|
4bfe3cb5bd | ||
|
|
a0370f6169 | ||
|
|
4662f28b04 | ||
|
|
bc785e050c | ||
|
|
2d9b73795a | ||
|
|
d22a233bae | ||
|
|
055970845d | ||
|
|
5f66af5912 | ||
|
|
df49d58c47 | ||
|
|
cf79a64fed | ||
|
|
8dc8049ce8 | ||
|
|
61189527f9 | ||
|
|
e8772ff27d | ||
|
|
8917c3a23b | ||
|
|
8e3d814e36 | ||
|
|
6da46bc98b | ||
|
|
95dea818c4 | ||
|
|
6b214c1237 | ||
|
|
666c9d2900 | ||
|
|
d52d20fa3f | ||
|
|
f1c0eb9599 | ||
|
|
944a0f7239 | ||
|
|
3dbc1e1812 | ||
|
|
7a7221b7ba | ||
|
|
c260d49a82 | ||
|
|
b1ccff8c08 | ||
|
|
a892f50f7a | ||
|
|
5ca5422070 | ||
|
|
4140eb99d2 | ||
|
|
115870536a | ||
|
|
48aea2e1ab | ||
|
|
050a3d3360 | ||
|
|
f000a9b97f | ||
|
|
7a9a6d2105 | ||
|
|
abda8aa2d0 | ||
|
|
c6634ca281 | ||
|
|
860b02dbf9 | ||
|
|
3981e4f741 | ||
|
|
403a8a6fd1 | ||
|
|
5c5e8c9b88 | ||
|
|
d869acea43 | ||
|
|
480f494126 | ||
|
|
405524a214 | ||
|
|
b6970c44e6 | ||
|
|
11fe0a2263 | ||
|
|
e7b157b1c4 | ||
|
|
9132e0305b | ||
|
|
4168bb487d | ||
|
|
5426ecc3f5 | ||
|
|
513a44e609 | ||
|
|
46e217dc3e | ||
|
|
c34c1c13a7 | ||
|
|
52c3beb997 | ||
|
|
ea3010bc88 | ||
|
|
be393a9038 | ||
|
|
9b4bb2bedb | ||
|
|
9934ab3fdf | ||
|
|
db731a131c | ||
|
|
ed68ef82c0 | ||
|
|
a7bc14b808 | ||
|
|
3d751f6b6d | ||
|
|
e2fda4ec3c | ||
|
|
0bed1b1132 | ||
|
|
68024587dc | ||
|
|
cf2e39e86b | ||
|
|
6abeaa506a | ||
|
|
6f67ee9ac8 | ||
|
|
6cb76d07be | ||
|
|
b74df86ccb | ||
|
|
27ae6b33ea | ||
|
|
823fcebdb3 | ||
|
|
8132356842 | ||
|
|
7a369a7175 | ||
|
|
9468856c22 | ||
|
|
401c7227d1 | ||
|
|
41e0de576a | ||
|
|
945787811a | ||
|
|
26a38635fc | ||
|
|
a530a27a79 | ||
|
|
9cc867cd4a | ||
|
|
3a33fa99ab | ||
|
|
a5cad85977 | ||
|
|
f2f439bb2f | ||
|
|
678ecec172 | ||
|
|
6482371e86 | ||
|
|
0b975f6148 | ||
|
|
0fee5fb278 | ||
|
|
531f5f7d16 | ||
|
|
dccd1949ad | ||
|
|
9237eb7a0f | ||
|
|
d52b942ee0 | ||
|
|
45fb12d7a8 | ||
|
|
2f7c5bfce2 | ||
|
|
4189ec62c4 | ||
|
|
4cd184a1dd | ||
|
|
5cbf22026d | ||
|
|
0f1ffe6185 | ||
|
|
ddef03e37c | ||
|
|
9c2df0d54a | ||
|
|
65253327cf | ||
|
|
e37e952786 | ||
|
|
a284dc1814 | ||
|
|
9200e69727 | ||
|
|
e650cfdae5 | ||
|
|
82af21f4a0 | ||
|
|
82fa4a6402 | ||
|
|
315505acf4 | ||
|
|
c8e1cdb9ea | ||
|
|
bb6d1aa002 | ||
|
|
1f74fc9653 | ||
|
|
6f0fde1f0c | ||
|
|
056cdb7fc8 | ||
|
|
4bc859529c | ||
|
|
86d954fb8e | ||
|
|
33dce23cbf | ||
|
|
422be0138a | ||
|
|
601adb19b6 | ||
|
|
09f0e695d4 | ||
|
|
c7e81c8967 | ||
|
|
02e0175004 | ||
|
|
251f07ed52 | ||
|
|
fb8dcda5fb | ||
|
|
6fe3586909 | ||
|
|
df76a83fcb | ||
|
|
faaeb86b22 | ||
|
|
4919c5ae14 | ||
|
|
045c5414a3 | ||
|
|
563041e49c | ||
|
|
809f04b20a | ||
|
|
b1ba699b30 | ||
|
|
dcc7a0cba8 | ||
|
|
364748aaa8 | ||
|
|
301bed650e | ||
|
|
be1c47003f | ||
|
|
81785a6716 | ||
|
|
065e671731 | ||
|
|
45cd7f3ddd | ||
|
|
47f21ba558 | ||
|
|
3b3041225b | ||
|
|
eec6665cfd | ||
|
|
cefd9aa220 | ||
|
|
6296564d94 | ||
|
|
203f0af1aa | ||
|
|
8b824429a7 | ||
|
|
2b7a1ec20e | ||
|
|
a2600ce61d | ||
|
|
5dc51d3407 | ||
|
|
18de9f341f | ||
|
|
467e548138 | ||
|
|
556e62ac76 | ||
|
|
4f1e6b0db0 | ||
|
|
7b72c97d73 | ||
|
|
82deec73be | ||
|
|
ef7202db4d | ||
|
|
01c978c0f8 | ||
|
|
ed8e9f69ee | ||
|
|
d6e91a2266 | ||
|
|
73401cd676 | ||
|
|
7f28b2be82 | ||
|
|
c1f82ce4ba | ||
|
|
5f974c28f5 | ||
|
|
bb364ec4c8 | ||
|
|
7ac5902a02 | ||
|
|
7c5097f4aa | ||
|
|
37dc9a5e30 | ||
|
|
515a6b35d1 | ||
|
|
ac47125d2d | ||
|
|
ef3b6f1fa5 | ||
|
|
8082fbc636 | ||
|
|
bab30c2299 | ||
|
|
657a3f914f | ||
|
|
05f0aba931 | ||
|
|
462396174f | ||
|
|
c19a7eb771 | ||
|
|
c288441a7d | ||
|
|
1d6ea46cac | ||
|
|
02b41f5ff9 | ||
|
|
b4a4dcabce | ||
|
|
602aacf949 | ||
|
|
51290e039a | ||
|
|
b4badd8cce | ||
|
|
652b4c06e8 | ||
|
|
0b7a421316 | ||
|
|
b26581aca1 | ||
|
|
43e6b45c5d | ||
|
|
fe1bc0e3d3 | ||
|
|
d7917c6584 | ||
|
|
3f646a3549 | ||
|
|
6809677b7a | ||
|
|
4edd678ac3 | ||
|
|
f08255874b | ||
|
|
92c02a00a1 | ||
|
|
b70221184d | ||
|
|
435fd74b2e | ||
|
|
0626fa3ff3 | ||
|
|
8817a797cb | ||
|
|
54174910be | ||
|
|
84ef162530 | ||
|
|
b672a5115a | ||
|
|
678cdc2808 | ||
|
|
27b7bbb0ae | ||
|
|
83610723bb | ||
|
|
21acf46f4a | ||
|
|
f356b3c86b | ||
|
|
66275de060 | ||
|
|
a16702bf7a | ||
|
|
aa11897ec4 | ||
|
|
6513fe1691 | ||
|
|
45e0c78ac7 | ||
|
|
a949a8338c | ||
|
|
1f772e919b | ||
|
|
684c5e6d94 | ||
|
|
9d7201ded6 | ||
|
|
f93ff33629 | ||
|
|
729c70475c | ||
|
|
2009d446ac | ||
|
|
b693fc207f | ||
|
|
0104c75ccc | ||
|
|
4d0aab94b6 | ||
|
|
df3e9932c4 | ||
|
|
c3a1bb2c99 | ||
|
|
27843f1667 | ||
|
|
36d5b9dda5 | ||
|
|
9d4f8fea58 | ||
|
|
d0cf1645b7 | ||
|
|
641e22af4a | ||
|
|
8a4a9757b7 | ||
|
|
6bfa9e7a9a | ||
|
|
625dbd682e | ||
|
|
1a71128b6a | ||
|
|
c29c1d3dd0 | ||
|
|
e753fb0a63 | ||
|
|
e21f1a3077 | ||
|
|
792230fced | ||
|
|
4dbe54f96e | ||
|
|
537f1c6318 | ||
|
|
82587d8858 | ||
|
|
eda64a62bd | ||
|
|
4d5444c2c3 | ||
|
|
c2e104be2f | ||
|
|
eed685a419 | ||
|
|
6f538bb83f |
@@ -254,6 +254,34 @@
|
|||||||
"contributions": [
|
"contributions": [
|
||||||
"code"
|
"code"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "RajendraP",
|
||||||
|
"name": "Rajendra Pandey",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/8928165?v=4",
|
||||||
|
"profile": "https://github.com/RajendraP",
|
||||||
|
"contributions": [
|
||||||
|
"doc"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "undefined-moe",
|
||||||
|
"name": "undefined",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/29992205?v=4",
|
||||||
|
"profile": "https://undefined.moe/",
|
||||||
|
"contributions": [
|
||||||
|
"doc"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "Jellyfrog",
|
||||||
|
"name": "Jellyfrog",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/759887?v=4",
|
||||||
|
"profile": "https://github.com/Jellyfrog",
|
||||||
|
"contributions": [
|
||||||
|
"code",
|
||||||
|
"doc"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"contributorsPerLine": 7,
|
"contributorsPerLine": 7,
|
||||||
|
|||||||
6
.github/workflows/codacy-analysis.yml
vendored
6
.github/workflows/codacy-analysis.yml
vendored
@@ -29,12 +29,12 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
# Checkout the repository to the GitHub Actions runner
|
# Checkout the repository to the GitHub Actions runner
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
|
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
|
||||||
- name: Run Codacy Analysis CLI
|
- name: Run Codacy Analysis CLI
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: codacy/codacy-analysis-cli-action@v4.4.5
|
uses: codacy/codacy-analysis-cli-action@562ee3e92b8e92df8b67e0a5ff8aa8e261919c08 # v4.4.7
|
||||||
with:
|
with:
|
||||||
# Check https://github.com/codacy/codacy-analysis-cli#project-token to get your project token from your Codacy repository
|
# 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
|
# You can also omit the token and run the tools that support default configurations
|
||||||
@@ -51,6 +51,6 @@ jobs:
|
|||||||
# Upload the SARIF file generated in the previous step
|
# Upload the SARIF file generated in the previous step
|
||||||
- name: Upload SARIF results file
|
- name: Upload SARIF results file
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: github/codeql-action/upload-sarif@v3
|
uses: github/codeql-action/upload-sarif@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v3.29.5
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
|||||||
8
.github/workflows/codeql.yml
vendored
8
.github/workflows/codeql.yml
vendored
@@ -43,11 +43,11 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v3
|
uses: github/codeql-action/init@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v3.29.5
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
@@ -61,7 +61,7 @@ jobs:
|
|||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v3
|
uses: github/codeql-action/autobuild@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v3.29.5
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||||
@@ -74,6 +74,6 @@ jobs:
|
|||||||
# ./location_of_script_within_repo/buildscript.sh
|
# ./location_of_script_within_repo/buildscript.sh
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v3
|
uses: github/codeql-action/analyze@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v3.29.5
|
||||||
with:
|
with:
|
||||||
category: "/language:${{matrix.language}}"
|
category: "/language:${{matrix.language}}"
|
||||||
|
|||||||
18
.github/workflows/greetings.yml
vendored
18
.github/workflows/greetings.yml
vendored
@@ -1,18 +0,0 @@
|
|||||||
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."
|
|
||||||
@@ -19,7 +19,7 @@ jobs:
|
|||||||
NUMBER: ${{ github.event.issue.number }}
|
NUMBER: ${{ github.event.issue.number }}
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -104,7 +104,7 @@ jobs:
|
|||||||
NUMBER: ${{ github.event.issue.number }}
|
NUMBER: ${{ github.event.issue.number }}
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|||||||
@@ -5,6 +5,12 @@ permissions:
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
files:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: |
|
||||||
|
**.md **/**.md test/*.txt
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@@ -18,7 +24,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -35,8 +41,8 @@ jobs:
|
|||||||
id: changed-files-glob
|
id: changed-files-glob
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
files: |
|
files: ${{ inputs.files }}
|
||||||
test/*.txt
|
files_separator: " " # Space delimited files (default is "\n")
|
||||||
|
|
||||||
- name: Show output
|
- name: Show output
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
16
.github/workflows/matrix-example.yml
vendored
16
.github/workflows/matrix-example.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
matrix: ${{ steps.changed-files.outputs.all_changed_files }}
|
matrix: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
@@ -39,7 +39,19 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
echo ${{ matrix.files }}
|
echo ${{ matrix.files }}
|
||||||
|
|
||||||
|
conditional-job:
|
||||||
|
name: Run Conditional Job
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [changed-files]
|
||||||
|
if: contains(needs.changed-files.outputs.matrix, 'README.md') # Conditional check for README
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
- name: Execute Conditional Logic
|
||||||
|
run: |
|
||||||
|
echo "README.md has been changed. Running conditional job."
|
||||||
|
|||||||
4
.github/workflows/multi-job-example.yml
vendored
4
.github/workflows/multi-job-example.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
|
all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
@@ -45,7 +45,7 @@ jobs:
|
|||||||
all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
|
all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
|
|||||||
16
.github/workflows/sync-release-version.yml
vendored
16
.github/workflows/sync-release-version.yml
vendored
@@ -13,21 +13,22 @@ jobs:
|
|||||||
update-version:
|
update-version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Run release-tagger
|
- name: Run release-tagger
|
||||||
uses: tj-actions/release-tagger@v4
|
uses: tj-actions/release-tagger@970a1f5f827a7b90902b0adc904f3bb70c1074e7 # v6.0.6
|
||||||
- name: Sync release version.
|
- name: Sync release version.
|
||||||
uses: tj-actions/sync-release-version@v13
|
uses: tj-actions/sync-release-version@2a7ef0deb39b3ecce887ee99d2261c6cef989d84 # v13.16
|
||||||
id: sync-release-version
|
id: sync-release-version
|
||||||
with:
|
with:
|
||||||
pattern: '${{ github.repository }}@'
|
pattern: '${{ github.repository }}@'
|
||||||
only_major: true
|
only_major: true
|
||||||
|
use_tag_commit_hash: true
|
||||||
paths: |
|
paths: |
|
||||||
README.md
|
README.md
|
||||||
- name: Sync release package version.
|
- name: Sync release package version.
|
||||||
uses: tj-actions/sync-release-version@v13
|
uses: tj-actions/sync-release-version@2a7ef0deb39b3ecce887ee99d2261c6cef989d84 # v13.16
|
||||||
id: sync-release-package-version
|
id: sync-release-package-version
|
||||||
with:
|
with:
|
||||||
pattern: '"version": "'
|
pattern: '"version": "'
|
||||||
@@ -35,14 +36,15 @@ jobs:
|
|||||||
paths: |
|
paths: |
|
||||||
package.json
|
package.json
|
||||||
- name: Run git-cliff
|
- name: Run git-cliff
|
||||||
uses: tj-actions/git-cliff@v1
|
uses: tj-actions/git-cliff@679041f051a4d2ab452f7e5e7b0eed2abee21131 # v2.2.0
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v7.0.3
|
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
|
||||||
with:
|
with:
|
||||||
base: "main"
|
base: "main"
|
||||||
labels: "merge when passing"
|
labels: "merge when passing"
|
||||||
|
sign-commits: true
|
||||||
title: "Upgraded to ${{ steps.sync-release-version.outputs.new_version }}"
|
title: "Upgraded to ${{ steps.sync-release-version.outputs.new_version }}"
|
||||||
branch: "upgrade-to-${{ steps.sync-release-version.outputs.new_version }}"
|
branch: "upgrade-to-${{ steps.sync-release-version.outputs.new_version }}"
|
||||||
commit-message: "Upgraded from ${{ steps.sync-release-version.outputs.old_version }} -> ${{ steps.sync-release-version.outputs.new_version }}"
|
commit-message: "Upgraded from ${{ steps.sync-release-version.outputs.old_version }} -> ${{ steps.sync-release-version.outputs.new_version }}"
|
||||||
body: "View [CHANGES](https://github.com/${{ github.repository }}/compare/${{ steps.sync-release-version.outputs.old_version }}...${{ steps.sync-release-version.outputs.new_version }})"
|
body: "View [CHANGES](https://github.com/${{ github.repository }}/compare/${{ steps.sync-release-version.outputs.old_version }}...${{ steps.sync-release-version.outputs.new_version }})"
|
||||||
token: ${{ secrets.PAT_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
262
.github/workflows/test.yml
vendored
262
.github/workflows/test.yml
vendored
@@ -35,20 +35,20 @@ jobs:
|
|||||||
outputs:
|
outputs:
|
||||||
files_changed: ${{ steps.changed_files.outputs.files_changed }}
|
files_changed: ${{ steps.changed_files.outputs.files_changed }}
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: read
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
|
|
||||||
- name: Use Node.js 20.x
|
- name: Use Node.js 24.x
|
||||||
uses: actions/setup-node@v4.0.3
|
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
||||||
with:
|
with:
|
||||||
cache: 'yarn'
|
cache: 'yarn'
|
||||||
node-version: '20.x'
|
node-version: '24.x'
|
||||||
|
|
||||||
- name: Create coverage directory and clover.xml
|
- name: Create coverage directory and clover.xml
|
||||||
run: |
|
run: |
|
||||||
@@ -60,11 +60,11 @@ jobs:
|
|||||||
yarn install
|
yarn install
|
||||||
|
|
||||||
- name: Run eslint on changed files
|
- name: Run eslint on changed files
|
||||||
uses: tj-actions/eslint-changed-files@v25
|
uses: tj-actions/eslint-changed-files@536c35c8184b8bbd361d3703aa63439e0895c340 # v25.3.2
|
||||||
if: github.event_name == 'pull_request'
|
if: github.event_name == 'pull_request'
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.PAT_TOKEN }}
|
|
||||||
config_path: ".eslintrc.json"
|
config_path: ".eslintrc.json"
|
||||||
|
ignore_path: ".eslintignore"
|
||||||
|
|
||||||
- name: Run build and test
|
- name: Run build and test
|
||||||
run: |
|
run: |
|
||||||
@@ -72,38 +72,29 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }}
|
GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }}
|
||||||
|
|
||||||
|
- name: Upload build assets
|
||||||
|
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||||
|
with:
|
||||||
|
name: build-assets
|
||||||
|
path: dist
|
||||||
|
|
||||||
- name: Verify Changed files
|
- name: Verify Changed files
|
||||||
uses: tj-actions/verify-changed-files@v20
|
uses: tj-actions/verify-changed-files@a1c6acee9df209257a246f2cc6ae8cb6581c1edf # v20.0.4
|
||||||
id: changed_files
|
if: github.actor != 'dependabot[bot]'
|
||||||
|
id: verify_changed_files
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
src
|
src
|
||||||
dist
|
dist
|
||||||
|
|
||||||
- name: Commit files
|
- name: Verify outstanding changes
|
||||||
if: steps.changed_files.outputs.files_changed == 'true' && github.event_name == 'pull_request'
|
if: steps.verify_changed_files.outputs.files_changed == 'true' && github.event_name == 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "action@github.com"
|
echo "Uncommitted build/lint changes detected. Please run 'yarn all' locally and push the changes for review."
|
||||||
git config --local user.name "GitHub Action"
|
exit 1
|
||||||
git add src dist
|
|
||||||
git commit -m "Added missing changes and modified dist assets."
|
|
||||||
|
|
||||||
- name: Push changes
|
|
||||||
if: steps.changed_files.outputs.files_changed == 'true' && github.event_name == 'pull_request'
|
|
||||||
continue-on-error: true
|
|
||||||
uses: ad-m/github-push-action@master
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.PAT_TOKEN }}
|
|
||||||
branch: ${{ github.head_ref }}
|
|
||||||
|
|
||||||
- name: Upload build assets
|
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
|
||||||
name: build-assets
|
|
||||||
path: dist
|
|
||||||
|
|
||||||
- name: Run codacy-coverage-reporter
|
- name: Run codacy-coverage-reporter
|
||||||
uses: codacy/codacy-coverage-reporter-action@v1
|
uses: codacy/codacy-coverage-reporter-action@89d6c85cfafaec52c72b6c5e8b2878d33104c699 # v1.3.0
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
|
||||||
@@ -118,7 +109,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout into dir1
|
- name: Checkout into dir1
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
submodules: true
|
submodules: true
|
||||||
@@ -126,7 +117,7 @@ jobs:
|
|||||||
path: dir1
|
path: dir1
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
path: dir1/dist
|
path: dir1/dist
|
||||||
@@ -152,13 +143,13 @@ jobs:
|
|||||||
bash
|
bash
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
path: dir2/dist
|
path: dir2/dist
|
||||||
|
|
||||||
- name: Checkout into dir2
|
- name: Checkout into dir2
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
submodules: true
|
submodules: true
|
||||||
@@ -194,13 +185,13 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -254,13 +245,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -284,6 +275,113 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
|
||||||
|
test-skip-same-base-and-commit-sha:
|
||||||
|
name: Test changed-files skip same base and commit sha
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
if: needs.build.outputs.files_changed != 'true'
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout branch
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
with:
|
||||||
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Download build assets
|
||||||
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
|
with:
|
||||||
|
name: build-assets
|
||||||
|
|
||||||
|
- name: Get head SHA
|
||||||
|
id: head-sha
|
||||||
|
run: |
|
||||||
|
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
|
- name: Run changed-files with same base and commit sha
|
||||||
|
id: changed-files
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
base_sha: ${{ steps.head-sha.outputs.sha }}
|
||||||
|
sha: ${{ steps.head-sha.outputs.sha }}
|
||||||
|
skip_same_sha: true
|
||||||
|
|
||||||
|
- name: Verify empty outputs
|
||||||
|
if: steps.changed-files.outputs.all_changed_files_count != '0' || steps.changed-files.outputs.any_changed != 'false'
|
||||||
|
run: |
|
||||||
|
echo "Expected empty outputs; got count=${{ steps.changed-files.outputs.all_changed_files_count }} any_changed=${{ steps.changed-files.outputs.any_changed }}"
|
||||||
|
exit 1
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files.outputs) }}'
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
|
test-exclude-symlinks:
|
||||||
|
name: Test changed-files exclude symlinks
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
if: needs.build.outputs.files_changed != 'true'
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout branch
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
with:
|
||||||
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Download build assets
|
||||||
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
|
with:
|
||||||
|
name: build-assets
|
||||||
|
|
||||||
|
- name: Run changed-files without symlink exclusion
|
||||||
|
id: changed-files-symlink-included
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
base_sha: 2f2f6cf099167fa7d7c6aba8fc0421327e181a5a
|
||||||
|
sha: 8c4da285a3cb8b621b4a5cc251d6282b4b0a67a5
|
||||||
|
|
||||||
|
- name: Verify symlink is present
|
||||||
|
if: "!contains(steps.changed-files-symlink-included.outputs.added_files, 'test/symlink-to-target')"
|
||||||
|
run: |
|
||||||
|
echo "Expected symlink to be present in added_files; got ${{ steps.changed-files-symlink-included.outputs.added_files }}"
|
||||||
|
exit 1
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
|
- name: Run changed-files excluding symlinks
|
||||||
|
id: changed-files-symlink-excluded
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
base_sha: 2f2f6cf099167fa7d7c6aba8fc0421327e181a5a
|
||||||
|
sha: 8c4da285a3cb8b621b4a5cc251d6282b4b0a67a5
|
||||||
|
exclude_symlinks: true
|
||||||
|
|
||||||
|
- name: Verify symlink is excluded
|
||||||
|
if: "contains(steps.changed-files-symlink-excluded.outputs.added_files, 'test/symlink-to-target') || contains(steps.changed-files-symlink-excluded.outputs.all_changed_files, 'test/symlink-to-target')"
|
||||||
|
run: |
|
||||||
|
echo "Expected symlink to be excluded; got added=${{ steps.changed-files-symlink-excluded.outputs.added_files }} all=${{ steps.changed-files-symlink-excluded.outputs.all_changed_files }}"
|
||||||
|
exit 1
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files-symlink-included.outputs) }}'
|
||||||
|
echo '${{ toJSON(steps.changed-files-symlink-excluded.outputs) }}'
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
test-using-branch-names-for-base-sha-and-sha-inputs:
|
test-using-branch-names-for-base-sha-and-sha-inputs:
|
||||||
name: Test using branch names for base_sha and sha inputs
|
name: Test using branch names for base_sha and sha inputs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -298,13 +396,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -337,13 +435,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
fetch-depth: ${{ matrix.fetch-depth }}
|
fetch-depth: ${{ matrix.fetch-depth }}
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -371,12 +469,12 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -405,14 +503,14 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: ${{ matrix.fetch-depth }}
|
fetch-depth: ${{ matrix.fetch-depth }}
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -435,10 +533,10 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -490,10 +588,10 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -545,7 +643,7 @@ jobs:
|
|||||||
pull-requests: read
|
pull-requests: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout into dir1
|
- name: Checkout into dir1
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
submodules: true
|
submodules: true
|
||||||
@@ -553,7 +651,7 @@ jobs:
|
|||||||
path: dir1
|
path: dir1
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
path: dir1/dist
|
path: dir1/dist
|
||||||
@@ -577,14 +675,14 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
path: dist
|
path: dist
|
||||||
@@ -614,7 +712,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout into dir1
|
- name: Checkout into dir1
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
submodules: true
|
submodules: true
|
||||||
@@ -622,7 +720,7 @@ jobs:
|
|||||||
path: dir1
|
path: dir1
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
path: dir1/dist
|
path: dir1/dist
|
||||||
@@ -653,14 +751,14 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: ${{ matrix.fetch-depth }}
|
fetch-depth: ${{ matrix.fetch-depth }}
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -719,14 +817,14 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: ${{ matrix.fetch-depth }}
|
fetch-depth: ${{ matrix.fetch-depth }}
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -758,6 +856,24 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
|
||||||
|
- name: Run changed-files with files_yaml, files_ignore_yaml
|
||||||
|
id: changed-files-ignore
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
files_yaml: |
|
||||||
|
test:
|
||||||
|
- test/**.txt
|
||||||
|
- test/**.md
|
||||||
|
files_ignore_yaml: |
|
||||||
|
test:
|
||||||
|
- test/test.txt
|
||||||
|
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo "${{ toJSON(steps.changed-files-ignore.outputs) }}"
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
- name: Run changed-files with files_yaml, json and write_output_files
|
- name: Run changed-files with files_yaml, json and write_output_files
|
||||||
id: changed-files-json-write-output-files
|
id: changed-files-json-write-output-files
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -796,14 +912,14 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: ${{ matrix.fetch-depth }}
|
fetch-depth: ${{ matrix.fetch-depth }}
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -982,7 +1098,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
ref: a52f8621d26d5d9f54b80f74bda2d9eedff94693
|
ref: a52f8621d26d5d9f54b80f74bda2d9eedff94693
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
@@ -1020,7 +1136,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
@@ -1099,7 +1215,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
@@ -1107,7 +1223,7 @@ jobs:
|
|||||||
fetch-depth: ${{ matrix.fetch-depth }}
|
fetch-depth: ${{ matrix.fetch-depth }}
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -1119,9 +1235,9 @@ jobs:
|
|||||||
since_last_remote_commit: true
|
since_last_remote_commit: true
|
||||||
|
|
||||||
- name: Verify succeeded pull_request(closed)
|
- name: Verify succeeded pull_request(closed)
|
||||||
if: steps.changed-files-since-last-remote-commit.outcome != 'failure' && matrix.fetch-depth == 1 && github.event.action == 'closed' && github.event_name == 'pull_request'
|
if: steps.changed-files-since-last-remote-commit.outcome != 'success' && matrix.fetch-depth == 1 && github.event.action == 'closed' && github.event_name == 'pull_request'
|
||||||
run: |
|
run: |
|
||||||
echo "Expected: (failure) got ${{ steps.changed-files-since-last-remote-commit.outcome }}"
|
echo "Expected: (success) got ${{ steps.changed-files-since-last-remote-commit.outcome }}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
- name: Verify succeeded
|
- name: Verify succeeded
|
||||||
@@ -1152,13 +1268,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
fetch-depth: ${{ matrix.fetch-depth }}
|
fetch-depth: ${{ matrix.fetch-depth }}
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
- name: Dump GitHub context
|
- name: Dump GitHub context
|
||||||
@@ -2143,9 +2259,9 @@ jobs:
|
|||||||
bash
|
bash
|
||||||
- name: Get branch name
|
- name: Get branch name
|
||||||
id: branch-name
|
id: branch-name
|
||||||
uses: tj-actions/branch-names@v8
|
uses: tj-actions/branch-names@5250492686b253f06fa55861556d1027b067aeb5 # v9.0.2
|
||||||
if: github.event_name == 'pull_request' && matrix.fetch-depth == 0
|
if: github.event_name == 'pull_request' && matrix.fetch-depth == 0
|
||||||
- uses: nrwl/nx-set-shas@v4
|
- uses: nrwl/nx-set-shas@3e9ad7370203c1e93d109be57f3b72eb0eb511b1 # v4.4.0
|
||||||
id: last_successful_commit
|
id: last_successful_commit
|
||||||
if: github.event_name == 'pull_request' && github.event.action != 'closed' && matrix.fetch-depth == 0
|
if: github.event_name == 'pull_request' && github.event.action != 'closed' && matrix.fetch-depth == 0
|
||||||
with:
|
with:
|
||||||
|
|||||||
17
.github/workflows/update-readme.yml
vendored
17
.github/workflows/update-readme.yml
vendored
@@ -1,7 +1,7 @@
|
|||||||
name: Format README.md
|
name: Format README.md
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -13,21 +13,21 @@ jobs:
|
|||||||
sync-assets:
|
sync-assets:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Run auto-doc
|
- name: Run auto-doc
|
||||||
uses: tj-actions/auto-doc@v3
|
uses: tj-actions/auto-doc@b10ceedffd794ec29a8fa8700529f40c1b64a951 # v3.6.0
|
||||||
with:
|
with:
|
||||||
use_code_blocks: true
|
use_code_blocks: true
|
||||||
use_major_version: true
|
use_tag_commit_hash: true
|
||||||
|
|
||||||
- name: Run remark
|
- name: Run remark
|
||||||
uses: tj-actions/remark@v3
|
uses: tj-actions/remark@10fc40701928cbafcc4a2d241679579d218144ff # v3
|
||||||
|
|
||||||
- name: Verify Changed files
|
- name: Verify Changed files
|
||||||
uses: tj-actions/verify-changed-files@v20
|
uses: tj-actions/verify-changed-files@a1c6acee9df209257a246f2cc6ae8cb6581c1edf # v20.0.4
|
||||||
id: verify_changed_files
|
id: verify_changed_files
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
@@ -41,7 +41,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
if: failure()
|
if: failure()
|
||||||
uses: peter-evans/create-pull-request@v7
|
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
|
||||||
with:
|
with:
|
||||||
base: "main"
|
base: "main"
|
||||||
labels: "merge when passing"
|
labels: "merge when passing"
|
||||||
@@ -49,4 +49,5 @@ jobs:
|
|||||||
branch: "chore/update-readme"
|
branch: "chore/update-readme"
|
||||||
commit-message: "Updated README.md"
|
commit-message: "Updated README.md"
|
||||||
body: "Updated README.md"
|
body: "Updated README.md"
|
||||||
token: ${{ secrets.PAT_TOKEN }}
|
sign-commits: true
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
4
.github/workflows/workflow-run-example.yml
vendored
4
.github/workflows/workflow-run-example.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
|||||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
|
|||||||
2275
HISTORY.md
2275
HISTORY.md
File diff suppressed because it is too large
Load Diff
112
README.md
112
README.md
@@ -3,13 +3,12 @@
|
|||||||
[](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)
|
[](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)
|
||||||
[](https://github.com/search?o=desc\&q=tj-actions+changed-files+language%3AYAML\&s=\&type=Code)
|
[](https://github.com/search?o=desc\&q=tj-actions+changed-files+language%3AYAML\&s=\&type=Code)
|
||||||
|
|
||||||
[](https://app.codacy.com/gh/tj-actions/changed-files/dashboard?utm_source=gh\&utm_medium=referral\&utm_content=\&utm_campaign=Badge_grade)
|
[](https://app.codacy.com/gh/tj-actions/changed-files/dashboard?utm_source=gh\&utm_medium=referral\&utm_content=\&utm_campaign=Badge_grade)
|
||||||
[](https://github.com/tj-actions/changed-files/actions/workflows/test.yml)
|
[](https://github.com/tj-actions/changed-files/actions/workflows/test.yml)
|
||||||
[](https://github.com/tj-actions/changed-files/actions/workflows/sync-release-version.yml)
|
|
||||||
|
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||||
|
|
||||||
[](#contributors-)
|
[](#contributors-)
|
||||||
|
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||||
|
|
||||||
@@ -45,11 +44,12 @@ Effortlessly track all changed files and directories relative to a target branch
|
|||||||
* [Credits 👏](#credits-)
|
* [Credits 👏](#credits-)
|
||||||
* [Report Bugs 🐛](#report-bugs-)
|
* [Report Bugs 🐛](#report-bugs-)
|
||||||
* [Contributors ✨](#contributors-)
|
* [Contributors ✨](#contributors-)
|
||||||
|
* [💼 Automate Your Job Search Too](#-automate-your-job-search-too)
|
||||||
|
|
||||||
## Features 🚀
|
## Features 🚀
|
||||||
|
|
||||||
* Fast execution, averaging 0-10 seconds.
|
* Fast execution, averaging 0-10 seconds.
|
||||||
* Leverages either [Github's REST API](https://docs.github.com/en/rest/reference/repos#list-commits) or [Git's native diff](https://git-scm.com/docs/git-diff) to determine changed files.
|
* Leverages either [Github's REST API](https://docs.github.com/en/rest/reference/repos#list-commits) or [Git's native diff command](https://git-scm.com/docs/git-diff) to determine changed files.
|
||||||
* Facilitates easy debugging.
|
* Facilitates easy debugging.
|
||||||
* Scales to handle large/mono repositories.
|
* Scales to handle large/mono repositories.
|
||||||
* Supports Git submodules.
|
* Supports Git submodules.
|
||||||
@@ -60,7 +60,7 @@ Effortlessly track all changed files and directories relative to a target branch
|
|||||||
* Optionally excludes the current directory.
|
* Optionally excludes the current directory.
|
||||||
* Writes outputs to a designated `.txt` or `.json` file for further processing.
|
* Writes outputs to a designated `.txt` or `.json` file for further processing.
|
||||||
* Restores deleted files to their previous location or a newly specified location.
|
* Restores deleted files to their previous location or a newly specified location.
|
||||||
* Supports fetching a fixed number of commits which improves performance.
|
* Supports fetching a fixed number of commits, which improves performance.
|
||||||
* Compatible with all platforms (Linux, MacOS, Windows).
|
* Compatible with all platforms (Linux, MacOS, Windows).
|
||||||
* Supports [GitHub-hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners).
|
* Supports [GitHub-hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners).
|
||||||
* Supports [GitHub Enterprise Server](https://docs.github.com/en/enterprise-server@3.3/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server).
|
* Supports [GitHub Enterprise Server](https://docs.github.com/en/enterprise-server@3.3/admin/github-actions/getting-started-with-github-actions-for-your-enterprise/getting-started-with-github-actions-for-github-enterprise-server).
|
||||||
@@ -71,7 +71,7 @@ Effortlessly track all changed files and directories relative to a target branch
|
|||||||
* Between the last remote branch commit and the current HEAD.
|
* Between the last remote branch commit and the current HEAD.
|
||||||
* Restricts change detection to a subset of files and directories:
|
* Restricts change detection to a subset of files and directories:
|
||||||
* Provides boolean output indicating changes in specific files.
|
* Provides boolean output indicating changes in specific files.
|
||||||
* Uses [Glob pattern](https://codepen.io/mrmlnc/pen/OXQjMe) matching.
|
* Uses [Glob pattern](https://en.wikipedia.org/wiki/Glob_\(programming\)) matching.
|
||||||
* Supports Globstar.
|
* Supports Globstar.
|
||||||
* Supports brace expansion.
|
* Supports brace expansion.
|
||||||
* Supports negation.
|
* Supports negation.
|
||||||
@@ -122,7 +122,7 @@ jobs:
|
|||||||
# -----------------------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------------------
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
# To compare changes between the current commit and the last pushed remote commit set `since_last_remote_commit: true`. e.g
|
# To compare changes between the current commit and the last pushed remote commit set `since_last_remote_commit: true`. e.g
|
||||||
# with:
|
# with:
|
||||||
# since_last_remote_commit: true
|
# since_last_remote_commit: true
|
||||||
@@ -140,11 +140,12 @@ jobs:
|
|||||||
# -----------------------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------------------
|
||||||
- name: Get all changed markdown files
|
- name: Get all changed markdown files
|
||||||
id: changed-markdown-files
|
id: changed-markdown-files
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
# Avoid using single or double quotes for multiline patterns
|
# Avoid using single or double quotes for multiline patterns
|
||||||
files: |
|
files: |
|
||||||
**.md
|
**.md
|
||||||
|
docs/**.md
|
||||||
|
|
||||||
- name: List all changed files markdown files
|
- name: List all changed files markdown files
|
||||||
if: steps.changed-markdown-files.outputs.any_changed == 'true'
|
if: steps.changed-markdown-files.outputs.any_changed == 'true'
|
||||||
@@ -160,7 +161,7 @@ jobs:
|
|||||||
# -----------------------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------------------
|
||||||
- name: Get all test, doc and src files that have changed
|
- name: Get all test, doc and src files that have changed
|
||||||
id: changed-files-yaml
|
id: changed-files-yaml
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
files_yaml: |
|
files_yaml: |
|
||||||
doc:
|
doc:
|
||||||
@@ -195,7 +196,7 @@ jobs:
|
|||||||
# -----------------------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------------------
|
||||||
- name: Get changed files in the docs folder
|
- name: Get changed files in the docs folder
|
||||||
id: changed-files-specific
|
id: changed-files-specific
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
files: docs/*.{js,html} # Alternatively using: `docs/**`
|
files: docs/*.{js,html} # Alternatively using: `docs/**`
|
||||||
files_ignore: docs/static.js
|
files_ignore: docs/static.js
|
||||||
@@ -237,7 +238,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
|
|
||||||
- name: List all changed files
|
- name: List all changed files
|
||||||
env:
|
env:
|
||||||
@@ -280,7 +281,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
# NOTE: `since_last_remote_commit: true` is implied by default and falls back to the previous local commit.
|
# NOTE: `since_last_remote_commit: true` is implied by default and falls back to the previous local commit.
|
||||||
|
|
||||||
- name: List all changed files
|
- name: List all changed files
|
||||||
@@ -327,7 +328,7 @@ Support this project with a :star:
|
|||||||
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
|
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: tj-actions/changed-files@v45
|
- uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
id: changed-files
|
id: changed-files
|
||||||
with:
|
with:
|
||||||
# Github API URL.
|
# Github API URL.
|
||||||
@@ -410,6 +411,11 @@ Support this project with a :star:
|
|||||||
# Default: "false"
|
# Default: "false"
|
||||||
exclude_submodules: ''
|
exclude_submodules: ''
|
||||||
|
|
||||||
|
# Exclude symlinks from changed files.
|
||||||
|
# Type: boolean
|
||||||
|
# Default: "false"
|
||||||
|
exclude_symlinks: ''
|
||||||
|
|
||||||
# Fail when the initial diff
|
# Fail when the initial diff
|
||||||
# fails.
|
# fails.
|
||||||
# Type: boolean
|
# Type: boolean
|
||||||
@@ -674,6 +680,12 @@ Support this project with a :star:
|
|||||||
# Default: "false"
|
# Default: "false"
|
||||||
skip_initial_fetch: ''
|
skip_initial_fetch: ''
|
||||||
|
|
||||||
|
# Do not fail when base
|
||||||
|
# and head SHAs are identical.
|
||||||
|
# Type: boolean
|
||||||
|
# Default: "false"
|
||||||
|
skip_same_sha: ''
|
||||||
|
|
||||||
# Tags pattern to ignore.
|
# Tags pattern to ignore.
|
||||||
# Type: string
|
# Type: string
|
||||||
tags_ignore_pattern: ''
|
tags_ignore_pattern: ''
|
||||||
@@ -760,6 +772,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_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"></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_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_added"></a>[any\_added](#output_any_added) | string | Returns `true` when any of <br>the filenames provided using the <br>`files*` or `files_ignore*` inputs have been added. |
|
||||||
| <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. This <br>defaults to `true` when no <br>patterns are specified. i.e. *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. This <br>defaults to `true` when no <br>patterns are specified. i.e. *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 have been deleted. <br>This defaults to `true` when <br>no patterns are specified. (D) |
|
| <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 have been deleted. <br>This defaults to `true` when <br>no patterns are specified. (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 have been modified. <br>This defaults to `true` when <br>no patterns are specified. i.e. <br>*includes a combination of all added, copied, modified, renamed, and deleted files (ACMRD)*. |
|
| <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 have been modified. <br>This defaults to `true` when <br>no patterns are specified. i.e. <br>*includes a combination of all added, copied, modified, renamed, and deleted files (ACMRD)*. |
|
||||||
@@ -812,7 +825,7 @@ The format of the version string is as follows:
|
|||||||
...
|
...
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -825,7 +838,7 @@ The format of the version string is as follows:
|
|||||||
...
|
...
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
safe_output: false # set to false because we are using an environment variable to store the output and avoid command injection.
|
safe_output: false # set to false because we are using an environment variable to store the output and avoid command injection.
|
||||||
|
|
||||||
@@ -848,7 +861,7 @@ The format of the version string is as follows:
|
|||||||
...
|
...
|
||||||
- name: Get all changed files and use a comma separator in the output
|
- name: Get all changed files and use a comma separator in the output
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
separator: ","
|
separator: ","
|
||||||
...
|
...
|
||||||
@@ -865,7 +878,7 @@ See [inputs](#inputs) for more information.
|
|||||||
...
|
...
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
|
|
||||||
- name: List all added files
|
- name: List all added files
|
||||||
env:
|
env:
|
||||||
@@ -888,7 +901,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
|||||||
...
|
...
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
|
|
||||||
- name: Run a step if my-file.txt was modified
|
- name: Run a step if my-file.txt was modified
|
||||||
if: contains(steps.changed-files.outputs.modified_files, 'my-file.txt')
|
if: contains(steps.changed-files.outputs.modified_files, 'my-file.txt')
|
||||||
@@ -909,7 +922,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
|||||||
|
|
||||||
- name: Get changed files and write the outputs to a Txt file
|
- name: Get changed files and write the outputs to a Txt file
|
||||||
id: changed-files-write-output-files-txt
|
id: changed-files-write-output-files-txt
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
write_output_files: true
|
write_output_files: true
|
||||||
|
|
||||||
@@ -928,7 +941,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
|||||||
...
|
...
|
||||||
- name: Get changed files and write the outputs to a JSON file
|
- name: Get changed files and write the outputs to a JSON file
|
||||||
id: changed-files-write-output-files-json
|
id: changed-files-write-output-files-json
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
json: true
|
json: true
|
||||||
write_output_files: true
|
write_output_files: true
|
||||||
@@ -948,7 +961,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
|||||||
...
|
...
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
my-file.txt
|
my-file.txt
|
||||||
@@ -971,7 +984,7 @@ See [inputs](#inputs) for more information.
|
|||||||
...
|
...
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files-specific
|
id: changed-files-specific
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
my-file.txt
|
my-file.txt
|
||||||
@@ -1022,7 +1035,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.
|
- name: Get changed files using a source file or list of file(s) to populate to files input.
|
||||||
id: changed-files-specific-source-file
|
id: changed-files-specific-source-file
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
files_from_source_file: test/changed-files-list.txt
|
files_from_source_file: test/changed-files-list.txt
|
||||||
...
|
...
|
||||||
@@ -1039,7 +1052,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.
|
- 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
|
id: changed-files-specific-source-file-and-specify-files
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
files_from_source_file: |
|
files_from_source_file: |
|
||||||
test/changed-files-list.txt
|
test/changed-files-list.txt
|
||||||
@@ -1060,7 +1073,7 @@ See [inputs](#inputs) for more information.
|
|||||||
...
|
...
|
||||||
- name: Get changed files using a different SHA
|
- name: Get changed files using a different SHA
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
sha: ${{ github.event.pull_request.head.sha }}
|
sha: ${{ github.event.pull_request.head.sha }}
|
||||||
...
|
...
|
||||||
@@ -1077,7 +1090,7 @@ See [inputs](#inputs) for more information.
|
|||||||
...
|
...
|
||||||
- name: Get changed files using a different base SHA
|
- name: Get changed files using a different base SHA
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
base_sha: ${{ github.event.pull_request.base.sha }}
|
base_sha: ${{ github.event.pull_request.base.sha }}
|
||||||
...
|
...
|
||||||
@@ -1109,7 +1122,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
|
|
||||||
- name: List changed files
|
- name: List changed files
|
||||||
env:
|
env:
|
||||||
@@ -1119,7 +1132,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Get changed files in the .github folder
|
- name: Get changed files in the .github folder
|
||||||
id: changed-files-specific
|
id: changed-files-specific
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
files: .github/**
|
files: .github/**
|
||||||
|
|
||||||
@@ -1150,7 +1163,7 @@ See [inputs](#inputs) for more information.
|
|||||||
|
|
||||||
- name: Run changed-files with defaults in dir1
|
- name: Run changed-files with defaults in dir1
|
||||||
id: changed-files-for-dir1
|
id: changed-files-for-dir1
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
path: dir1
|
path: dir1
|
||||||
|
|
||||||
@@ -1175,13 +1188,13 @@ See [inputs](#inputs) for more information.
|
|||||||
...
|
...
|
||||||
- name: Run changed-files with quotepath disabled
|
- name: Run changed-files with quotepath disabled
|
||||||
id: changed-files-quotepath
|
id: changed-files-quotepath
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
quotepath: "false"
|
quotepath: "false"
|
||||||
|
|
||||||
- name: Run changed-files with quotepath disabled for a specified list of file(s)
|
- name: Run changed-files with quotepath disabled for a specified list of file(s)
|
||||||
id: changed-files-quotepath-specific
|
id: changed-files-quotepath-specific
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
files: test/test-è.txt
|
files: test/test-è.txt
|
||||||
quotepath: "false"
|
quotepath: "false"
|
||||||
@@ -1214,7 +1227,7 @@ See [inputs](#inputs) for more information.
|
|||||||
|
|
||||||
- name: Run changed-files with the commit of the last successful test workflow run
|
- name: Run changed-files with the commit of the last successful test workflow run
|
||||||
id: changed-files-base-sha-push
|
id: changed-files-base-sha-push
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
base_sha: ${{ steps.last_successful_commit_push.outputs.base }}
|
base_sha: ${{ steps.last_successful_commit_push.outputs.base }}
|
||||||
...
|
...
|
||||||
@@ -1241,7 +1254,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
|
- 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
|
id: changed-files-base-sha-pull-request
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
base_sha: ${{ steps.last_successful_commit_pull_request.outputs.base }}
|
base_sha: ${{ steps.last_successful_commit_pull_request.outputs.base }}
|
||||||
...
|
...
|
||||||
@@ -1267,7 +1280,7 @@ See [inputs](#inputs) for more information.
|
|||||||
...
|
...
|
||||||
- name: Run changed-files with dir_names
|
- name: Run changed-files with dir_names
|
||||||
id: changed-files-dir-names
|
id: changed-files-dir-names
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
dir_names: "true"
|
dir_names: "true"
|
||||||
...
|
...
|
||||||
@@ -1284,7 +1297,7 @@ See [inputs](#inputs) for more information.
|
|||||||
...
|
...
|
||||||
- name: Run changed-files with JSON output
|
- name: Run changed-files with JSON output
|
||||||
id: changed-files-json
|
id: changed-files-json
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
json: "true"
|
json: "true"
|
||||||
...
|
...
|
||||||
@@ -1301,13 +1314,13 @@ See [inputs](#inputs) for more information.
|
|||||||
...
|
...
|
||||||
- name: Get changed-files since 2022-08-19
|
- name: Get changed-files since 2022-08-19
|
||||||
id: changed-files-since
|
id: changed-files-since
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
since: "2022-08-19"
|
since: "2022-08-19"
|
||||||
|
|
||||||
- name: Get changed-files until 2022-08-20
|
- name: Get changed-files until 2022-08-20
|
||||||
id: changed-files-until
|
id: changed-files-until
|
||||||
uses: tj-actions/changed-files@v45
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
until: "2022-08-20"
|
until: "2022-08-20"
|
||||||
...
|
...
|
||||||
@@ -1325,14 +1338,10 @@ See [inputs](#inputs) for more information.
|
|||||||
|
|
||||||
* [qgis/QGIS: uses tj-actions/changed-files to automate spell checking](https://github.com/qgis/QGIS/blob/a5333497e90ac9de4ca70463d8e0b64c3f294d63/.github/workflows/code_layout.yml#L147)
|
* [qgis/QGIS: uses tj-actions/changed-files to automate spell checking](https://github.com/qgis/QGIS/blob/a5333497e90ac9de4ca70463d8e0b64c3f294d63/.github/workflows/code_layout.yml#L147)
|
||||||
|
|
||||||
* [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/c1b714c55cb0048037b79a681a10d7f3ddb0164c/.github/workflows/codespell.yml#L18-L26)
|
* [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)
|
* [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)
|
||||||
|
|
||||||
* [refined-github: uses tj-actions/changed-files to automate test URL validation in added/edited files](https://github.com/refined-github/refined-github/blob/b754bfe58904da8a599d7876fdaaf18302785629/.github/workflows/features.yml#L35)
|
|
||||||
|
|
||||||
* [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)
|
* [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/71a8ce444618a8ac4d660518172fba4883c4014b/.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)
|
||||||
@@ -1445,6 +1454,11 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|||||||
<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://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>
|
<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>
|
||||||
<td align="center" valign="top" width="14.28%"><a href="https://lukaspfahler.de"><img src="https://avatars.githubusercontent.com/u/2308119?v=4?s=100" width="100px;" alt="Lukas Pfahler"/><br /><sub><b>Lukas Pfahler</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=Whadup" title="Code">💻</a></td>
|
<td align="center" valign="top" width="14.28%"><a href="https://lukaspfahler.de"><img src="https://avatars.githubusercontent.com/u/2308119?v=4?s=100" width="100px;" alt="Lukas Pfahler"/><br /><sub><b>Lukas Pfahler</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=Whadup" title="Code">💻</a></td>
|
||||||
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/RajendraP"><img src="https://avatars.githubusercontent.com/u/8928165?v=4?s=100" width="100px;" alt="Rajendra Pandey"/><br /><sub><b>Rajendra Pandey</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=RajendraP" title="Documentation">📖</a></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td align="center" valign="top" width="14.28%"><a href="https://undefined.moe/"><img src="https://avatars.githubusercontent.com/u/29992205?v=4?s=100" width="100px;" alt="undefined"/><br /><sub><b>undefined</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=undefined-moe" title="Documentation">📖</a></td>
|
||||||
|
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Jellyfrog"><img src="https://avatars.githubusercontent.com/u/759887?v=4?s=100" width="100px;" alt="Jellyfrog"/><br /><sub><b>Jellyfrog</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=Jellyfrog" title="Code">💻</a> <a href="https://github.com/tj-actions/changed-files/commits?author=Jellyfrog" title="Documentation">📖</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@@ -1456,3 +1470,17 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|||||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||||
|
|
||||||
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
## 💼 Automate Your Job Search Too
|
||||||
|
|
||||||
|
You automate your CI/CD. Automate your job applications too.
|
||||||
|
|
||||||
|
**[ApplySmart AI](https://applysmart.ai)** helps you:
|
||||||
|
|
||||||
|
* Generate tailored resumes & cover letters in seconds
|
||||||
|
* Extract job details from any posting automatically
|
||||||
|
* Track applications like you track deployments
|
||||||
|
|
||||||
|
**Free tier available** → [applysmart.ai](https://applysmart.ai)
|
||||||
|
|||||||
12
action.yml
12
action.yml
@@ -227,6 +227,14 @@ inputs:
|
|||||||
description: "Exclude changes to submodules."
|
description: "Exclude changes to submodules."
|
||||||
required: false
|
required: false
|
||||||
default: "false"
|
default: "false"
|
||||||
|
exclude_symlinks:
|
||||||
|
description: "Exclude symlinks from changed files."
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
skip_same_sha:
|
||||||
|
description: "Do not fail when base and head SHAs are identical."
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
fetch_missing_history_max_retries:
|
fetch_missing_history_max_retries:
|
||||||
description: "Maximum number of retries to fetch missing history."
|
description: "Maximum number of retries to fetch missing history."
|
||||||
required: false
|
required: false
|
||||||
@@ -250,6 +258,8 @@ outputs:
|
|||||||
description: "Returns only files that are Added (A)."
|
description: "Returns only files that are Added (A)."
|
||||||
added_files_count:
|
added_files_count:
|
||||||
description: "Returns the number of `added_files`"
|
description: "Returns the number of `added_files`"
|
||||||
|
any_added:
|
||||||
|
description: "Returns `true` when any of the filenames provided using the `files*` or `files_ignore*` inputs have been added."
|
||||||
copied_files:
|
copied_files:
|
||||||
description: "Returns only files that are Copied (C)."
|
description: "Returns only files that are Copied (C)."
|
||||||
copied_files_count:
|
copied_files_count:
|
||||||
@@ -324,7 +334,7 @@ outputs:
|
|||||||
description: "Returns all changed YAML keys when the `files_yaml` input is used. i.e. key that contains any path that has either been added, copied, modified, and renamed (ACMR)"
|
description: "Returns all changed YAML keys when the `files_yaml` input is used. i.e. key that contains any path that has either been added, copied, modified, and renamed (ACMR)"
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: 'node20'
|
using: 'node24'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
|
||||||
branding:
|
branding:
|
||||||
|
|||||||
5893
dist/index.js
generated
vendored
5893
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
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
13
dist/licenses.txt
generated
vendored
13
dist/licenses.txt
generated
vendored
@@ -6019,19 +6019,6 @@ Permission to use, copy, modify, and/or distribute this software for any purpose
|
|||||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
|
|
||||||
uuid
|
|
||||||
MIT
|
|
||||||
The MIT License (MIT)
|
|
||||||
|
|
||||||
Copyright (c) 2010-2020 Robert Kieffer and other contributors
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
wrappy
|
wrappy
|
||||||
ISC
|
ISC
|
||||||
The ISC License
|
The ISC License
|
||||||
|
|||||||
2
dist/sourcemap-register.js
generated
vendored
2
dist/sourcemap-register.js
generated
vendored
File diff suppressed because one or more lines are too long
20
package.json
20
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@tj-actions/changed-files",
|
"name": "@tj-actions/changed-files",
|
||||||
"version": "45.0.1",
|
"version": "45.0.8",
|
||||||
"description": "Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.",
|
"description": "Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.",
|
||||||
"main": "lib/main.js",
|
"main": "lib/main.js",
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
@@ -33,30 +33,30 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/tj-actions/changed-files#readme",
|
"homepage": "https://github.com/tj-actions/changed-files#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^2.0.0",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^2.0.0",
|
||||||
"@actions/github": "^6.0.0",
|
"@actions/github": "^6.0.0",
|
||||||
"@octokit/rest": "^21.0.0",
|
"@octokit/rest": "^22.0.0",
|
||||||
"@stdlib/utils-convert-path": "^0.2.1",
|
"@stdlib/utils-convert-path": "^0.2.1",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"micromatch": "^4.0.5",
|
"micromatch": "^4.0.5",
|
||||||
"yaml": "^2.3.1"
|
"yaml": "^2.3.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.5.2",
|
"@types/jest": "^30.0.0",
|
||||||
"@types/lodash": "^4.14.195",
|
"@types/lodash": "^4.14.195",
|
||||||
"@types/micromatch": "^4.0.2",
|
"@types/micromatch": "^4.0.2",
|
||||||
"@types/node": "^22.0.0",
|
"@types/node": "^25.0.0",
|
||||||
"@types/uuid": "^10.0.0",
|
"@types/uuid": "^11.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
||||||
"@typescript-eslint/parser": "^7.0.0",
|
"@typescript-eslint/parser": "^7.0.0",
|
||||||
"@vercel/ncc": "^0.38.0",
|
"@vercel/ncc": "^0.38.0",
|
||||||
"eslint": "^8.43.0",
|
"eslint": "^8.43.0",
|
||||||
"eslint-config-prettier": "^9.0.0",
|
"eslint-config-prettier": "^10.0.0",
|
||||||
"eslint-plugin-github": "^5.0.0",
|
"eslint-plugin-github": "^5.0.0",
|
||||||
"eslint-plugin-jest": "^28.0.0",
|
"eslint-plugin-jest": "^29.0.1",
|
||||||
"eslint-plugin-prettier": "^5.0.0-alpha.2",
|
"eslint-plugin-prettier": "^5.0.0-alpha.2",
|
||||||
"jest": "^29.5.0",
|
"jest": "^30.0.3",
|
||||||
"prettier": "^3.0.0",
|
"prettier": "^3.0.0",
|
||||||
"ts-jest": "^29.1.0",
|
"ts-jest": "^29.1.0",
|
||||||
"typescript": "^5.1.3"
|
"typescript": "^5.1.3"
|
||||||
|
|||||||
@@ -1,58 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": [
|
|
||||||
"config:base"
|
|
||||||
],
|
|
||||||
"enabled": true,
|
|
||||||
"prHourlyLimit": 10,
|
|
||||||
"prConcurrentLimit": 5,
|
|
||||||
"rebaseWhen": "behind-base-branch",
|
|
||||||
"addLabels": [
|
|
||||||
"dependencies",
|
|
||||||
"merge when passing"
|
|
||||||
],
|
|
||||||
"assignees": [
|
|
||||||
"jackton1"
|
|
||||||
],
|
|
||||||
"assignAutomerge": true,
|
|
||||||
"dependencyDashboard": true,
|
|
||||||
"dependencyDashboardAutoclose": true,
|
|
||||||
"lockFileMaintenance": {
|
|
||||||
"enabled": true,
|
|
||||||
"automerge": true
|
|
||||||
},
|
|
||||||
"nvm": {
|
|
||||||
"enabled": false
|
|
||||||
},
|
|
||||||
"packageRules": [
|
|
||||||
{
|
|
||||||
"matchUpdateTypes": [
|
|
||||||
"minor",
|
|
||||||
"patch",
|
|
||||||
"pin",
|
|
||||||
"digest"
|
|
||||||
],
|
|
||||||
"automerge": true,
|
|
||||||
"rebaseWhen": "behind-base-branch",
|
|
||||||
"addLabels": [
|
|
||||||
"merge when passing"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "docker images",
|
|
||||||
"matchLanguages": [
|
|
||||||
"docker"
|
|
||||||
],
|
|
||||||
"matchUpdateTypes": [
|
|
||||||
"minor",
|
|
||||||
"patch",
|
|
||||||
"pin",
|
|
||||||
"digest"
|
|
||||||
],
|
|
||||||
"rebaseWhen": "behind-base-branch",
|
|
||||||
"addLabels": [
|
|
||||||
"merge when passing"
|
|
||||||
],
|
|
||||||
"automerge": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
||||||
|
|
||||||
exports[`getInputs should correctly parse boolean inputs 1`] = `
|
exports[`getInputs should correctly parse boolean inputs 1`] = `
|
||||||
{
|
{
|
||||||
@@ -12,6 +12,7 @@ exports[`getInputs should correctly parse boolean inputs 1`] = `
|
|||||||
"dirNamesIncludeFilesSeparator": "",
|
"dirNamesIncludeFilesSeparator": "",
|
||||||
"escapeJson": false,
|
"escapeJson": false,
|
||||||
"excludeSubmodules": "false",
|
"excludeSubmodules": "false",
|
||||||
|
"excludeSymlinks": "false",
|
||||||
"failOnInitialDiffError": "false",
|
"failOnInitialDiffError": "false",
|
||||||
"failOnSubmoduleDiffError": "false",
|
"failOnSubmoduleDiffError": "false",
|
||||||
"fetchAdditionalSubmoduleHistory": "false",
|
"fetchAdditionalSubmoduleHistory": "false",
|
||||||
@@ -53,6 +54,7 @@ exports[`getInputs should correctly parse boolean inputs 1`] = `
|
|||||||
"since": "",
|
"since": "",
|
||||||
"sinceLastRemoteCommit": "false",
|
"sinceLastRemoteCommit": "false",
|
||||||
"skipInitialFetch": "true",
|
"skipInitialFetch": "true",
|
||||||
|
"skipSameSha": "false",
|
||||||
"tagsIgnorePattern": "",
|
"tagsIgnorePattern": "",
|
||||||
"tagsPattern": "*",
|
"tagsPattern": "*",
|
||||||
"token": "",
|
"token": "",
|
||||||
@@ -76,6 +78,7 @@ exports[`getInputs should correctly parse numeric inputs 1`] = `
|
|||||||
"dirNamesMaxDepth": 2,
|
"dirNamesMaxDepth": 2,
|
||||||
"escapeJson": false,
|
"escapeJson": false,
|
||||||
"excludeSubmodules": false,
|
"excludeSubmodules": false,
|
||||||
|
"excludeSymlinks": false,
|
||||||
"failOnInitialDiffError": false,
|
"failOnInitialDiffError": false,
|
||||||
"failOnSubmoduleDiffError": false,
|
"failOnSubmoduleDiffError": false,
|
||||||
"fetchAdditionalSubmoduleHistory": false,
|
"fetchAdditionalSubmoduleHistory": false,
|
||||||
@@ -115,6 +118,7 @@ exports[`getInputs should correctly parse numeric inputs 1`] = `
|
|||||||
"since": "",
|
"since": "",
|
||||||
"sinceLastRemoteCommit": false,
|
"sinceLastRemoteCommit": false,
|
||||||
"skipInitialFetch": false,
|
"skipInitialFetch": false,
|
||||||
|
"skipSameSha": false,
|
||||||
"tagsIgnorePattern": "",
|
"tagsIgnorePattern": "",
|
||||||
"tagsPattern": "",
|
"tagsPattern": "",
|
||||||
"token": "",
|
"token": "",
|
||||||
@@ -137,6 +141,7 @@ exports[`getInputs should correctly parse string inputs 1`] = `
|
|||||||
"dirNamesIncludeFilesSeparator": "",
|
"dirNamesIncludeFilesSeparator": "",
|
||||||
"escapeJson": false,
|
"escapeJson": false,
|
||||||
"excludeSubmodules": false,
|
"excludeSubmodules": false,
|
||||||
|
"excludeSymlinks": false,
|
||||||
"failOnInitialDiffError": false,
|
"failOnInitialDiffError": false,
|
||||||
"failOnSubmoduleDiffError": false,
|
"failOnSubmoduleDiffError": false,
|
||||||
"fetchAdditionalSubmoduleHistory": false,
|
"fetchAdditionalSubmoduleHistory": false,
|
||||||
@@ -175,6 +180,7 @@ exports[`getInputs should correctly parse string inputs 1`] = `
|
|||||||
"since": "",
|
"since": "",
|
||||||
"sinceLastRemoteCommit": false,
|
"sinceLastRemoteCommit": false,
|
||||||
"skipInitialFetch": false,
|
"skipInitialFetch": false,
|
||||||
|
"skipSameSha": false,
|
||||||
"tagsIgnorePattern": "",
|
"tagsIgnorePattern": "",
|
||||||
"tagsPattern": "",
|
"tagsPattern": "",
|
||||||
"token": "token",
|
"token": "token",
|
||||||
@@ -198,6 +204,7 @@ exports[`getInputs should handle invalid numeric inputs correctly 1`] = `
|
|||||||
"dirNamesMaxDepth": 2,
|
"dirNamesMaxDepth": 2,
|
||||||
"escapeJson": false,
|
"escapeJson": false,
|
||||||
"excludeSubmodules": false,
|
"excludeSubmodules": false,
|
||||||
|
"excludeSymlinks": false,
|
||||||
"failOnInitialDiffError": false,
|
"failOnInitialDiffError": false,
|
||||||
"failOnSubmoduleDiffError": false,
|
"failOnSubmoduleDiffError": false,
|
||||||
"fetchAdditionalSubmoduleHistory": false,
|
"fetchAdditionalSubmoduleHistory": false,
|
||||||
@@ -237,6 +244,7 @@ exports[`getInputs should handle invalid numeric inputs correctly 1`] = `
|
|||||||
"since": "",
|
"since": "",
|
||||||
"sinceLastRemoteCommit": false,
|
"sinceLastRemoteCommit": false,
|
||||||
"skipInitialFetch": false,
|
"skipInitialFetch": false,
|
||||||
|
"skipSameSha": false,
|
||||||
"tagsIgnorePattern": "",
|
"tagsIgnorePattern": "",
|
||||||
"tagsPattern": "",
|
"tagsPattern": "",
|
||||||
"token": "",
|
"token": "",
|
||||||
@@ -260,6 +268,7 @@ exports[`getInputs should handle negative numeric inputs correctly 1`] = `
|
|||||||
"dirNamesMaxDepth": -2,
|
"dirNamesMaxDepth": -2,
|
||||||
"escapeJson": false,
|
"escapeJson": false,
|
||||||
"excludeSubmodules": false,
|
"excludeSubmodules": false,
|
||||||
|
"excludeSymlinks": false,
|
||||||
"failOnInitialDiffError": false,
|
"failOnInitialDiffError": false,
|
||||||
"failOnSubmoduleDiffError": false,
|
"failOnSubmoduleDiffError": false,
|
||||||
"fetchAdditionalSubmoduleHistory": false,
|
"fetchAdditionalSubmoduleHistory": false,
|
||||||
@@ -299,6 +308,7 @@ exports[`getInputs should handle negative numeric inputs correctly 1`] = `
|
|||||||
"since": "",
|
"since": "",
|
||||||
"sinceLastRemoteCommit": false,
|
"sinceLastRemoteCommit": false,
|
||||||
"skipInitialFetch": false,
|
"skipInitialFetch": false,
|
||||||
|
"skipSameSha": false,
|
||||||
"tagsIgnorePattern": "",
|
"tagsIgnorePattern": "",
|
||||||
"tagsPattern": "",
|
"tagsPattern": "",
|
||||||
"token": "",
|
"token": "",
|
||||||
@@ -321,6 +331,7 @@ exports[`getInputs should return default values when no inputs are provided 1`]
|
|||||||
"dirNamesIncludeFilesSeparator": "",
|
"dirNamesIncludeFilesSeparator": "",
|
||||||
"escapeJson": false,
|
"escapeJson": false,
|
||||||
"excludeSubmodules": false,
|
"excludeSubmodules": false,
|
||||||
|
"excludeSymlinks": false,
|
||||||
"failOnInitialDiffError": false,
|
"failOnInitialDiffError": false,
|
||||||
"failOnSubmoduleDiffError": false,
|
"failOnSubmoduleDiffError": false,
|
||||||
"fetchAdditionalSubmoduleHistory": false,
|
"fetchAdditionalSubmoduleHistory": false,
|
||||||
@@ -362,6 +373,7 @@ exports[`getInputs should return default values when no inputs are provided 1`]
|
|||||||
"since": "",
|
"since": "",
|
||||||
"sinceLastRemoteCommit": false,
|
"sinceLastRemoteCommit": false,
|
||||||
"skipInitialFetch": false,
|
"skipInitialFetch": false,
|
||||||
|
"skipSameSha": false,
|
||||||
"tagsIgnorePattern": "",
|
"tagsIgnorePattern": "",
|
||||||
"tagsPattern": "*",
|
"tagsPattern": "*",
|
||||||
"token": "",
|
"token": "",
|
||||||
|
|||||||
@@ -639,6 +639,8 @@ describe('utils test', () => {
|
|||||||
negationPatternsFirst: false,
|
negationPatternsFirst: false,
|
||||||
useRestApi: false,
|
useRestApi: false,
|
||||||
excludeSubmodules: false,
|
excludeSubmodules: false,
|
||||||
|
excludeSymlinks: false,
|
||||||
|
skipSameSha: false,
|
||||||
fetchMissingHistoryMaxRetries: 20,
|
fetchMissingHistoryMaxRetries: 20,
|
||||||
usePosixPathSeparator: false,
|
usePosixPathSeparator: false,
|
||||||
tagsPattern: '*',
|
tagsPattern: '*',
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ import {
|
|||||||
getFilteredChangedFiles,
|
getFilteredChangedFiles,
|
||||||
gitRenamedFiles,
|
gitRenamedFiles,
|
||||||
gitSubmoduleDiffSHA,
|
gitSubmoduleDiffSHA,
|
||||||
|
isSymlinkInGitTree,
|
||||||
|
isSymlinkOnDisk,
|
||||||
isWindows,
|
isWindows,
|
||||||
jsonOutput,
|
jsonOutput,
|
||||||
setArrayOutput
|
setArrayOutput
|
||||||
@@ -89,21 +91,17 @@ export const processChangedFiles = async ({
|
|||||||
core.endGroup()
|
core.endGroup()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (modifiedKeys.length > 0) {
|
await setArrayOutput({
|
||||||
await setArrayOutput({
|
key: 'modified_keys',
|
||||||
key: 'modified_keys',
|
inputs,
|
||||||
inputs,
|
value: modifiedKeys
|
||||||
value: modifiedKeys
|
})
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if (changedKeys.length > 0) {
|
await setArrayOutput({
|
||||||
await setArrayOutput({
|
key: 'changed_keys',
|
||||||
key: 'changed_keys',
|
inputs,
|
||||||
inputs,
|
value: changedKeys
|
||||||
value: changedKeys
|
})
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filePatterns.length === 0 && Object.keys(yamlFilePatterns).length === 0) {
|
if (filePatterns.length === 0 && Object.keys(yamlFilePatterns).length === 0) {
|
||||||
@@ -224,7 +222,8 @@ export const getAllDiffFiles = async ({
|
|||||||
outputRenamedFilesAsDeletedAndAdded,
|
outputRenamedFilesAsDeletedAndAdded,
|
||||||
fetchAdditionalSubmoduleHistory,
|
fetchAdditionalSubmoduleHistory,
|
||||||
failOnInitialDiffError,
|
failOnInitialDiffError,
|
||||||
failOnSubmoduleDiffError
|
failOnSubmoduleDiffError,
|
||||||
|
submoduleShas
|
||||||
}: {
|
}: {
|
||||||
workingDirectory: string
|
workingDirectory: string
|
||||||
diffSubmodule: boolean
|
diffSubmodule: boolean
|
||||||
@@ -234,6 +233,7 @@ export const getAllDiffFiles = async ({
|
|||||||
fetchAdditionalSubmoduleHistory: boolean
|
fetchAdditionalSubmoduleHistory: boolean
|
||||||
failOnInitialDiffError: boolean
|
failOnInitialDiffError: boolean
|
||||||
failOnSubmoduleDiffError: boolean
|
failOnSubmoduleDiffError: boolean
|
||||||
|
submoduleShas?: Record<string, {previousSha?: string; currentSha?: string}>
|
||||||
}): Promise<ChangedFiles> => {
|
}): Promise<ChangedFiles> => {
|
||||||
const files = await getAllChangedFiles({
|
const files = await getAllChangedFiles({
|
||||||
cwd: workingDirectory,
|
cwd: workingDirectory,
|
||||||
@@ -260,6 +260,9 @@ export const getAllDiffFiles = async ({
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (submoduleShaResult.currentSha && submoduleShaResult.previousSha) {
|
if (submoduleShaResult.currentSha && submoduleShaResult.previousSha) {
|
||||||
|
if (submoduleShas) {
|
||||||
|
submoduleShas[submodulePath] = submoduleShaResult
|
||||||
|
}
|
||||||
let diff = '...'
|
let diff = '...'
|
||||||
|
|
||||||
if (
|
if (
|
||||||
@@ -304,6 +307,139 @@ export const getAllDiffFiles = async ({
|
|||||||
return files
|
return files
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const filterSymlinksFromChangedFiles = async ({
|
||||||
|
changedFiles,
|
||||||
|
workingDirectory,
|
||||||
|
diffResult,
|
||||||
|
submodulePaths,
|
||||||
|
submoduleShas
|
||||||
|
}: {
|
||||||
|
changedFiles: ChangedFiles
|
||||||
|
workingDirectory: string
|
||||||
|
diffResult: DiffResult
|
||||||
|
submodulePaths: string[]
|
||||||
|
submoduleShas?: Record<string, {previousSha?: string; currentSha?: string}>
|
||||||
|
}): Promise<ChangedFiles> => {
|
||||||
|
const filtered: ChangedFiles = {
|
||||||
|
[ChangeTypeEnum.Added]: [],
|
||||||
|
[ChangeTypeEnum.Copied]: [],
|
||||||
|
[ChangeTypeEnum.Deleted]: [],
|
||||||
|
[ChangeTypeEnum.Modified]: [],
|
||||||
|
[ChangeTypeEnum.Renamed]: [],
|
||||||
|
[ChangeTypeEnum.TypeChanged]: [],
|
||||||
|
[ChangeTypeEnum.Unmerged]: [],
|
||||||
|
[ChangeTypeEnum.Unknown]: []
|
||||||
|
}
|
||||||
|
|
||||||
|
const cache = new Map<string, boolean>()
|
||||||
|
const diskCache = new Map<string, boolean>()
|
||||||
|
|
||||||
|
const getSubmoduleContext = (
|
||||||
|
filePath: string
|
||||||
|
): {
|
||||||
|
cwd: string
|
||||||
|
relativePath: string
|
||||||
|
currentSha: string
|
||||||
|
previousSha: string
|
||||||
|
isSubmoduleRoot: boolean
|
||||||
|
} => {
|
||||||
|
const submodulePath = submodulePaths.find(p =>
|
||||||
|
filePath.startsWith(`${p}${path.sep}`)
|
||||||
|
)
|
||||||
|
if (!submodulePath) {
|
||||||
|
return {
|
||||||
|
cwd: workingDirectory,
|
||||||
|
relativePath: filePath,
|
||||||
|
currentSha: diffResult.currentSha,
|
||||||
|
previousSha: diffResult.previousSha,
|
||||||
|
isSubmoduleRoot: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (filePath === submodulePath) {
|
||||||
|
return {
|
||||||
|
cwd: workingDirectory,
|
||||||
|
relativePath: filePath,
|
||||||
|
currentSha: diffResult.currentSha,
|
||||||
|
previousSha: diffResult.previousSha,
|
||||||
|
isSubmoduleRoot: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const submoduleWorkingDirectory = path.join(workingDirectory, submodulePath)
|
||||||
|
const relativePath = filePath.substring(submodulePath.length + 1)
|
||||||
|
const submoduleSha = submoduleShas?.[submodulePath]
|
||||||
|
|
||||||
|
return {
|
||||||
|
cwd: submoduleWorkingDirectory,
|
||||||
|
relativePath,
|
||||||
|
currentSha: submoduleSha?.currentSha || diffResult.currentSha,
|
||||||
|
previousSha: submoduleSha?.previousSha || diffResult.previousSha,
|
||||||
|
isSubmoduleRoot: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const isSymlinkCached = async ({
|
||||||
|
cwd,
|
||||||
|
filePath,
|
||||||
|
sha,
|
||||||
|
preferDisk
|
||||||
|
}: {
|
||||||
|
cwd: string
|
||||||
|
filePath: string
|
||||||
|
sha: string
|
||||||
|
preferDisk: boolean
|
||||||
|
}): Promise<boolean> => {
|
||||||
|
if (preferDisk) {
|
||||||
|
const diskKey = `${cwd}|disk|${filePath}`
|
||||||
|
const cachedDisk = diskCache.get(diskKey)
|
||||||
|
if (cachedDisk !== undefined) {
|
||||||
|
return cachedDisk
|
||||||
|
}
|
||||||
|
const diskResult = await isSymlinkOnDisk({cwd, filePath})
|
||||||
|
diskCache.set(diskKey, diskResult)
|
||||||
|
if (diskResult) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const treeKey = `${cwd}|${sha}|${filePath}`
|
||||||
|
const cachedTree = cache.get(treeKey)
|
||||||
|
if (cachedTree !== undefined) {
|
||||||
|
return cachedTree
|
||||||
|
}
|
||||||
|
const treeResult = await isSymlinkInGitTree({cwd, sha, filePath})
|
||||||
|
cache.set(treeKey, treeResult)
|
||||||
|
return treeResult
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const changeType of Object.keys(changedFiles) as ChangeTypeEnum[]) {
|
||||||
|
const files = changedFiles[changeType] || []
|
||||||
|
for (const filePath of files) {
|
||||||
|
const context = getSubmoduleContext(filePath)
|
||||||
|
if (context.isSubmoduleRoot) {
|
||||||
|
filtered[changeType].push(filePath)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
const isDeleted = changeType === ChangeTypeEnum.Deleted
|
||||||
|
const sha = isDeleted ? context.previousSha : context.currentSha
|
||||||
|
const isSymlink = await isSymlinkCached({
|
||||||
|
cwd: context.cwd,
|
||||||
|
filePath: context.relativePath,
|
||||||
|
sha,
|
||||||
|
preferDisk: !isDeleted
|
||||||
|
})
|
||||||
|
|
||||||
|
if (!isSymlink) {
|
||||||
|
filtered[changeType].push(filePath)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return filtered
|
||||||
|
}
|
||||||
|
|
||||||
function* getFilePaths({
|
function* getFilePaths({
|
||||||
inputs,
|
inputs,
|
||||||
filePaths,
|
filePaths,
|
||||||
|
|||||||
@@ -52,6 +52,13 @@ export const setOutputsAndGetModifiedAndChangedFilesStatus = async ({
|
|||||||
writeOutputFiles: inputs.writeOutputFiles,
|
writeOutputFiles: inputs.writeOutputFiles,
|
||||||
outputDir: inputs.outputDir
|
outputDir: inputs.outputDir
|
||||||
})
|
})
|
||||||
|
await setOutput({
|
||||||
|
key: getOutputKey('any_added', outputPrefix),
|
||||||
|
value: addedFiles.paths.length > 0,
|
||||||
|
writeOutputFiles: inputs.writeOutputFiles,
|
||||||
|
outputDir: inputs.outputDir,
|
||||||
|
json: inputs.json
|
||||||
|
})
|
||||||
|
|
||||||
const copiedFiles = await getChangeTypeFiles({
|
const copiedFiles = await getChangeTypeFiles({
|
||||||
inputs,
|
inputs,
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ export interface DiffResult {
|
|||||||
targetBranch: string
|
targetBranch: string
|
||||||
diff: string
|
diff: string
|
||||||
initialCommit?: boolean
|
initialCommit?: boolean
|
||||||
|
sameSha?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
interface SHAForNonPullRequestEvent {
|
interface SHAForNonPullRequestEvent {
|
||||||
@@ -198,6 +199,19 @@ export const getSHAForNonPullRequestEvent = async ({
|
|||||||
|
|
||||||
if (inputs.baseSha && inputs.sha && currentBranch && targetBranch) {
|
if (inputs.baseSha && inputs.sha && currentBranch && targetBranch) {
|
||||||
if (previousSha === currentSha) {
|
if (previousSha === currentSha) {
|
||||||
|
if (inputs.skipSameSha) {
|
||||||
|
core.info(
|
||||||
|
`Skipping diff because previous sha ${previousSha} is equivalent to the current sha ${currentSha}.`
|
||||||
|
)
|
||||||
|
return {
|
||||||
|
previousSha,
|
||||||
|
currentSha,
|
||||||
|
currentBranch,
|
||||||
|
targetBranch,
|
||||||
|
diff,
|
||||||
|
sameSha: true
|
||||||
|
}
|
||||||
|
}
|
||||||
core.error(
|
core.error(
|
||||||
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
|
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
|
||||||
)
|
)
|
||||||
@@ -305,6 +319,19 @@ export const getSHAForNonPullRequestEvent = async ({
|
|||||||
core.debug(`Current branch: ${currentBranch}`)
|
core.debug(`Current branch: ${currentBranch}`)
|
||||||
|
|
||||||
if (!initialCommit && previousSha === currentSha) {
|
if (!initialCommit && previousSha === currentSha) {
|
||||||
|
if (inputs.skipSameSha) {
|
||||||
|
core.info(
|
||||||
|
`Skipping diff because previous sha ${previousSha} is equivalent to the current sha ${currentSha}.`
|
||||||
|
)
|
||||||
|
return {
|
||||||
|
previousSha,
|
||||||
|
currentSha,
|
||||||
|
currentBranch,
|
||||||
|
targetBranch,
|
||||||
|
diff,
|
||||||
|
sameSha: true
|
||||||
|
}
|
||||||
|
}
|
||||||
core.error(
|
core.error(
|
||||||
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
|
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
|
||||||
)
|
)
|
||||||
@@ -430,6 +457,19 @@ export const getSHAForPullRequestEvent = async ({
|
|||||||
|
|
||||||
if (inputs.baseSha && inputs.sha && currentBranch && targetBranch) {
|
if (inputs.baseSha && inputs.sha && currentBranch && targetBranch) {
|
||||||
if (previousSha === currentSha) {
|
if (previousSha === currentSha) {
|
||||||
|
if (inputs.skipSameSha) {
|
||||||
|
core.info(
|
||||||
|
`Skipping diff because previous sha ${previousSha} is equivalent to the current sha ${currentSha}.`
|
||||||
|
)
|
||||||
|
return {
|
||||||
|
previousSha,
|
||||||
|
currentSha,
|
||||||
|
currentBranch,
|
||||||
|
targetBranch,
|
||||||
|
diff,
|
||||||
|
sameSha: true
|
||||||
|
}
|
||||||
|
}
|
||||||
core.error(
|
core.error(
|
||||||
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
|
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
|
||||||
)
|
)
|
||||||
@@ -561,7 +601,9 @@ export const getSHAForPullRequestEvent = async ({
|
|||||||
core.info(
|
core.info(
|
||||||
'Merge base is not in the local history, fetching remote target branch again...'
|
'Merge base is not in the local history, fetching remote target branch again...'
|
||||||
)
|
)
|
||||||
core.info(`Attempt ${i}/10`)
|
core.info(
|
||||||
|
`Attempt ${i}/${inputs.fetchMissingHistoryMaxRetries || 10}`
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -606,6 +648,19 @@ export const getSHAForPullRequestEvent = async ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (previousSha === currentSha) {
|
if (previousSha === currentSha) {
|
||||||
|
if (inputs.skipSameSha) {
|
||||||
|
core.info(
|
||||||
|
`Skipping diff because previous sha ${previousSha} is equivalent to the current sha ${currentSha}.`
|
||||||
|
)
|
||||||
|
return {
|
||||||
|
previousSha,
|
||||||
|
currentSha,
|
||||||
|
currentBranch,
|
||||||
|
targetBranch,
|
||||||
|
diff,
|
||||||
|
sameSha: true
|
||||||
|
}
|
||||||
|
}
|
||||||
core.error(
|
core.error(
|
||||||
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
|
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ export const DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS: Partial<Inputs> = {
|
|||||||
fetchAdditionalSubmoduleHistory: false,
|
fetchAdditionalSubmoduleHistory: false,
|
||||||
dirNamesDeletedFilesIncludeOnlyDeletedDirs: false,
|
dirNamesDeletedFilesIncludeOnlyDeletedDirs: false,
|
||||||
excludeSubmodules: false,
|
excludeSubmodules: false,
|
||||||
|
excludeSymlinks: false,
|
||||||
|
skipSameSha: false,
|
||||||
fetchMissingHistoryMaxRetries: 20,
|
fetchMissingHistoryMaxRetries: 20,
|
||||||
usePosixPathSeparator: false,
|
usePosixPathSeparator: false,
|
||||||
tagsPattern: '*',
|
tagsPattern: '*',
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ export type Inputs = {
|
|||||||
negationPatternsFirst: boolean
|
negationPatternsFirst: boolean
|
||||||
useRestApi: boolean
|
useRestApi: boolean
|
||||||
excludeSubmodules: boolean
|
excludeSubmodules: boolean
|
||||||
|
excludeSymlinks: boolean
|
||||||
|
skipSameSha: boolean
|
||||||
fetchMissingHistoryMaxRetries?: number
|
fetchMissingHistoryMaxRetries?: number
|
||||||
usePosixPathSeparator: boolean
|
usePosixPathSeparator: boolean
|
||||||
tagsPattern: string
|
tagsPattern: string
|
||||||
@@ -249,6 +251,14 @@ export const getInputs = (): Inputs => {
|
|||||||
required: false
|
required: false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const excludeSymlinks = core.getBooleanInput('exclude_symlinks', {
|
||||||
|
required: false
|
||||||
|
})
|
||||||
|
|
||||||
|
const skipSameSha = core.getBooleanInput('skip_same_sha', {
|
||||||
|
required: false
|
||||||
|
})
|
||||||
|
|
||||||
const fetchMissingHistoryMaxRetries = core.getInput(
|
const fetchMissingHistoryMaxRetries = core.getInput(
|
||||||
'fetch_missing_history_max_retries',
|
'fetch_missing_history_max_retries',
|
||||||
{required: false}
|
{required: false}
|
||||||
@@ -310,6 +320,8 @@ export const getInputs = (): Inputs => {
|
|||||||
fetchAdditionalSubmoduleHistory,
|
fetchAdditionalSubmoduleHistory,
|
||||||
dirNamesDeletedFilesIncludeOnlyDeletedDirs,
|
dirNamesDeletedFilesIncludeOnlyDeletedDirs,
|
||||||
excludeSubmodules,
|
excludeSubmodules,
|
||||||
|
excludeSymlinks,
|
||||||
|
skipSameSha,
|
||||||
usePosixPathSeparator,
|
usePosixPathSeparator,
|
||||||
tagsPattern,
|
tagsPattern,
|
||||||
tagsIgnorePattern,
|
tagsIgnorePattern,
|
||||||
|
|||||||
66
src/main.ts
66
src/main.ts
@@ -5,8 +5,10 @@ import {
|
|||||||
processChangedFiles,
|
processChangedFiles,
|
||||||
ChangeTypeEnum,
|
ChangeTypeEnum,
|
||||||
getAllDiffFiles,
|
getAllDiffFiles,
|
||||||
|
filterSymlinksFromChangedFiles,
|
||||||
getChangedFilesFromGithubAPI,
|
getChangedFilesFromGithubAPI,
|
||||||
getRenamedFiles
|
getRenamedFiles,
|
||||||
|
ChangedFiles
|
||||||
} from './changedFiles'
|
} from './changedFiles'
|
||||||
import {
|
import {
|
||||||
DiffResult,
|
DiffResult,
|
||||||
@@ -127,11 +129,57 @@ const getChangedFilesFromLocalGitHistory = async ({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (diffResult.sameSha) {
|
||||||
|
core.info('Base and head SHAs are identical; no changed files to report.')
|
||||||
|
const emptyChangedFiles: ChangedFiles = {
|
||||||
|
[ChangeTypeEnum.Added]: [],
|
||||||
|
[ChangeTypeEnum.Copied]: [],
|
||||||
|
[ChangeTypeEnum.Deleted]: [],
|
||||||
|
[ChangeTypeEnum.Modified]: [],
|
||||||
|
[ChangeTypeEnum.Renamed]: [],
|
||||||
|
[ChangeTypeEnum.TypeChanged]: [],
|
||||||
|
[ChangeTypeEnum.Unmerged]: [],
|
||||||
|
[ChangeTypeEnum.Unknown]: []
|
||||||
|
}
|
||||||
|
await processChangedFiles({
|
||||||
|
filePatterns,
|
||||||
|
allDiffFiles: emptyChangedFiles,
|
||||||
|
inputs,
|
||||||
|
yamlFilePatterns,
|
||||||
|
workingDirectory
|
||||||
|
})
|
||||||
|
|
||||||
|
if (inputs.includeAllOldNewRenamedFiles) {
|
||||||
|
await setOutput({
|
||||||
|
key: 'all_old_new_renamed_files',
|
||||||
|
value: inputs.json ? [] : '',
|
||||||
|
writeOutputFiles: inputs.writeOutputFiles,
|
||||||
|
outputDir: inputs.outputDir,
|
||||||
|
json: inputs.json,
|
||||||
|
safeOutput: inputs.safeOutput
|
||||||
|
})
|
||||||
|
await setOutput({
|
||||||
|
key: 'all_old_new_renamed_files_count',
|
||||||
|
value: '0',
|
||||||
|
writeOutputFiles: inputs.writeOutputFiles,
|
||||||
|
outputDir: inputs.outputDir,
|
||||||
|
json: inputs.json
|
||||||
|
})
|
||||||
|
}
|
||||||
|
core.info('All Done!')
|
||||||
|
core.endGroup()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
core.info(
|
core.info(
|
||||||
`Retrieving changes between ${diffResult.previousSha} (${diffResult.targetBranch}) → ${diffResult.currentSha} (${diffResult.currentBranch})`
|
`Retrieving changes between ${diffResult.previousSha} (${diffResult.targetBranch}) → ${diffResult.currentSha} (${diffResult.currentBranch})`
|
||||||
)
|
)
|
||||||
|
|
||||||
const allDiffFiles = await getAllDiffFiles({
|
const submoduleShas: Record<
|
||||||
|
string,
|
||||||
|
{previousSha?: string; currentSha?: string}
|
||||||
|
> = {}
|
||||||
|
let allDiffFiles = await getAllDiffFiles({
|
||||||
workingDirectory,
|
workingDirectory,
|
||||||
diffSubmodule,
|
diffSubmodule,
|
||||||
diffResult,
|
diffResult,
|
||||||
@@ -139,8 +187,20 @@ const getChangedFilesFromLocalGitHistory = async ({
|
|||||||
outputRenamedFilesAsDeletedAndAdded,
|
outputRenamedFilesAsDeletedAndAdded,
|
||||||
fetchAdditionalSubmoduleHistory: inputs.fetchAdditionalSubmoduleHistory,
|
fetchAdditionalSubmoduleHistory: inputs.fetchAdditionalSubmoduleHistory,
|
||||||
failOnInitialDiffError: inputs.failOnInitialDiffError,
|
failOnInitialDiffError: inputs.failOnInitialDiffError,
|
||||||
failOnSubmoduleDiffError: inputs.failOnSubmoduleDiffError
|
failOnSubmoduleDiffError: inputs.failOnSubmoduleDiffError,
|
||||||
|
submoduleShas
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (inputs.excludeSymlinks) {
|
||||||
|
core.info('Excluding symlinks from the diff')
|
||||||
|
allDiffFiles = await filterSymlinksFromChangedFiles({
|
||||||
|
changedFiles: allDiffFiles,
|
||||||
|
workingDirectory,
|
||||||
|
diffResult,
|
||||||
|
submodulePaths,
|
||||||
|
submoduleShas
|
||||||
|
})
|
||||||
|
}
|
||||||
core.debug(`All diff files: ${JSON.stringify(allDiffFiles)}`)
|
core.debug(`All diff files: ${JSON.stringify(allDiffFiles)}`)
|
||||||
core.info('All Done!')
|
core.info('All Done!')
|
||||||
core.endGroup()
|
core.endGroup()
|
||||||
|
|||||||
144
src/utils.ts
144
src/utils.ts
@@ -152,6 +152,69 @@ export const exists = async (filePath: string): Promise<boolean> => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if a file is a symlink on disk
|
||||||
|
* @param cwd - working directory
|
||||||
|
* @param filePath - path to check
|
||||||
|
* @returns file is a symlink
|
||||||
|
*/
|
||||||
|
export const isSymlinkOnDisk = async ({
|
||||||
|
cwd,
|
||||||
|
filePath
|
||||||
|
}: {
|
||||||
|
cwd: string
|
||||||
|
filePath: string
|
||||||
|
}): Promise<boolean> => {
|
||||||
|
try {
|
||||||
|
const stat = await fs.lstat(path.join(cwd, filePath))
|
||||||
|
return stat.isSymbolicLink()
|
||||||
|
} catch {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if a file is a symlink in a git tree
|
||||||
|
* @param cwd - working directory
|
||||||
|
* @param sha - commit sha
|
||||||
|
* @param filePath - path to check
|
||||||
|
* @returns file is a symlink
|
||||||
|
*/
|
||||||
|
export const isSymlinkInGitTree = async ({
|
||||||
|
cwd,
|
||||||
|
sha,
|
||||||
|
filePath
|
||||||
|
}: {
|
||||||
|
cwd: string
|
||||||
|
sha: string
|
||||||
|
filePath: string
|
||||||
|
}): Promise<boolean> => {
|
||||||
|
if (!sha) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
const {stdout, exitCode} = await exec.getExecOutput(
|
||||||
|
'git',
|
||||||
|
['ls-tree', '-r', sha, '--', filePath],
|
||||||
|
{
|
||||||
|
cwd,
|
||||||
|
ignoreReturnCode: true,
|
||||||
|
silent: !core.isDebug()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
if (exitCode !== 0) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
const line = stdout.split('\n').find(Boolean)
|
||||||
|
if (!line) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
const [mode] = line.split(/\s+/)
|
||||||
|
return mode === '120000'
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates lines of a file as an async iterable iterator
|
* Generates lines of a file as an async iterable iterator
|
||||||
* @param filePath - path of file to read
|
* @param filePath - path of file to read
|
||||||
@@ -819,14 +882,49 @@ export const cleanShaInput = async ({
|
|||||||
|
|
||||||
if (exitCode !== 0) {
|
if (exitCode !== 0) {
|
||||||
const octokit = github.getOctokit(token)
|
const octokit = github.getOctokit(token)
|
||||||
// If it's not a valid commit sha, assume it's a branch name and get the HEAD sha
|
const owner = github.context.repo.owner
|
||||||
const {data: refData} = await octokit.rest.git.getRef({
|
const repo = github.context.repo.repo
|
||||||
owner: github.context.repo.owner,
|
const isNotFoundError = (error: unknown): boolean =>
|
||||||
repo: github.context.repo.repo,
|
typeof error === 'object' &&
|
||||||
ref: `heads/${sha}`
|
error !== null &&
|
||||||
|
'status' in error &&
|
||||||
|
(error as {status?: number}).status === 404
|
||||||
|
// If it's not a valid commit sha, assume it's a ref name first.
|
||||||
|
try {
|
||||||
|
const {data: refData} = await octokit.rest.git.getRef({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
ref: `heads/${sha}`
|
||||||
|
})
|
||||||
|
|
||||||
|
return refData.object.sha
|
||||||
|
} catch (error) {
|
||||||
|
if (!isNotFoundError(error)) {
|
||||||
|
throw error
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const {data: refData} = await octokit.rest.git.getRef({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
ref: `tags/${sha}`
|
||||||
|
})
|
||||||
|
|
||||||
|
return refData.object.sha
|
||||||
|
} catch (error) {
|
||||||
|
if (!isNotFoundError(error)) {
|
||||||
|
throw error
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const {data: commitData} = await octokit.rest.git.getCommit({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
commit_sha: sha
|
||||||
})
|
})
|
||||||
|
|
||||||
return refData.object.sha
|
return commitData.sha
|
||||||
}
|
}
|
||||||
|
|
||||||
return stdout.trim()
|
return stdout.trim()
|
||||||
@@ -1258,16 +1356,11 @@ export const getYamlFilePatterns = async ({
|
|||||||
const newFilePatterns = await getYamlFilePatternsFromContents({filePath})
|
const newFilePatterns = await getYamlFilePatternsFromContents({filePath})
|
||||||
for (const key in newFilePatterns) {
|
for (const key in newFilePatterns) {
|
||||||
if (key in filePatterns) {
|
if (key in filePatterns) {
|
||||||
core.warning(
|
filePatterns[key] = [...filePatterns[key], ...newFilePatterns[key]]
|
||||||
`files_yaml_from_source_file: Duplicated key ${key} detected in ${filePath}, the ${filePatterns[key]} will be overwritten by ${newFilePatterns[key]}.`
|
} else {
|
||||||
)
|
filePatterns[key] = newFilePatterns[key]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
filePatterns = {
|
|
||||||
...filePatterns,
|
|
||||||
...newFilePatterns
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1279,9 +1372,12 @@ export const getYamlFilePatterns = async ({
|
|||||||
|
|
||||||
for (const key in newIgnoreFilePatterns) {
|
for (const key in newIgnoreFilePatterns) {
|
||||||
if (key in filePatterns) {
|
if (key in filePatterns) {
|
||||||
core.warning(
|
filePatterns[key] = [
|
||||||
`files_ignore_yaml: Duplicated key ${key} detected, the ${filePatterns[key]} will be overwritten by ${newIgnoreFilePatterns[key]}.`
|
...filePatterns[key],
|
||||||
)
|
...newIgnoreFilePatterns[key]
|
||||||
|
]
|
||||||
|
} else {
|
||||||
|
filePatterns[key] = newIgnoreFilePatterns[key]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1305,16 +1401,14 @@ export const getYamlFilePatterns = async ({
|
|||||||
|
|
||||||
for (const key in newIgnoreFilePatterns) {
|
for (const key in newIgnoreFilePatterns) {
|
||||||
if (key in filePatterns) {
|
if (key in filePatterns) {
|
||||||
core.warning(
|
filePatterns[key] = [
|
||||||
`files_ignore_yaml_from_source_file: Duplicated key ${key} detected in ${filePath}, the ${filePatterns[key]} will be overwritten by ${newIgnoreFilePatterns[key]}.`
|
...filePatterns[key],
|
||||||
)
|
...newIgnoreFilePatterns[key]
|
||||||
|
]
|
||||||
|
} else {
|
||||||
|
filePatterns[key] = newIgnoreFilePatterns[key]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
filePatterns = {
|
|
||||||
...filePatterns,
|
|
||||||
...newIgnoreFilePatterns
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Submodule test/demo updated: 5dfac2e9a7...c6bd3b33a9
1
test/new.md
Normal file
1
test/new.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
This is a test markdown file
|
||||||
1
test/symlink-target.txt
Normal file
1
test/symlink-target.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Symlink target fixture.
|
||||||
1
test/symlink-to-target
Symbolic link
1
test/symlink-to-target
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
symlink-target.txt
|
||||||
@@ -1 +1 @@
|
|||||||
This is a test file.
|
This is a test file
|
||||||
|
|||||||
Reference in New Issue
Block a user