Compare commits
755 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7e64030c44 | ||
|
|
6b1da8ffbd | ||
|
|
4e680e146a | ||
|
|
c8fb92cb80 | ||
|
|
32a737ef81 | ||
|
|
03d80c561a | ||
|
|
d5cbe0076a | ||
|
|
e3cd18048c | ||
|
|
1d1543af8c | ||
|
|
172ae47338 | ||
|
|
bd376fbcfa | ||
|
|
93b782be1f | ||
|
|
10b3f59625 | ||
|
|
53acb3010e | ||
|
|
3032ed1238 | ||
|
|
84ed30e2f4 | ||
|
|
6961203862 | ||
|
|
1837ef5578 | ||
|
|
74b06cafc9 | ||
|
|
74b3be4bf5 | ||
|
|
5ce975c602 | ||
|
|
89c8821949 | ||
|
|
bd5870c212 | ||
|
|
570b202ee2 | ||
|
|
7a453ffa2e | ||
|
|
04124efe75 | ||
|
|
6f22f2f9ba | ||
|
|
3ee6abf610 | ||
|
|
e26c03691d | ||
|
|
fa4776dd71 | ||
|
|
379de7170f | ||
|
|
23ffa77dee | ||
|
|
fdbd13bcad | ||
|
|
23e3c4300c | ||
|
|
063e674726 | ||
|
|
62102d8eaa | ||
|
|
5a331a4999 | ||
|
|
89cf313699 | ||
|
|
e0e0326cc5 | ||
|
|
ca6650c514 | ||
|
|
bda7fb2353 | ||
|
|
74338865c1 | ||
|
|
b477871310 | ||
|
|
598d24527e | ||
|
|
6498ab1ae4 | ||
|
|
8aea4cfc19 | ||
|
|
55362b9d1b | ||
|
|
e47c489b15 | ||
|
|
5e3c67ab60 | ||
|
|
3253948ff2 | ||
|
|
0e4863b3a2 | ||
|
|
10999da6dc | ||
|
|
07dba6b85d | ||
|
|
ab710fb168 | ||
|
|
cec01b8d1d | ||
|
|
8efe373530 | ||
|
|
123da80395 | ||
|
|
ab5069cbb1 | ||
|
|
eebd3f0a07 | ||
|
|
a2ffc56365 | ||
|
|
58afb05fef | ||
|
|
fe5db36271 | ||
|
|
5982c92676 | ||
|
|
4d6ed243ff | ||
|
|
adb9fa830d | ||
|
|
73246a42b0 | ||
|
|
65a49b917f | ||
|
|
5e8b123b3d | ||
|
|
6164e1cd7f | ||
|
|
4dc0f1f904 | ||
|
|
b4d152a6a5 | ||
|
|
f0fc230482 | ||
|
|
cb2d527650 | ||
|
|
68f10de3ea | ||
|
|
d5414fd30b | ||
|
|
608b7f81de | ||
|
|
a4b2b85206 | ||
|
|
adde7bbfea | ||
|
|
85bd8694a9 | ||
|
|
4dce8843f8 | ||
|
|
7f2aa19bdc | ||
|
|
4ffc815953 | ||
|
|
210cc839c2 | ||
|
|
2c684aedfa | ||
|
|
2703edcc41 | ||
|
|
1a3ea1d324 | ||
|
|
db3ea27a0c | ||
|
|
fc6ac10d4c | ||
|
|
08f351ba16 | ||
|
|
aae4005247 | ||
|
|
eb97e78971 | ||
|
|
35d9bb6ce9 | ||
|
|
ce8c198347 | ||
|
|
1982157b6c | ||
|
|
dddfbd694c | ||
|
|
41ed98fdd5 | ||
|
|
966bc5f420 | ||
|
|
ddcadfd11d | ||
|
|
299748b520 | ||
|
|
57d9664f8e | ||
|
|
653adcf614 | ||
|
|
019dd18a51 | ||
|
|
235067705e | ||
|
|
f487fc6c7b | ||
|
|
0953088baa | ||
|
|
ddc065bac8 | ||
|
|
82b26d6c01 | ||
|
|
c54e638a31 | ||
|
|
e7bcef0f0b | ||
|
|
6f8a32e362 | ||
|
|
0562b9f865 | ||
|
|
be519638b0 | ||
|
|
596fc641d0 | ||
|
|
c0c2634976 | ||
|
|
5ac4c9fe42 | ||
|
|
93ae7c6b6a | ||
|
|
ca8881ae34 | ||
|
|
487675b843 | ||
|
|
988322a381 | ||
|
|
30649ae7e0 | ||
|
|
52c733bd7b | ||
|
|
e6a750f507 | ||
|
|
b1a4c25c63 | ||
|
|
15be594e99 | ||
|
|
5af8560e3b | ||
|
|
ef3b39a58e | ||
|
|
a7850c2ddb | ||
|
|
9a6dabf8d1 | ||
|
|
4f9f822a4a | ||
|
|
e5ceb2cea2 | ||
|
|
238f44e1cf | ||
|
|
dc4c7d50aa | ||
|
|
ebf889a3b1 | ||
|
|
45c8d9cb88 | ||
|
|
19b584354a | ||
|
|
7839ede089 | ||
|
|
15cb0ce053 | ||
|
|
c50c1e0f0c | ||
|
|
b6c440bf6f | ||
|
|
c2296c1b04 | ||
|
|
bacda0ec4f | ||
|
|
ea251d4d2f | ||
|
|
41e8587ad1 | ||
|
|
6159d43b91 | ||
|
|
83eb7d0871 | ||
|
|
e80b1c7e65 | ||
|
|
4c09115926 | ||
|
|
3f78288717 | ||
|
|
1d1287f9fa | ||
|
|
613e474ee0 | ||
|
|
8125192be8 | ||
|
|
d5d55864de | ||
|
|
508ea1fe11 | ||
|
|
dbfd5e10a7 | ||
|
|
4ca6f666de | ||
|
|
20abff4daa | ||
|
|
011c918754 | ||
|
|
71a44a5c8c | ||
|
|
42b8312161 | ||
|
|
99639db2ad | ||
|
|
392359fc8c | ||
|
|
b4afd867a1 | ||
|
|
171fd357a8 | ||
|
|
232c8a3b69 | ||
|
|
8fb979df89 | ||
|
|
7f33882a12 | ||
|
|
8aef40ac80 | ||
|
|
7fcaecbe85 | ||
|
|
8bb2cb2854 | ||
|
|
088336658d | ||
|
|
57f3d32fad | ||
|
|
d09f11f8d0 | ||
|
|
7e8d87b891 | ||
|
|
ee6a0bc6dc | ||
|
|
1d8a2f9137 | ||
|
|
8a5f6280e6 | ||
|
|
61648e78ea | ||
|
|
2693e63ae2 | ||
|
|
ed82d95e3a | ||
|
|
0626c3f940 | ||
|
|
83952deb06 | ||
|
|
c4bb28b25e | ||
|
|
a2b1e5dbb9 | ||
|
|
349b9cd596 | ||
|
|
565ad867fa | ||
|
|
d984765c3c | ||
|
|
f25e6fe945 | ||
|
|
110b9baa5f | ||
|
|
d2f7657e17 | ||
|
|
a5b3ab3adf | ||
|
|
b04bee68cb | ||
|
|
5a415cfa17 | ||
|
|
dac1573a9f | ||
|
|
2cb89c14f8 | ||
|
|
0c11739343 | ||
|
|
a8f275909b | ||
|
|
78e918f749 | ||
|
|
e20f763562 | ||
|
|
aa677d9200 | ||
|
|
c763fb03d9 | ||
|
|
e92019659f | ||
|
|
42fb35e835 | ||
|
|
75ea265d3a | ||
|
|
88a778c8d7 | ||
|
|
2f66d3becc | ||
|
|
9ca5762164 | ||
|
|
4f51d4bdf2 | ||
|
|
3599672c90 | ||
|
|
2b31ed904d | ||
|
|
5db646f3d5 | ||
|
|
f1df99fa1d | ||
|
|
e5cb100651 | ||
|
|
5375720ffa | ||
|
|
4311e06ffd | ||
|
|
f8e9251aac | ||
|
|
b1478017f4 | ||
|
|
1a70916518 | ||
|
|
1bfae76e44 | ||
|
|
85368c0a27 | ||
|
|
901681a010 | ||
|
|
3787560a3d | ||
|
|
a64becde5e | ||
|
|
d6db5b61d1 | ||
|
|
3d674ed245 | ||
|
|
aa0a3c1ae1 | ||
|
|
d5e31f6bc1 | ||
|
|
211879e6d9 | ||
|
|
b75f6c0571 | ||
|
|
4f1ac0562f | ||
|
|
f8f2961361 | ||
|
|
ce4b8e3cba | ||
|
|
ebdb5eac17 | ||
|
|
a4150e3d36 | ||
|
|
4f56809937 | ||
|
|
a377d0ea43 | ||
|
|
483c5e735d | ||
|
|
ba522dd664 | ||
|
|
10aaa531b8 | ||
|
|
394fc25d46 | ||
|
|
76855a1bbe | ||
|
|
6758393645 | ||
|
|
4837447a0b | ||
|
|
78ac3f4d78 | ||
|
|
c3ab8f3936 | ||
|
|
e070e451a6 | ||
|
|
f701d66cbd | ||
|
|
acd99f22a7 | ||
|
|
41bac1e2f7 | ||
|
|
c1b58174f0 | ||
|
|
160c1dacc6 | ||
|
|
550a972358 | ||
|
|
6114375387 | ||
|
|
db14f52900 | ||
|
|
7dd55804cf | ||
|
|
e8733f64fa | ||
|
|
2e7b724f9a | ||
|
|
996300de86 | ||
|
|
9bb7d28e70 | ||
|
|
d574e2b818 | ||
|
|
dccc349e98 | ||
|
|
d4e4d24f9c | ||
|
|
b78225f7de | ||
|
|
6384aa7d7f | ||
|
|
e034ba961f | ||
|
|
40f3d5695f | ||
|
|
8c727bef3c | ||
|
|
7330323a2d | ||
|
|
2b49b75dcb | ||
|
|
a98e4d3169 | ||
|
|
ca4840ce6a | ||
|
|
0a3cc94baa | ||
|
|
237b05158c | ||
|
|
7f75cdb504 | ||
|
|
4bf8a029f7 | ||
|
|
4b6b8eb9e7 | ||
|
|
fd3e44b556 | ||
|
|
1d0bc9880c | ||
|
|
9f3cd20ba2 | ||
|
|
19e86cc60b | ||
|
|
ca30b8500a | ||
|
|
bdfc50c467 | ||
|
|
aabcbcc882 | ||
|
|
6cf9a958b7 | ||
|
|
61361b9cde | ||
|
|
4d1ed48b49 | ||
|
|
58ffe6f792 | ||
|
|
0dbccaa808 | ||
|
|
f195837047 | ||
|
|
bfbf803f41 | ||
|
|
07a1f5a723 | ||
|
|
427b9f931d | ||
|
|
3472a62032 | ||
|
|
f62204d4c7 | ||
|
|
19ecae980a | ||
|
|
8a2dbf5570 | ||
|
|
1d0a36c98e | ||
|
|
760335a2f5 | ||
|
|
70d6677420 | ||
|
|
c789451909 | ||
|
|
6e62cd44dc | ||
|
|
82d305f9fa | ||
|
|
183a9ec343 | ||
|
|
3b6c057cd8 | ||
|
|
e2b21be3d2 | ||
|
|
a7b70fa84d | ||
|
|
7a06bb7247 | ||
|
|
9dc80210cf | ||
|
|
a1a2be24bd | ||
|
|
bb675e1715 | ||
|
|
9e0389c5ae | ||
|
|
9b3a93a0c1 | ||
|
|
a991e1d22a | ||
|
|
0df8efd4d7 | ||
|
|
4f64429e8b | ||
|
|
a73691148f | ||
|
|
cd8e421366 | ||
|
|
32a46ba6ba | ||
|
|
0e4974f191 | ||
|
|
4f939f8e80 | ||
|
|
2405ae6c59 | ||
|
|
49ac42e025 | ||
|
|
9cac2f8ea1 | ||
|
|
6497e8ef99 | ||
|
|
1ae6035162 | ||
|
|
8b8c347ee9 | ||
|
|
bd4ca4c445 | ||
|
|
2a28c9bb7d | ||
|
|
5f902276c1 | ||
|
|
73401b8f0b | ||
|
|
fa300c6aa4 | ||
|
|
79fbc9646d | ||
|
|
eaffc06f9c | ||
|
|
d14a55854a | ||
|
|
01588a88f3 | ||
|
|
c3a1d0574b | ||
|
|
0358232251 | ||
|
|
5bc868d5b5 | ||
|
|
a1893f84b3 | ||
|
|
44d49bc228 | ||
|
|
3f1e44af6c | ||
|
|
d9be0ccb5e | ||
|
|
ff10d2fbc5 | ||
|
|
8fb90ed7f6 | ||
|
|
474e3bd363 | ||
|
|
b2902f40b3 | ||
|
|
17ae17127c | ||
|
|
65dc0e47e9 | ||
|
|
ba5abef332 | ||
|
|
84dcdf586d | ||
|
|
74dc2e8a78 | ||
|
|
a817eeece0 | ||
|
|
b120be5d01 | ||
|
|
626ad8da53 | ||
|
|
8356a01788 | ||
|
|
a84c8f54f9 | ||
|
|
a4f296d02e | ||
|
|
33eef1b0ed | ||
|
|
ae2404f72e | ||
|
|
3f045143ec | ||
|
|
0707f1b441 | ||
|
|
fbc9b61579 | ||
|
|
ac602e39b8 | ||
|
|
ef32360b2d | ||
|
|
4b60d05705 | ||
|
|
385d98db73 | ||
|
|
8c766cffe7 | ||
|
|
00cc8e59b9 | ||
|
|
56a1ce212a | ||
|
|
baaf598b46 | ||
|
|
15519b6a6f | ||
|
|
e9a054c870 | ||
|
|
ed7adeaf22 | ||
|
|
703a319222 | ||
|
|
e6fbdde201 | ||
|
|
860dc31320 | ||
|
|
fd5d6c3a2d | ||
|
|
77fbd5a18c | ||
|
|
aba4e5712b | ||
|
|
c3642c4a1c | ||
|
|
0a207fd892 | ||
|
|
2a74e5e5d4 | ||
|
|
6e85a3501a | ||
|
|
660db6c787 | ||
|
|
a4d22acb20 | ||
|
|
984b4ca567 | ||
|
|
477b380579 | ||
|
|
a699a3be4a | ||
|
|
3a46c048f7 | ||
|
|
d78a469ec7 | ||
|
|
0d9ec12402 | ||
|
|
7e929625a3 | ||
|
|
c09cd8795d | ||
|
|
67482da9c0 | ||
|
|
ef8591de30 | ||
|
|
f282e19e52 | ||
|
|
a20b263d03 | ||
|
|
69b90fbdbe | ||
|
|
2cf3132a60 | ||
|
|
dc7365b27b | ||
|
|
d8b80b3b09 | ||
|
|
33d8d67443 | ||
|
|
9f74b8c9e2 | ||
|
|
17ce62043e | ||
|
|
896db63e40 | ||
|
|
467f657e76 | ||
|
|
efaec6dced | ||
|
|
5adea4114e | ||
|
|
02a5f95a79 | ||
|
|
91e0894f3f | ||
|
|
20cff0223e | ||
|
|
8a4cc4fbd6 | ||
|
|
d372997c45 | ||
|
|
a0b9b1e5a9 | ||
|
|
88defd04db | ||
|
|
e428e21b89 | ||
|
|
b383c47099 | ||
|
|
a262e55d0d | ||
|
|
637cb57c28 | ||
|
|
65688ba5c8 | ||
|
|
63f38f9f41 | ||
|
|
3d46931839 | ||
|
|
3840bc84e6 | ||
|
|
1c9a614a4f | ||
|
|
d127e35180 | ||
|
|
386cb933d4 | ||
|
|
54b7c1b8d2 | ||
|
|
967c8a0609 | ||
|
|
6093777a38 | ||
|
|
bf3ca40593 | ||
|
|
0951b64836 | ||
|
|
32c707316b | ||
|
|
f08344bfbc | ||
|
|
bcd97d2870 | ||
|
|
e54a2423a8 | ||
|
|
3c938dc216 | ||
|
|
80e364a5d0 | ||
|
|
120c425db7 | ||
|
|
df466ccd7d | ||
|
|
0a5b7c6ec0 | ||
|
|
08d0cedfea | ||
|
|
5abef67e95 | ||
|
|
ba788ed4ee | ||
|
|
e883d3fc1b | ||
|
|
7f3332eb99 | ||
|
|
28638a0d9b | ||
|
|
0686733297 | ||
|
|
8a7336fb6f | ||
|
|
bf097488b7 | ||
|
|
fad01cd373 | ||
|
|
5b0b92e859 | ||
|
|
dc7e117725 | ||
|
|
f4f55124a4 | ||
|
|
b86dc28fcb | ||
|
|
c6cd9a4c8b | ||
|
|
62974b6c9c | ||
|
|
f76843a802 | ||
|
|
fb362d4f10 | ||
|
|
3996bc3fde | ||
|
|
7b68fcd082 | ||
|
|
c8dc4b69b8 | ||
|
|
0265ed819d | ||
|
|
96ce8da4f6 | ||
|
|
2ed48aa52f | ||
|
|
434c3eaa98 | ||
|
|
0efacabbb5 | ||
|
|
61fac4da4b | ||
|
|
6ea66cc129 | ||
|
|
30b9252953 | ||
|
|
3b10cebd3d | ||
|
|
171e4353ac | ||
|
|
1882e2f481 | ||
|
|
0c4c0c47b8 | ||
|
|
fe3a37012f | ||
|
|
fe47f7dc4c | ||
|
|
61e93c8aeb | ||
|
|
73e225f69c | ||
|
|
ef0a29048c | ||
|
|
e447432ead | ||
|
|
4203489288 | ||
|
|
e7e332ee69 | ||
|
|
1bf2487713 | ||
|
|
07952792bb | ||
|
|
3e827ae4d1 | ||
|
|
839d5701db | ||
|
|
3ebdc42d8b | ||
|
|
747f9e656c | ||
|
|
9d429cc7ac | ||
|
|
b04424611d | ||
|
|
4f5723a9fe | ||
|
|
d362fea453 | ||
|
|
22ede94fe5 | ||
|
|
94e6fba8d8 | ||
|
|
61fb39f691 | ||
|
|
9478e36442 | ||
|
|
e6bd87aabe | ||
|
|
443b6c32e7 | ||
|
|
56a01f8a9e | ||
|
|
2e4e636392 | ||
|
|
c21087a6bb | ||
|
|
ac07453ae9 | ||
|
|
43835a2749 | ||
|
|
36f5714273 | ||
|
|
d48d7b71f5 | ||
|
|
b82208d0c1 | ||
|
|
9f7a99a9af | ||
|
|
a37f1b1575 | ||
|
|
3dbb79f467 | ||
|
|
44220f8c89 | ||
|
|
e43adb629b | ||
|
|
3c0e266bd5 | ||
|
|
67230d6de5 | ||
|
|
6a9cc33099 | ||
|
|
4b4f463907 | ||
|
|
991e8b3aae | ||
|
|
420a7792d0 | ||
|
|
e062ae86aa | ||
|
|
6326c61a70 | ||
|
|
eea929be22 | ||
|
|
9962dc418e | ||
|
|
77f03d2bb5 | ||
|
|
a236f54cc9 | ||
|
|
de6d1ed419 | ||
|
|
5345fb6b0e | ||
|
|
72d3bb8b33 | ||
|
|
d908ddd2ef | ||
|
|
8dc46ae460 | ||
|
|
1218e11f1e | ||
|
|
18ddeeb8bc | ||
|
|
3b614c0cfa | ||
|
|
5f89dc7d6e | ||
|
|
2d251d6924 | ||
|
|
c46761fdcd | ||
|
|
321490c60a | ||
|
|
dc88c3a0c5 | ||
|
|
2125c059c3 | ||
|
|
f6e319ef2e | ||
|
|
3d1f14f079 | ||
|
|
1abc7bec79 | ||
|
|
18dfe0dd4e | ||
|
|
c94657a1d8 | ||
|
|
c755692dde | ||
|
|
1e46f60599 | ||
|
|
f009ea4a47 | ||
|
|
7cdc68de58 | ||
|
|
734bb168e3 | ||
|
|
6e227a5e76 | ||
|
|
307c11527a | ||
|
|
5621d09ed1 | ||
|
|
8c4057e25f | ||
|
|
8f47019836 | ||
|
|
7a799a583e | ||
|
|
ae54c380bb | ||
|
|
738ce05a6a | ||
|
|
b4f323482c | ||
|
|
e957501bc3 | ||
|
|
f38b70aee3 | ||
|
|
62aa9ed8ce | ||
|
|
eada3203b5 | ||
|
|
e2d72e213a | ||
|
|
664f1245dd | ||
|
|
d41a74b958 | ||
|
|
d2e030b6ed | ||
|
|
1b73c818fe | ||
|
|
a2913c1b3d | ||
|
|
95f386689b | ||
|
|
6ba3c59bc6 | ||
|
|
e65822d31a | ||
|
|
866ffdf84d | ||
|
|
338a11e8c5 | ||
|
|
6a0f4e7f4d | ||
|
|
dee73a71be | ||
|
|
9b079a7363 | ||
|
|
ac593b977e | ||
|
|
5b43f91839 | ||
|
|
ece8e1f566 | ||
|
|
cfbf2ee2ea | ||
|
|
6042b819eb | ||
|
|
367c547d7d | ||
|
|
6ac1087775 | ||
|
|
2982c7c1d0 | ||
|
|
a3a62da413 | ||
|
|
958d453c5d | ||
|
|
0f09389954 | ||
|
|
dc104b5c83 | ||
|
|
97e67238ea | ||
|
|
ac72938f3a | ||
|
|
133f857c90 | ||
|
|
3e8708a684 | ||
|
|
90a4d2a19b | ||
|
|
251c03879a | ||
|
|
ae5f032774 | ||
|
|
dd6f3c9e10 | ||
|
|
84396edc7e | ||
|
|
6079b26874 | ||
|
|
b94eca1419 | ||
|
|
a14ccf053e | ||
|
|
1fd624717d | ||
|
|
dca71d6aaa | ||
|
|
441dd9f254 | ||
|
|
6e95ff3cd5 | ||
|
|
a4d7180f07 | ||
|
|
8890344e49 | ||
|
|
d3f15b49f1 | ||
|
|
8227e3155d | ||
|
|
d0e44775cd | ||
|
|
5f73da34f8 | ||
|
|
ed9a8c623c | ||
|
|
ad3a3e02a7 | ||
|
|
08509d9a42 | ||
|
|
99d1026ab8 | ||
|
|
a471e65bf2 | ||
|
|
807520bd14 | ||
|
|
68efb13b02 | ||
|
|
3351aa00b2 | ||
|
|
b4b4b40c03 | ||
|
|
bfe077bfb6 | ||
|
|
62aef87f39 | ||
|
|
a8965747f2 | ||
|
|
6a28d55cbf | ||
|
|
902daca592 | ||
|
|
b8094dc31e | ||
|
|
e2bb33a278 | ||
|
|
0cf7a23785 | ||
|
|
984ab2b4b8 | ||
|
|
99b636b6a7 | ||
|
|
22c9314c52 | ||
|
|
d96e4cfa30 | ||
|
|
f390b8d769 | ||
|
|
764c279509 | ||
|
|
bf1b284c20 | ||
|
|
c50a04d832 | ||
|
|
f8d4b5c286 | ||
|
|
31d24d6654 | ||
|
|
8fb8d46593 | ||
|
|
7b3e6ed2f5 | ||
|
|
06d1e2d093 | ||
|
|
7d0716889b | ||
|
|
be35464a0e | ||
|
|
b2e6ecea09 | ||
|
|
fea3b5eab8 | ||
|
|
e15fb07855 | ||
|
|
e712ee7e3d | ||
|
|
10de0c5e4e | ||
|
|
08fb627a3d | ||
|
|
61651ceaa9 | ||
|
|
4034cb97bc | ||
|
|
de59412f4b | ||
|
|
13809e0a15 | ||
|
|
c715985c07 | ||
|
|
32c930e9ab | ||
|
|
f1febd43b2 | ||
|
|
b9fcfc65d8 | ||
|
|
19ffb8fde5 | ||
|
|
420c851349 | ||
|
|
75a97e3f7b | ||
|
|
61af1b57e4 | ||
|
|
4703a0ce80 | ||
|
|
4054514874 | ||
|
|
b969806a43 | ||
|
|
b9e70f7821 | ||
|
|
2a5aadbf48 | ||
|
|
0f0e558289 | ||
|
|
7cdc1871c1 | ||
|
|
12633630ab | ||
|
|
0643dfe61b | ||
|
|
d66098e3dd | ||
|
|
3fa5a82cb1 | ||
|
|
58b52f3bf8 | ||
|
|
368551a133 | ||
|
|
2aafb8f8d0 | ||
|
|
9c4736bb17 | ||
|
|
71840771e9 | ||
|
|
a4cabf6b61 | ||
|
|
ce98483800 | ||
|
|
ed67b9caa4 | ||
|
|
cbfb0fda5a | ||
|
|
edd790e0a8 | ||
|
|
f1bc8b0892 | ||
|
|
bc3236f035 | ||
|
|
e92598caeb | ||
|
|
c295a8af70 | ||
|
|
ae1ce4eb54 | ||
|
|
23c0e1a9b3 | ||
|
|
57168941b2 | ||
|
|
dedb6325a8 | ||
|
|
b65bd345ef | ||
|
|
d3cd1f406f | ||
|
|
986dcdd054 | ||
|
|
c2547e29dd | ||
|
|
cebc3a1072 | ||
|
|
932dad3197 | ||
|
|
c0fcba572d | ||
|
|
5dee4bc718 | ||
|
|
66521ab1de | ||
|
|
7ce52e88c0 | ||
|
|
795015c1e8 | ||
|
|
65b4f04d50 | ||
|
|
f94d252cea | ||
|
|
3c4becd315 | ||
|
|
a5be4ddc74 | ||
|
|
e793a5d902 | ||
|
|
1e6b143073 | ||
|
|
983dfd764c | ||
|
|
bcba9b1fee | ||
|
|
39518769ff | ||
|
|
3e2fd5f6b3 | ||
|
|
bb9443782b | ||
|
|
a5eb308eb7 | ||
|
|
6e32c65ce4 | ||
|
|
d24b4c4320 | ||
|
|
68d7ab12b2 | ||
|
|
1a90f7b69c | ||
|
|
c2c004776f | ||
|
|
9f289689bb | ||
|
|
3a08ee3d66 | ||
|
|
3f90c29b0d | ||
|
|
8cfc822887 | ||
|
|
786dd821bc | ||
|
|
98989f19ee | ||
|
|
28a044aa26 | ||
|
|
a8c8155e8e | ||
|
|
fcedc1dc3f | ||
|
|
c1cc30c8d4 | ||
|
|
79704e5d8f | ||
|
|
c276f6ff7e | ||
|
|
096d3eabcd | ||
|
|
252a35e796 | ||
|
|
7f68648067 | ||
|
|
ada5b187c7 | ||
|
|
286e016e0e | ||
|
|
855a023c51 | ||
|
|
fd0e5587fa | ||
|
|
fdc57a15f6 | ||
|
|
4bf3bdf2d8 | ||
|
|
e843160dcb | ||
|
|
01870df0a9 | ||
|
|
1b8d7e81b0 | ||
|
|
77121bc77b | ||
|
|
6ae1152eea | ||
|
|
335f001567 | ||
|
|
ff59751b3c | ||
|
|
bb9c177485 | ||
|
|
68f89922d6 | ||
|
|
450406efbc | ||
|
|
bc752d6087 | ||
|
|
c4d29bf5b2 | ||
|
|
995ead5584 | ||
|
|
af3b754ee2 | ||
|
|
5c9ad7fce6 | ||
|
|
4b455d3d83 | ||
|
|
941c21b681 | ||
|
|
cfc8494f3b | ||
|
|
fe56d428c0 | ||
|
|
f10717dc73 | ||
|
|
e4decfd4bd |
@@ -150,6 +150,34 @@
|
|||||||
"contributions": [
|
"contributions": [
|
||||||
"code"
|
"code"
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "kenji-miyake",
|
||||||
|
"name": "Kenji Miyake",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/31987104?v=4",
|
||||||
|
"profile": "https://www.linkedin.com/in/kenji-miyake/",
|
||||||
|
"contributions": [
|
||||||
|
"code"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "adonisgarciac",
|
||||||
|
"name": "adonisgarciac",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/71078987?v=4",
|
||||||
|
"profile": "https://github.com/adonisgarciac",
|
||||||
|
"contributions": [
|
||||||
|
"code",
|
||||||
|
"doc"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"login": "cfernhout",
|
||||||
|
"name": "Chiel Fernhout",
|
||||||
|
"avatar_url": "https://avatars.githubusercontent.com/u/22294606?v=4",
|
||||||
|
"profile": "https://github.com/cfernhout",
|
||||||
|
"contributions": [
|
||||||
|
"doc"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"contributorsPerLine": 7,
|
"contributorsPerLine": 7,
|
||||||
|
|||||||
8
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
8
.github/ISSUE_TEMPLATE/bug_report.yaml
vendored
@@ -69,8 +69,14 @@ body:
|
|||||||
id: logs
|
id: logs
|
||||||
attributes:
|
attributes:
|
||||||
label: Relevant log output
|
label: Relevant log output
|
||||||
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
|
description: Please copy and paste any relevant log output which is obtained after enabling debug logging. This will be automatically formatted into code, so no need for backticks.
|
||||||
|
placeholder: |
|
||||||
|
1. Re-running the workflow with debug logging enabled.
|
||||||
|
2. Copy or download the log archive.
|
||||||
|
3. Paste the contents here or upload the file in a subsequent comment.
|
||||||
render: shell
|
render: shell
|
||||||
|
validations:
|
||||||
|
required: true
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Anything else?
|
label: Anything else?
|
||||||
|
|||||||
3
.github/workflows/auto-approve.yml
vendored
3
.github/workflows/auto-approve.yml
vendored
@@ -3,11 +3,12 @@ name: Auto approve
|
|||||||
on:
|
on:
|
||||||
pull_request_target
|
pull_request_target
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
auto-approve:
|
auto-approve:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: hmarr/auto-approve-action@v2
|
- uses: hmarr/auto-approve-action@v3
|
||||||
if: |
|
if: |
|
||||||
(
|
(
|
||||||
github.event.pull_request.user.login == 'dependabot[bot]' ||
|
github.event.pull_request.user.login == 'dependabot[bot]' ||
|
||||||
|
|||||||
2
.github/workflows/auto-merge.yml
vendored
2
.github/workflows/auto-merge.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
|||||||
github.actor == 'renovate'
|
github.actor == 'renovate'
|
||||||
steps:
|
steps:
|
||||||
- name: automerge
|
- name: automerge
|
||||||
uses: pascalgn/automerge-action@v0.15.5
|
uses: pascalgn/automerge-action@v0.15.6
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
|
||||||
MERGE_METHOD: "rebase"
|
MERGE_METHOD: "rebase"
|
||||||
|
|||||||
2
.github/workflows/codacy-analysis.yml
vendored
2
.github/workflows/codacy-analysis.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
|||||||
# 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.2.0
|
uses: codacy/codacy-analysis-cli-action@v4.3.0
|
||||||
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
|
||||||
|
|||||||
3
.github/workflows/manual-test.yml
vendored
3
.github/workflows/manual-test.yml
vendored
@@ -3,13 +3,14 @@ name: Manual Test
|
|||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
name: Test changed-files
|
name: Test changed-files
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
max-parallel: 4
|
max-parallel: 7
|
||||||
matrix:
|
matrix:
|
||||||
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
name: Manual Matrix Test
|
name: Matrix Test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
changed-files:
|
changed-files:
|
||||||
@@ -13,16 +16,14 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # needed for tj-actions/changed-files
|
fetch-depth: 0
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
json: true
|
json: true
|
||||||
- name: List all changed files
|
- name: List all changed files
|
||||||
run: |
|
run: echo '${{ steps.changed-files.outputs.all_changed_files }}'
|
||||||
echo '${{ steps.changed-files.outputs.all_changed_files }}'
|
|
||||||
|
|
||||||
- id: set-matrix
|
- id: set-matrix
|
||||||
run: echo "matrix={\"container\":${{ steps.changed-files.outputs.all_changed_files }}}" >> "$GITHUB_OUTPUT"
|
run: echo "matrix={\"container\":${{ steps.changed-files.outputs.all_changed_files }}}" >> "$GITHUB_OUTPUT"
|
||||||
|
|
||||||
3
.github/workflows/submodule-sync.yml
vendored
3
.github/workflows/submodule-sync.yml
vendored
@@ -19,9 +19,10 @@ jobs:
|
|||||||
git submodule update --remote --recursive
|
git submodule update --remote --recursive
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v4.2.0
|
uses: peter-evans/create-pull-request@v4.2.3
|
||||||
with:
|
with:
|
||||||
title: "Updated submodule"
|
title: "Updated submodule"
|
||||||
|
labels: "merge when passing"
|
||||||
branch: "chore/update-submodule"
|
branch: "chore/update-submodule"
|
||||||
commit-message: "Updated submodule"
|
commit-message: "Updated submodule"
|
||||||
body: "Updated submodule"
|
body: "Updated submodule"
|
||||||
|
|||||||
7
.github/workflows/sync-release-version.yml
vendored
7
.github/workflows/sync-release-version.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Run release-tagger
|
- name: Run release-tagger
|
||||||
uses: tj-actions/release-tagger@v2
|
uses: tj-actions/release-tagger@v3
|
||||||
- name: Sync release version.
|
- name: Sync release version.
|
||||||
uses: tj-actions/sync-release-version@v13
|
uses: tj-actions/sync-release-version@v13
|
||||||
id: sync-release-version
|
id: sync-release-version
|
||||||
@@ -22,13 +22,14 @@ jobs:
|
|||||||
paths: |
|
paths: |
|
||||||
README.md
|
README.md
|
||||||
- name: Generate CHANGELOG
|
- name: Generate CHANGELOG
|
||||||
uses: tj-actions/github-changelog-generator@v1.15
|
uses: tj-actions/github-changelog-generator@v1.18
|
||||||
with:
|
with:
|
||||||
output: 'HISTORY.md'
|
output: 'HISTORY.md'
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@v4.2.0
|
uses: peter-evans/create-pull-request@v4.2.3
|
||||||
with:
|
with:
|
||||||
base: "main"
|
base: "main"
|
||||||
|
labels: "merge when passing"
|
||||||
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 }}"
|
||||||
|
|||||||
336
.github/workflows/test.yml
vendored
336
.github/workflows/test.yml
vendored
@@ -3,19 +3,13 @@ name: CI
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
|
||||||
- "**"
|
- "**"
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
|
||||||
- closed
|
|
||||||
- opened
|
|
||||||
- synchronize
|
|
||||||
- reopened
|
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
pull_request_review:
|
pull_request_review:
|
||||||
types:
|
branches:
|
||||||
- submitted
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
shellcheck:
|
shellcheck:
|
||||||
@@ -26,16 +20,11 @@ jobs:
|
|||||||
- name: Checkout to branch
|
- name: Checkout to branch
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
- name: shellcheck
|
- name: shellcheck
|
||||||
uses: reviewdog/action-shellcheck@v1.15
|
uses: reviewdog/action-shellcheck@v1.17
|
||||||
|
|
||||||
test-multiple-repositories:
|
test-multiple-repositories:
|
||||||
name: Test with multiple repositories
|
name: Test with multiple repositories
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
max-parallel: 4
|
|
||||||
matrix:
|
|
||||||
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout into dir1
|
- name: Checkout into dir1
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -86,13 +75,8 @@ jobs:
|
|||||||
|
|
||||||
test-using-since-and-until:
|
test-using-since-and-until:
|
||||||
name: Test changed-files using since and until
|
name: Test changed-files using since and until
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name == 'push'
|
if: github.event_name == 'push'
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
max-parallel: 4
|
|
||||||
matrix:
|
|
||||||
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout to branch
|
- name: Checkout to branch
|
||||||
@@ -127,9 +111,9 @@ jobs:
|
|||||||
until: "2022-08-20"
|
until: "2022-08-20"
|
||||||
|
|
||||||
- name: Check output
|
- name: Check output
|
||||||
if: "!contains(steps.changed-files-until.outputs.all_changed_files, 'entrypoint.sh')"
|
if: "!contains(steps.changed-files-until.outputs.all_changed_files, 'README.md')"
|
||||||
run: |
|
run: |
|
||||||
echo "Invalid output: Expected to include (entrypoint.sh) got (${{ steps.changed-files-until.outputs.all_changed_files }})"
|
echo "Invalid output: Expected to include (README.md) got (${{ steps.changed-files-until.outputs.all_changed_files }})"
|
||||||
exit 1
|
exit 1
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
@@ -142,12 +126,7 @@ jobs:
|
|||||||
|
|
||||||
test-similar-base-and-commit-sha:
|
test-similar-base-and-commit-sha:
|
||||||
name: Test changed-files similar base and commit sha
|
name: Test changed-files similar base and commit sha
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
max-parallel: 4
|
|
||||||
matrix:
|
|
||||||
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout to branch
|
- name: Checkout to branch
|
||||||
@@ -177,12 +156,7 @@ jobs:
|
|||||||
|
|
||||||
test-unset-github-output-env:
|
test-unset-github-output-env:
|
||||||
name: Test unset GITHUB_OUTPUT env
|
name: Test unset GITHUB_OUTPUT env
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
max-parallel: 4
|
|
||||||
matrix:
|
|
||||||
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout to branch
|
- name: Checkout to branch
|
||||||
@@ -203,25 +177,27 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
|
||||||
test-single-commit-history:
|
test-limited-commit-history:
|
||||||
name: Test changed-files single commit history
|
name: Test changed-files with limited commit history
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
max-parallel: 4
|
max-parallel: 4
|
||||||
matrix:
|
matrix:
|
||||||
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
fetch-depth: [1, 2]
|
||||||
|
input-fetch_depth: [1, 50]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout to branch
|
- name: Checkout to branch
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: ${{ matrix.fetch-depth }}
|
||||||
|
|
||||||
- name: Run changed-files with a single commit history
|
- name: Run changed-files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
continue-on-error: true
|
|
||||||
uses: ./
|
uses: ./
|
||||||
|
with:
|
||||||
|
fetch_depth: ${{ matrix.input-fetch_depth }}
|
||||||
|
|
||||||
- name: Show output
|
- name: Show output
|
||||||
run: |
|
run: |
|
||||||
@@ -231,12 +207,7 @@ jobs:
|
|||||||
|
|
||||||
test-non-existent-base-sha:
|
test-non-existent-base-sha:
|
||||||
name: Test changed-files non existent base sha
|
name: Test changed-files non existent base sha
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
max-parallel: 4
|
|
||||||
matrix:
|
|
||||||
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout to branch
|
- name: Checkout to branch
|
||||||
@@ -283,12 +254,7 @@ jobs:
|
|||||||
|
|
||||||
test-non-existent-sha:
|
test-non-existent-sha:
|
||||||
name: Test changed-files non existent sha
|
name: Test changed-files non existent sha
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
max-parallel: 4
|
|
||||||
matrix:
|
|
||||||
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout to branch
|
- name: Checkout to branch
|
||||||
@@ -299,7 +265,7 @@ jobs:
|
|||||||
uses: ./
|
uses: ./
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
base_sha: "4554456"
|
sha: "4774456"
|
||||||
|
|
||||||
- name: Show output
|
- name: Show output
|
||||||
run: |
|
run: |
|
||||||
@@ -319,7 +285,7 @@ jobs:
|
|||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
with:
|
with:
|
||||||
files: action.yml
|
files: action.yml
|
||||||
base_sha: "4554456"
|
sha: "4774456"
|
||||||
|
|
||||||
- name: Show output
|
- name: Show output
|
||||||
run: |
|
run: |
|
||||||
@@ -333,6 +299,43 @@ jobs:
|
|||||||
echo "Expected: (failure) got ${{ steps.changed-files-specific.outcome }}"
|
echo "Expected: (failure) got ${{ steps.changed-files-specific.outcome }}"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
|
test-submodules:
|
||||||
|
name: Test changed-files with submodule
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
max-parallel: 4
|
||||||
|
matrix:
|
||||||
|
fetch-depth: [0, 1, 2]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout to branch
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
|
submodules: recursive
|
||||||
|
fetch-depth: ${{ matrix.fetch-depth }}
|
||||||
|
|
||||||
|
- name: Run changed-files with submodule
|
||||||
|
id: changed-files
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
base_sha: "85bd869"
|
||||||
|
sha: "adde7bb"
|
||||||
|
fetch_depth: 60000
|
||||||
|
|
||||||
|
- name: Verify added files
|
||||||
|
if: steps.changed-files.outputs.added_files != 'test/demo/test/test.txt'
|
||||||
|
run: |
|
||||||
|
echo "Expected: (test/demo/test/test.txt) got ${{ steps.changed-files.outputs.added_files }}"
|
||||||
|
exit 1
|
||||||
|
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo "${{ toJSON(steps.changed-files.outputs) }}"
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Test changed-files
|
name: Test changed-files
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
@@ -340,14 +343,15 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
max-parallel: 4
|
max-parallel: 4
|
||||||
matrix:
|
matrix:
|
||||||
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, ubuntu-18.04, windows-2022]
|
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, windows-2022]
|
||||||
|
fetch-depth: [0, 1, 2]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: ${{ matrix.fetch-depth }}
|
||||||
- name: Dump GitHub context
|
- name: Dump GitHub context
|
||||||
env:
|
env:
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
@@ -360,6 +364,38 @@ jobs:
|
|||||||
echo '${{ toJSON(steps.changed-files.outputs) }}'
|
echo '${{ toJSON(steps.changed-files.outputs) }}'
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
- name: Run changed-files with since_last_remote_commit
|
||||||
|
id: changed-files-since-last-remote-commit
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
since_last_remote_commit: true
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files-since-last-remote-commit.outputs) }}'
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
- name: Run changed-files with write_output_files
|
||||||
|
id: changed-files-write-output-files
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
json: true
|
||||||
|
write_output_files: true
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files-write-output-files.outputs.all_changed_files) }}'
|
||||||
|
cat .github/outputs/all_changed_files.json
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
- name: Run changed-files with include_all_old_new_renamed_files
|
||||||
|
id: changed-files-all-old-new-renamed-files
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
include_all_old_new_renamed_files: true
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files-all-old-new-renamed-files.outputs) }}'
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
- name: List all modified files
|
- name: List all modified files
|
||||||
run: |
|
run: |
|
||||||
for file in ${{ steps.changed-files.outputs.modified_files }}; do
|
for file in ${{ steps.changed-files.outputs.modified_files }}; do
|
||||||
@@ -394,12 +430,56 @@ jobs:
|
|||||||
echo '${{ toJSON(steps.changed-files-quotepath.outputs) }}'
|
echo '${{ toJSON(steps.changed-files-quotepath.outputs) }}'
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
- name: Run changed-files with dir_names and dir_names_max_depth
|
||||||
|
id: changed-files-dir-names-max-depth
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
base_sha: ba788ed
|
||||||
|
sha: 0a5b7c6
|
||||||
|
fetch_depth: 60000
|
||||||
|
dir_names: "true"
|
||||||
|
dir_names_max_depth: 3
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files-dir-names-max-depth.outputs) }}'
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
- name: Check dir_names output
|
||||||
|
if: "!contains(steps.changed-files-dir-names-max-depth.outputs.all_changed_files, 'test/test2/test3')"
|
||||||
|
run: |
|
||||||
|
echo "Invalid output: Expected to include (test/test2/test3) got (${{ steps.changed-files-dir-names-max-depth.outputs.all_changed_files }})"
|
||||||
|
exit 1
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
- name: Run changed-files with dir_names and dir_names_exclude_root
|
||||||
|
id: changed-files-dir-names-exclude-root
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
base_sha: dddfbd69
|
||||||
|
sha: ce8c1983
|
||||||
|
fetch_depth: 60000
|
||||||
|
dir_names: "true"
|
||||||
|
dir_names_exclude_root: "true"
|
||||||
|
dir_names_max_depth: "1"
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files-dir-names-exclude-root.outputs) }}'
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
- name: Check dir_names output
|
||||||
|
if: steps.changed-files-dir-names-exclude-root.outputs.all_changed_files != '.github'
|
||||||
|
run: |
|
||||||
|
echo "Invalid output: Expected (.github) got (${{ steps.changed-files-dir-names-exclude-root.outputs.all_changed_files }})"
|
||||||
|
exit 1
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
- 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: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
base_sha: d1c0ee4
|
base_sha: d1c0ee4
|
||||||
sha: 4d04215
|
sha: 4d04215
|
||||||
|
fetch_depth: 60000
|
||||||
dir_names: "true"
|
dir_names: "true"
|
||||||
- name: Show output
|
- name: Show output
|
||||||
run: |
|
run: |
|
||||||
@@ -407,9 +487,30 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Check dir_names output
|
- name: Check dir_names output
|
||||||
if: "!contains(steps.changed-files-dir-names.outputs.all_changed_files, 'test')"
|
if: steps.changed-files-dir-names.outputs.all_changed_files != 'test'
|
||||||
run: |
|
run: |
|
||||||
echo "Invalid output: Expected to include (test) got (${{ steps.changed-files-dir-names.outputs.all_changed_files }})"
|
echo "Invalid output: Expected (test) got (${{ steps.changed-files-dir-names.outputs.all_changed_files }})"
|
||||||
|
exit 1
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
- name: Run changed-files with dir_names specific
|
||||||
|
id: changed-files-dir-names-specific
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
base_sha: d1c0ee4
|
||||||
|
sha: 4d04215
|
||||||
|
fetch_depth: 60000
|
||||||
|
dir_names: "true"
|
||||||
|
files: test/**
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files-dir-names-specific.outputs) }}'
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
- name: Check dir_names output
|
||||||
|
if: steps.changed-files-dir-names.outputs.all_changed_files != 'test'
|
||||||
|
run: |
|
||||||
|
echo "Invalid output: Expected (test) got (${{ steps.changed-files-dir-names-specific.outputs.all_changed_files }})"
|
||||||
exit 1
|
exit 1
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
@@ -454,6 +555,18 @@ jobs:
|
|||||||
echo '${{ toJSON(steps.changed-files-json.outputs.all_changed_files) }}'
|
echo '${{ toJSON(steps.changed-files-json.outputs.all_changed_files) }}'
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
- name: Run changed-files with json raw format
|
||||||
|
id: changed-files-json-raw-format
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
json: true
|
||||||
|
json_raw_format: true
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files-json-raw-format.outputs) }}'
|
||||||
|
echo '${{ toJSON(steps.changed-files-json-raw-format.outputs.all_changed_files) }}'
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
- name: Run changed-files with comma separator
|
- name: Run changed-files with comma separator
|
||||||
id: changed-files-comma
|
id: changed-files-comma
|
||||||
uses: ./
|
uses: ./
|
||||||
@@ -491,6 +604,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
base_sha: d1c0ee4
|
base_sha: d1c0ee4
|
||||||
sha: 4d04215
|
sha: 4d04215
|
||||||
|
fetch_depth: 60000
|
||||||
include_all_old_new_renamed_files: true
|
include_all_old_new_renamed_files: true
|
||||||
- name: Show output
|
- name: Show output
|
||||||
run: |
|
run: |
|
||||||
@@ -510,6 +624,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
base_sha: 4d04215
|
base_sha: 4d04215
|
||||||
sha: fe238e6
|
sha: fe238e6
|
||||||
|
fetch_depth: 60000
|
||||||
include_all_old_new_renamed_files: true
|
include_all_old_new_renamed_files: true
|
||||||
- name: Show output
|
- name: Show output
|
||||||
run: |
|
run: |
|
||||||
@@ -770,8 +885,11 @@ jobs:
|
|||||||
(
|
(
|
||||||
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'action.yml') &&
|
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'action.yml') &&
|
||||||
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, '.github/workflows/test.yml') &&
|
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, '.github/workflows/test.yml') &&
|
||||||
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, '.github/workflows/greetings.yml') &&
|
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'test/test.txt') &&
|
||||||
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'test/test.txt')
|
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'test/test2/test.txt') &&
|
||||||
|
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, 'test/test2/test3/test4/test.txt') &&
|
||||||
|
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, '[test new].txt') &&
|
||||||
|
!contains(steps.changed-files-specific-source-file.outputs.all_changed_files, '.github/workflows/greetings.yml')
|
||||||
)
|
)
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_changed }}" != "false" ]]; then
|
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_changed }}" != "false" ]]; then
|
||||||
@@ -792,8 +910,11 @@ jobs:
|
|||||||
(
|
(
|
||||||
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'action.yml') &&
|
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'action.yml') &&
|
||||||
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, '.github/workflows/test.yml') &&
|
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, '.github/workflows/test.yml') &&
|
||||||
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, '.github/workflows/greetings.yml') &&
|
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'test/test.txt') &&
|
||||||
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'test/test.txt')
|
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'test/test2/test.txt') &&
|
||||||
|
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, 'test/test2/test3/test4/test.txt') &&
|
||||||
|
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, '[test new].txt') &&
|
||||||
|
!contains(steps.changed-files-specific-source-file.outputs.all_modified_files, '.github/workflows/greetings.yml')
|
||||||
)
|
)
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_modified }}" != "false" ]]; then
|
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_modified }}" != "false" ]]; then
|
||||||
@@ -810,7 +931,16 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Verify any_deleted from source files
|
- name: Verify any_deleted from source files
|
||||||
if: "!contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-source-file.outputs.deleted_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'test/test.txt')"
|
if: |
|
||||||
|
(
|
||||||
|
!contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'action.yml') &&
|
||||||
|
!contains(steps.changed-files-specific-source-file.outputs.deleted_files, '.github/workflows/test.yml') &&
|
||||||
|
!contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'test/test.txt') &&
|
||||||
|
!contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'test/test2/test.txt') &&
|
||||||
|
!contains(steps.changed-files-specific-source-file.outputs.deleted_files, 'test/test2/test3/test4/test.txt') &&
|
||||||
|
!contains(steps.changed-files-specific-source-file.outputs.deleted_files, '[test new].txt') &&
|
||||||
|
!contains(steps.changed-files-specific-source-file.outputs.deleted_files, '.github/workflows/greetings.yml')
|
||||||
|
)
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_deleted }}" != "false" ]]; then
|
if [[ "${{ steps.changed-files-specific-source-file.outputs.any_deleted }}" != "false" ]]; then
|
||||||
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-source-file.outputs.any_deleted }})"
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-source-file.outputs.any_deleted }})"
|
||||||
@@ -836,7 +966,15 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Verify any_changed files comma separator
|
- name: Verify any_changed files comma separator
|
||||||
if: "!contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, 'action.yml') && !contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific-comma.outputs.all_changed_files, 'test/test.txt')"
|
if: |
|
||||||
|
(
|
||||||
|
!contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, 'action.yml') &&
|
||||||
|
!contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, '.github/workflows/test.yml') &&
|
||||||
|
!contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, 'test/test.txt') &&
|
||||||
|
!contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, 'test/test2/test.txt') &&
|
||||||
|
!contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, 'test/test2/test3/test4/test.txt') &&
|
||||||
|
!contains(steps.changed-files-specific-comma-source-file.outputs.all_changed_files, '[test new].txt')
|
||||||
|
)
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ steps.changed-files-specific-comma-source-file.outputs.any_changed }}" != "false" ]]; then
|
if [[ "${{ steps.changed-files-specific-comma-source-file.outputs.any_changed }}" != "false" ]]; then
|
||||||
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma-source-file.outputs.any_changed }})"
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma-source-file.outputs.any_changed }})"
|
||||||
@@ -845,7 +983,15 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Verify any_modified files comma separator
|
- name: Verify any_modified files comma separator
|
||||||
if: "!contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, 'action.yml') && !contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific-comma.outputs.all_modified_files, 'test/test.txt')"
|
if: |
|
||||||
|
(
|
||||||
|
!contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, 'action.yml') &&
|
||||||
|
!contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, '.github/workflows/test.yml') &&
|
||||||
|
!contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, 'test/test.txt') &&
|
||||||
|
!contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, 'test/test2/test.txt') &&
|
||||||
|
!contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, 'test/test2/test3/test4/test.txt') &&
|
||||||
|
!contains(steps.changed-files-specific-comma-source-file.outputs.all_modified_files, '[test new].txt')
|
||||||
|
)
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ steps.changed-files-specific-comma-source-file.outputs.any_modified }}" != "false" ]]; then
|
if [[ "${{ steps.changed-files-specific-comma-source-file.outputs.any_modified }}" != "false" ]]; then
|
||||||
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma-source-file.outputs.any_modified }})"
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma-source-file.outputs.any_modified }})"
|
||||||
@@ -854,7 +1000,15 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Verify any_deleted files with comma separator
|
- name: Verify any_deleted files with comma separator
|
||||||
if: "!contains(steps.changed-files-specific-comma-source-file.outputs.deleted_files, 'action.yml') && !contains(steps.changed-files-specific-comma-source-file.outputs.deleted_files, '.github/workflows/test.yml') && !contains(steps.changed-files-specific-comma.outputs.deleted_files, 'test/test.txt')"
|
if: |
|
||||||
|
(
|
||||||
|
!contains(steps.changed-files-specific-comma-source-file.outputs.deleted_files, 'action.yml') &&
|
||||||
|
!contains(steps.changed-files-specific-comma-source-file.outputs.deleted_files, '.github/workflows/test.yml') &&
|
||||||
|
!contains(steps.changed-files-specific-comma-source-file.outputs.deleted_files, 'test/test.txt') &&
|
||||||
|
!contains(steps.changed-files-specific-comma-source-file.outputs.deleted_files, 'test/test2/test.txt') &&
|
||||||
|
!contains(steps.changed-files-specific-comma-source-file.outputs.deleted_files, 'test/test2/test3/test4/test.txt') &&
|
||||||
|
!contains(steps.changed-files-specific-comma-source-file.outputs.deleted_files, '[test new].txt')
|
||||||
|
)
|
||||||
run: |
|
run: |
|
||||||
if [[ "${{ steps.changed-files-specific-comma-source-file.outputs.any_deleted }}" != "false" ]]; then
|
if [[ "${{ steps.changed-files-specific-comma-source-file.outputs.any_deleted }}" != "false" ]]; then
|
||||||
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma-source-file.outputs.any_deleted }})"
|
echo "Invalid output: Expected (false) got (${{ steps.changed-files-specific-comma-source-file.outputs.any_deleted }})"
|
||||||
@@ -862,37 +1016,51 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
- name: Get branch name
|
||||||
|
id: branch-name
|
||||||
|
uses: tj-actions/branch-names@v6
|
||||||
|
if: github.event_name == 'pull_request' && matrix.fetch-depth == 0
|
||||||
|
- uses: nrwl/nx-set-shas@v3
|
||||||
|
id: last_successful_commit
|
||||||
|
if: github.event_name == 'pull_request' && github.event.action != 'closed' && matrix.fetch-depth == 0
|
||||||
|
with:
|
||||||
|
main-branch-name: ${{ steps.branch-name.outputs.base_ref_branch }}
|
||||||
|
workflow-id: 'test.yml'
|
||||||
|
- name: Run changed-files with a custom base sha
|
||||||
|
if: github.event_name == 'pull_request' && github.event.action != 'closed' && matrix.fetch-depth == 0
|
||||||
|
id: changed-files-custom-base-sha
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
base_sha: ${{ steps.last_successful_commit.outputs.base }}
|
||||||
|
- name: Show output
|
||||||
|
if: github.event_name == 'pull_request' && github.event.action != 'closed' && matrix.fetch-depth == 0
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files-custom-base-sha.outputs) }}'
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
- name: Run changed-files with custom sha
|
- name: Run changed-files with custom sha
|
||||||
id: changed-files-custom-sha
|
id: changed-files-custom-sha
|
||||||
|
if: github.event_name == 'pull_request' && github.event.action != 'closed'
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
sha: ${{ github.event.pull_request.head.sha }}
|
sha: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Show output
|
- name: Show output
|
||||||
|
if: github.event.action != 'closed'
|
||||||
run: |
|
run: |
|
||||||
echo '${{ toJSON(steps.changed-files-custom-sha.outputs) }}'
|
echo '${{ toJSON(steps.changed-files-custom-sha.outputs) }}'
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Get branch name
|
- name: Run changed-files with the pull request base sha and head sha
|
||||||
id: branch-name
|
id: changed-files-pull-request-base-sha-head-sha
|
||||||
uses: tj-actions/branch-names@v6
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
- uses: nrwl/last-successful-commit-action@v1
|
|
||||||
id: last_successful_commit
|
|
||||||
if: github.event_name == 'pull_request' && github.event.action != 'closed'
|
if: github.event_name == 'pull_request' && github.event.action != 'closed'
|
||||||
with:
|
|
||||||
branch: ${{ steps.branch-name.outputs.base_ref_branch }}
|
|
||||||
workflow_id: 'test.yml'
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Run changed-files with a custom base sha
|
|
||||||
if: github.event_name == 'pull_request' && github.event.action != 'closed'
|
|
||||||
id: changed-files-custom-base-sha
|
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
base_sha: ${{ steps.last_successful_commit.outputs.commit_hash }}
|
base_sha: ${{ github.event.pull_request.base.sha }}
|
||||||
|
sha: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Show output
|
- name: Show output
|
||||||
if: github.event_name == 'pull_request' && github.event.action != 'closed'
|
if: github.event.action != 'closed'
|
||||||
run: |
|
run: |
|
||||||
echo '${{ toJSON(steps.changed-files-custom-base-sha.outputs) }}'
|
echo '${{ toJSON(steps.changed-files-pull-request-base-sha-head-sha.outputs) }}'
|
||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
- name: Run changed-files with specific files (only-changed)
|
- name: Run changed-files with specific files (only-changed)
|
||||||
|
|||||||
14
.github/workflows/update-readme.yml
vendored
14
.github/workflows/update-readme.yml
vendored
@@ -9,15 +9,18 @@ jobs:
|
|||||||
sync-assets:
|
sync-assets:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3.1.0
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Run test
|
- name: Run auto-doc
|
||||||
|
uses: tj-actions/auto-doc@v2
|
||||||
|
|
||||||
|
- name: Run remark
|
||||||
uses: tj-actions/remark@v3
|
uses: tj-actions/remark@v3
|
||||||
|
|
||||||
- name: Verify Changed files
|
- name: Verify Changed files
|
||||||
uses: tj-actions/verify-changed-files@v12
|
uses: tj-actions/verify-changed-files@v13
|
||||||
id: verify_changed_files
|
id: verify_changed_files
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
@@ -26,14 +29,15 @@ jobs:
|
|||||||
- name: README.md changed
|
- name: README.md changed
|
||||||
if: steps.verify_changed_files.outputs.files_changed == 'true'
|
if: steps.verify_changed_files.outputs.files_changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
echo "README.md has uncommited changes"
|
echo "README.md has uncommitted changes"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
if: failure()
|
if: failure()
|
||||||
uses: peter-evans/create-pull-request@v4.2.0
|
uses: peter-evans/create-pull-request@v4
|
||||||
with:
|
with:
|
||||||
base: "main"
|
base: "main"
|
||||||
|
labels: "merge when passing"
|
||||||
title: "Updated README.md"
|
title: "Updated README.md"
|
||||||
branch: "chore/update-readme"
|
branch: "chore/update-readme"
|
||||||
commit-message: "Updated README.md"
|
commit-message: "Updated README.md"
|
||||||
|
|||||||
980
HISTORY.md
980
HISTORY.md
File diff suppressed because it is too large
Load Diff
411
README.md
411
README.md
@@ -1,30 +1,49 @@
|
|||||||
[](https://www.codacy.com/gh/tj-actions/changed-files/dashboard?utm_source=github.com\&utm_medium=referral\&utm_content=tj-actions/changed-files\&utm_campaign=Badge_Grade)
|
[](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)
|
||||||
[](https://github.com/tj-actions/changed-files/actions/workflows/test.yml) [](https://github.com/tj-actions/changed-files/actions/workflows/sync-release-version.yml) [](https://github.com/search?o=desc\&q=tj-actions+changed-files+language%3AYAML\&s=\&type=Code)
|
[](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://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)
|
[](https://www.codacy.com/gh/tj-actions/changed-files/dashboard?utm_source=github.com\&utm_medium=referral\&utm_content=tj-actions/changed-files\&utm_campaign=Badge_Grade)
|
||||||
[](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)
|
[](https://github.com/tj-actions/changed-files/actions/workflows/test.yml)
|
||||||
[](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)
|
[](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 -->
|
||||||
|
|
||||||
## changed-files
|
## changed-files
|
||||||
|
|
||||||
Retrieve all changed files and directories relative to the target branch or the last remote commit returning the **absolute path** from the project root.
|
Retrieve all changed files and directories relative to the target branch or the last remote commit returning a **relative path** from the project root.
|
||||||
|
|
||||||
|
## Table of contents
|
||||||
|
|
||||||
|
* [Features](#features)
|
||||||
|
* [Usage](#usage)
|
||||||
|
* [Useful Acronyms](#useful-acronyms)
|
||||||
|
* [Outputs](#outputs)
|
||||||
|
* [Inputs](#inputs)
|
||||||
|
* [Versioning](#versioning)
|
||||||
|
* [Examples](#examples)
|
||||||
|
* [Real world example](#real-world-example)
|
||||||
|
* [Known Limitation](#known-limitation)
|
||||||
|
* [Migration guide](#migration-guide)
|
||||||
|
* [Credits](#credits)
|
||||||
|
* [Report Bugs](#report-bugs)
|
||||||
|
* [Contributors ✨](#contributors-)
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* Fast execution (0-2 seconds on average).
|
* Fast execution (0-10 seconds on average).
|
||||||
* Easy to debug.
|
* Easy to debug.
|
||||||
* Scales to large repositories.
|
* Scales to large repositories.
|
||||||
* Git submodules support.
|
* Supports Git submodules.
|
||||||
* No extra API calls.
|
* Escaped JSON output which can be used to run matrix jobs based on changed files.
|
||||||
* Escaped JSON Output which can be used for running matrix jobs based on changed files.
|
* List changed directories.
|
||||||
* List only changed directories.
|
* Restrict the max depth of changed directories.
|
||||||
* Monorepos (Fetches only the last remote commit).
|
* Write outputs to a `.txt` or `.json` file at a specified location for further processing.
|
||||||
|
* Monorepos (Fetches a fixed number of commits).
|
||||||
* Supports all platforms (Linux, MacOS, Windows).
|
* Supports all platforms (Linux, MacOS, Windows).
|
||||||
* [GitHub-hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners) support
|
* [GitHub-hosted runners](https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners) support
|
||||||
* [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) support.
|
* [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) support.
|
||||||
@@ -36,6 +55,7 @@ Retrieve all changed files and directories relative to the target branch or the
|
|||||||
* Restrict change detection to a subset of files and directories:
|
* Restrict change detection to a subset of files and directories:
|
||||||
* Boolean output indicating that certain files have been changed.
|
* Boolean output indicating that certain files have been changed.
|
||||||
* Using [Glob pattern](https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet) matching.
|
* Using [Glob pattern](https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet) matching.
|
||||||
|
* Brace expansion.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
@@ -44,7 +64,8 @@ Retrieve all changed files and directories relative to the target branch or the
|
|||||||
> * **IMPORTANT:** For `push` events you need to include `fetch-depth: 0` **OR** `fetch-depth: 2` depending on your use case.
|
> * **IMPORTANT:** For `push` events you need to include `fetch-depth: 0` **OR** `fetch-depth: 2` depending on your use case.
|
||||||
> * For monorepos where pulling all the branch history might not be desired, you can omit `fetch-depth` for `pull_request` events.
|
> * For monorepos where pulling all the branch history might not be desired, you can omit `fetch-depth` for `pull_request` events.
|
||||||
> * For files located in a sub-directory ensure that the pattern specified contains `**/` (globstar) to match any preceding directories or explicitly pass the full path relative to the project root. See: [#314](https://github.com/tj-actions/changed-files/issues/314).
|
> * For files located in a sub-directory ensure that the pattern specified contains `**/` (globstar) to match any preceding directories or explicitly pass the full path relative to the project root. See: [#314](https://github.com/tj-actions/changed-files/issues/314).
|
||||||
> * All multiline inputs should not use double or single qoutes since the value is already a string seperated by a newline character. See [Examples](#examples) for more information.
|
> * All multiline inputs should not use double or single quotes since the value is already a string seperated by a newline character. See [Examples](#examples) for more information.
|
||||||
|
> * Ensure that `persist-credentials` is set to `true` when configuring `actions/checkout` if `fetch-depth` isn't set to `0`.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
name: CI
|
name: CI
|
||||||
@@ -56,6 +77,10 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
# -------------------------------------------------------------------------------------------------------------------------
|
||||||
|
# Event `push`: Compare the preceeding commit -> to the current commit of the main branch.
|
||||||
|
# Event `pull_request`: Compare the last commit of main -> to the current commit of a Pull Request branch.
|
||||||
|
# -------------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -69,7 +94,11 @@ jobs:
|
|||||||
# Example 1
|
# Example 1
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v32
|
uses: tj-actions/changed-files@v35
|
||||||
|
|
||||||
|
# To compare changes between the current commit and the last pushed remote commit set `since_last_remote_commit: true`. e.g
|
||||||
|
# with:
|
||||||
|
# since_last_remote_commit: true
|
||||||
|
|
||||||
- name: List all changed files
|
- name: List all changed files
|
||||||
run: |
|
run: |
|
||||||
@@ -80,16 +109,30 @@ jobs:
|
|||||||
# Example 2
|
# Example 2
|
||||||
- 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@v32
|
uses: tj-actions/changed-files@v35
|
||||||
with:
|
with:
|
||||||
files: |
|
files: docs/*.{js,html} # Alternatively using: `docs/**` or `docs`
|
||||||
docs/**
|
|
||||||
|
|
||||||
- name: Run step if any file(s) in the docs folder change
|
- name: Run step if any file(s) in the docs folder change
|
||||||
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
||||||
run: |
|
run: |
|
||||||
echo "One or more files in the docs folder has changed."
|
echo "One or more files in the docs folder has changed."
|
||||||
echo "List all the files that have changed: ${{ steps.changed-files-specific.outputs.all_changed_files }}"
|
echo "List all the files that have changed: ${{ steps.changed-files-specific.outputs.all_changed_files }}"
|
||||||
|
|
||||||
|
# Example 3
|
||||||
|
- name: Get changed js files excluding the docs folder
|
||||||
|
id: changed-files-excluded
|
||||||
|
uses: tj-actions/changed-files@v35
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
**/*.js
|
||||||
|
files_ignore: docs/** # Alternatively using: `docs`
|
||||||
|
|
||||||
|
- name: Run step if any other js file(s) change
|
||||||
|
if: steps.changed-files-excluded.outputs.any_changed == 'true'
|
||||||
|
run: |
|
||||||
|
echo "One or more js files not in the doc folder has changed."
|
||||||
|
echo "List all the files that have changed: ${{ steps.changed-files-excluded.outputs.all_changed_files }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
If you feel generous and want to show some extra appreciation:
|
If you feel generous and want to show some extra appreciation:
|
||||||
@@ -102,7 +145,7 @@ Support this project with a :star:
|
|||||||
|
|
||||||
[buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png
|
[buymeacoffee-shield]: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png
|
||||||
|
|
||||||
## Outputs
|
## Useful Acronyms
|
||||||
|
|
||||||
| Acronym | Meaning |
|
| Acronym | Meaning |
|
||||||
|:---------:|:------------:|
|
|:---------:|:------------:|
|
||||||
@@ -115,54 +158,89 @@ Support this project with a :star:
|
|||||||
| U | Unmerged |
|
| U | Unmerged |
|
||||||
| X | Unknown |
|
| X | Unknown |
|
||||||
|
|
||||||
| Output | type | example | description |
|
## Outputs
|
||||||
|:----------------------------------:|:--------:|:--------------------------------------------------------------:|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
|
||||||
| any\_changed | `string` | `true` OR `false` | Returns `true` when any <br /> of the filenames provided using <br /> the `files` input has changed. If no `files` have been specified,<br> an empty string `''` is returned. <br /> i.e. *using a combination of all added, <br />copied, modified and renamed files (ACMR)* |
|
<!-- AUTO-DOC-OUTPUT:START - Do not remove or modify this section -->
|
||||||
| only\_changed | `string` | `true` OR `false` | Returns `true` when only <br /> files provided using <br /> the `files` input has changed. If no `files` have been specified,<br> an empty string `''` is returned. <br /> i.e. *using a combination of all added, <br />copied, modified and renamed files (ACMR)* |
|
|
||||||
| other\_changed\_files | `string` | `'new.txt path/to/file.png ...'` | Returns all other changed files <br/> not listed in the files input <br /> i.e. *using a combination of all added, <br />copied, modified and renamed files (ACMR)* |
|
| OUTPUT | TYPE | DESCRIPTION |
|
||||||
| any\_modified | `string` | `true` OR `false` | Returns `true` when any <br /> of the filenames provided using <br /> the `files` input has been modified. If no `files` have been specified,<br> an empty string `''` is returned. <br /> i.e. *using a combination of all added, <br />copied, modified, renamed, and deleted files (ACMRD)* |
|
|--------------------------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| only\_modified | `string` | `true` OR `false` | Returns `true` when only <br /> files provided using <br /> the `files` input has been modified. If no `files` have been specified,<br> an empty string `''` is returned.(ACMRD) |
|
| added\_files | string | Returns only files that are Added<br>(A). |
|
||||||
| other\_modified\_files | `string` | `'new.txt path/to/file.png ...'` | Returns all other modified files <br/> not listed in the files input <br /> i.e. *a combination of all added, <br /> copied, modified, and deleted files (ACMRD)* |
|
| all\_changed\_and\_modified\_files | string | Returns all changed and modified files<br>i.e. *a combination of (ACMRDTUX)* |
|
||||||
| any\_deleted | `string` | `true` OR `false` | Returns `true` when any <br /> of the filenames provided using <br /> the `files` input has been deleted. If no `files` have been specified,<br> an empty string `''` is returned. (D) |
|
| all\_changed\_files | string | Returns all changed files i.e. *a<br> combination of all added, copied, modified<br>and renamed files (ACMR)* |
|
||||||
| only\_deleted | `string` | `true` OR `false` | Returns `true` when only <br /> files provided using <br /> the `files` input has been deleted. If no `files` have been specified,<br> an empty string `''` is returned. (D) |
|
| all\_modified\_files | string | Returns all changed files i.e. *a<br> combination of all added, copied, modified,<br>renamed and deleted files (ACMRD)*. |
|
||||||
| other\_deleted\_files | `string` | `'new.txt path/to/file.png ...'` | Returns all other deleted files <br/> not listed in the files input <br /> i.e. *a combination of all deleted files (D)* |
|
| all\_old\_new\_renamed\_files | string | Returns only files that are Renamed<br> and list their old and new<br> names. **NOTE:** This requires setting `include_all_old_new_renamed_files`<br>to `true` (R) |
|
||||||
| all\_changed\_files | `string` | `'new.txt path/to/file.png ...'` | Returns all changed files <br /> i.e. *a combination of all added, <br />copied, modified and renamed files (ACMR)* |
|
| any\_changed | string | Returns `true` when any of the<br> filenames provided using the `files` input<br> has changed. If no `files` have<br> been specified,an empty string `''` is<br> returned. i.e. *using a combination of<br> all added, copied, modified and renamed<br>files (ACMR)*. |
|
||||||
| all\_modified\_files | `string` | `'new.txt path/to/file.png ...'` | Returns all changed files <br /> i.e. *a combination of all added, <br />copied, modified, renamed and deleted files (ACMRD)* |
|
| any\_deleted | string | Returns `true` when any of the<br> filenames provided using the `files` input<br> has been deleted. If no `files`<br> have been specified,an empty string `''`<br>is returned. (D) |
|
||||||
| all\_changed\_and\_modified\_files | `string` | `'new.txt path/to/file.png ...'` | Returns all changed <br /> and modified files <br /> i.e. *a combination of (ACMRDTUX)* |
|
| any\_modified | string | Returns `true` when any of the<br> filenames provided using the `files` input<br> has been modified. If no `files`<br> have been specified,an empty string `''`<br> is returned. i.e. *using a combination<br> of all added, copied, modified, renamed,<br>and deleted files (ACMRD)*. |
|
||||||
| all\_old\_new\_renamed\_files | `string` | `'old name.txt,new name.txt old name 2.txt,new name 2.txt...'` | Returns only files that are Renamed and list their old and new names. <br> NOTE: This requires setting `include_all_old_new_renamed_files` to `true` (R) |
|
| copied\_files | string | Returns only files that are Copied<br>(C). |
|
||||||
| added\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Added (A) |
|
| deleted\_files | string | Returns only files that are Deleted<br>(D). |
|
||||||
| copied\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Copied (C) |
|
| modified\_files | string | Returns only files that are Modified<br>(M). |
|
||||||
| deleted\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Deleted (D) |
|
| only\_changed | string | Returns `true` when only files provided<br> using the `files` input has changed.<br> If no `files` have been specified,an<br> empty string `''` is returned. i.e.<br> *using a combination of all added,<br>copied, modified and renamed files (ACMR)*. |
|
||||||
| modified\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Modified (M) |
|
| only\_deleted | string | Returns `true` when only files provided<br> using the `files` input has been<br> deleted. If no `files` have been<br> specified,an empty string `''` is returned.<br>(D) |
|
||||||
| renamed\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Renamed (R) |
|
| only\_modified | string | Returns `true` when only files provided<br> using the `files` input has been<br> modified. If no `files` have been<br>specified,an empty string `''` is returned.(ACMRD). |
|
||||||
| type\_changed\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that have their file type changed (T) |
|
| other\_changed\_files | string | Returns all other changed files not<br> listed in the files input i.e.<br> *using a combination of all added,<br>copied, modified and renamed files (ACMR)*. |
|
||||||
| unmerged\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Unmerged (U) |
|
| other\_deleted\_files | string | Returns all other deleted files not<br> listed in the files input i.e.<br> *a combination of all deleted files<br>(D)* |
|
||||||
| unknown\_files | `string` | `'new.txt path/to/file.png ...'` | Returns only files that are Unknown (X) |
|
| other\_modified\_files | string | Returns all other modified files not<br> listed in the files input i.e.<br> *a combination of all added, copied,<br>modified, and deleted files (ACMRD)* |
|
||||||
|
| renamed\_files | string | Returns only files that are Renamed<br>(R). |
|
||||||
|
| type\_changed\_files | string | Returns only files that have their<br>file type changed (T). |
|
||||||
|
| unknown\_files | string | Returns only files that are Unknown<br>(X). |
|
||||||
|
| unmerged\_files | string | Returns only files that are Unmerged<br>(U). |
|
||||||
|
|
||||||
|
<!-- AUTO-DOC-OUTPUT:END -->
|
||||||
|
|
||||||
## Inputs
|
## Inputs
|
||||||
|
|
||||||
| Input | type | required | default | description |
|
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
|
||||||
|:--------------------------------------:|:----------------------:|:--------:|:-------------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
|
||||||
| separator | `string` | `false` | `' '` | Split character for output strings |
|
| INPUT | TYPE | REQUIRED | DEFAULT | DESCRIPTION |
|
||||||
| include\_all\_old\_new\_renamed\_files | `boolean` | `false` | `false` | Include `all_old_new_renamed_files` output. Note this can generate a large output See: [#501](https://github.com/tj-actions/changed-files/issues/501). |
|
|-----------------------------------|--------|----------|---------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| old\_new\_separator | `string` | `false` | `','` | Split character for old and new filename pairs |
|
| base\_sha | string | false | | Specify a different base commit SHA<br>used for comparing changes |
|
||||||
| old\_new\_files\_separator | `string` | `false` | `' '` | Split character for multiple old and new filename pairs |
|
| diff\_relative | string | false | | Exclude changes outside the current directory<br> and show path names relative to<br> it. **NOTE:** This requires you to<br> specify the top level directory via<br>the `path` input. |
|
||||||
| files | `string` OR `string[]` | `false` | | Check for changes <br> using only these <br> list of file(s) <br> (Defaults to the <br> entire repo) <br /> **NOTE:** Multiline file/directory patterns <br /> should not include qoutes. <br /> |
|
| dir\_names | string | false | `"false"` | Output unique changed directories instead of<br> filenames. **NOTE:** This returns `.` for<br> changed files located in the root<br>of the project. |
|
||||||
| files\_separator | `string` | `false` | `'\n'` | Separator used to split the<br>`files` input |
|
| dir\_names\_exclude\_root | string | false | `"false"` | Exclude the root directory represented by<br> `.` from the output when `dir_names`is<br>set to `true`. |
|
||||||
| files\_from\_source\_file | `string` | `false` | | Source file(s) <br> used to populate <br> the `files` input |
|
| dir\_names\_max\_depth | string | false | | Maximum depth of directories to output.<br> e.g `test/test1/test2` with max depth of<br>`2` returns `test/test1`. |
|
||||||
| files\_ignore | `string` | `false` | | Ignore changes to these file(s) <br /> **NOTE:** Multiline file/directory patterns <br /> should not include qoutes. <br /> |
|
| fetch\_depth | string | false | `"50"` | Depth of additional branch history fetched.<br> **NOTE**: This can be adjusted to<br>resolve errors with insufficient history. |
|
||||||
| files\_ignore\_separator | `string` | `false` | `'\n'` | Separator used to split the <br>`files-ignore` input |
|
| files | string | false | | File and directory patterns to detect<br> changes using only these list of<br> file(s) (Defaults to the entire repo)<br> **NOTE:** Multiline file/directory patterns should not<br>include quotes. |
|
||||||
| files\_ignore\_from\_source\_file | `string` | `false` | | Source file(s) <br> used to populate <br> the `files_ignore` input |
|
| files\_from\_source\_file | string | false | | Source file(s) used to populate the<br>`files` input. |
|
||||||
| sha | `string` | `true` | `${{ github.sha }}` | Specify a different <br> commit SHA <br> used for <br> comparing changes |
|
| files\_ignore | string | false | | Ignore changes to these file(s) **NOTE:**<br> Multiline file/directory patterns should not include<br>quotes. |
|
||||||
| base\_sha | `string` | `false` | | Specify a different <br> base commit SHA <br> used for <br> comparing changes |
|
| files\_ignore\_from\_source\_file | string | false | | Source file(s) used to populate the<br>`files_ignore` input |
|
||||||
| path | `string` | `false` | `'.'` | Relative path under <br> `GITHUB_WORKSPACE` <br> to the repository |
|
| files\_ignore\_separator | string | false | `"\n"` | Separator used to split the `files_ignore`<br>input |
|
||||||
| quotepath | `boolean` | `false` | `true` | Output filenames completely verbatim by setting this to `false` |
|
| files\_separator | string | false | `"\n"` | Separator used to split the `files`<br>input |
|
||||||
| diff\_relative | `boolean` | `false` | | Exclude changes outside the current directory and show pathnames relative to it. **NOTE:** This requires you to specify the top level directory via the `path` input. |
|
| include\_all\_old\_new\_renamed\_files | string | false | `"false"` | Include `all_old_new_renamed_files` output. Note this can<br>generate a large output See: [#501](https://github.com/tj-actions/changed-files/issues/501). |
|
||||||
| dir\_names | `boolean` | `false` | `false` | Output unique changed directories instead of filenames. <br> **NOTE:** This returns `.` for <br> changed files located in the root of the project. |
|
| json | string | false | `"false"` | Output list of changed files in<br> a JSON formatted string which can<br>be used for matrix jobs. |
|
||||||
| json | `boolean` | `false` | `false` | Output changed files in JSON format which can be used for [matrix jobs](https://github.com/tj-actions/changed-files/blob/main/.github/workflows/manual-matrix-test.yml). |
|
| json\_raw\_format | string | false | `"false"` | Output list of changed files in<br> [jq](https://devdocs.io/jq/) raw output format which means that the output will not be<br> surrounded by quotes and special characters<br>will not be escaped. |
|
||||||
| since | `string` | `false` | | Get changed files for commits whose timestamp is older than the given time. |
|
| match\_directories | string | false | `"true"` | Indicates whether to include match directories |
|
||||||
| until | `string` | `false` | | Get changed files for commits whose timestamp is earlier than the given time. |
|
| old\_new\_files\_separator | string | false | `" "` | Split character for old and new<br>renamed filename pairs. |
|
||||||
| target\_branch\_fetch\_depth | `string` | `false` | `20` | Limit fetching commits from the target branch to a specified number. **NOTE**: This can be adjusted to resolve errors with insufficient history. See: [#668](https://github.com/tj-actions/changed-files/issues/668). |
|
| old\_new\_separator | string | false | `","` | Split character for old and new<br>filename pairs. |
|
||||||
|
| output\_dir | string | false | `".github/outputs"` | Directory to store output files. |
|
||||||
|
| path | string | false | `"."` | Specify a relative path under `$GITHUB_WORKSPACE`<br>to locate the repository. |
|
||||||
|
| quotepath | string | false | `"true"` | Use non ascii characters to match<br> files and output the filenames completely<br>verbatim by setting this to `false` |
|
||||||
|
| separator | string | false | `" "` | Split character for output strings |
|
||||||
|
| sha | string | false | | Specify a different commit SHA used<br>for comparing changes |
|
||||||
|
| since | string | false | | Get changed files for commits whose<br> timestamp is older than the given<br>time. |
|
||||||
|
| since\_last\_remote\_commit | string | false | `"false"` | Use the last commit on the<br> remote branch as the `base_sha`. Defaults<br> to the last non merge commit<br> on the target branch for pull<br> request events and the previous remote<br> commit of the current branch for<br>push events. |
|
||||||
|
| until | string | false | | Get changed files for commits whose<br> timestamp is earlier than the given<br>time. |
|
||||||
|
| write\_output\_files | string | false | `"false"` | Write outputs to files in the<br>`.github/outputs` folder by default. |
|
||||||
|
|
||||||
|
<!-- AUTO-DOC-INPUT:END -->
|
||||||
|
|
||||||
|
## Versioning
|
||||||
|
|
||||||
|
This GitHub Action follows the principles of [Semantic Versioning](https://semver.org) for versioning releases.
|
||||||
|
|
||||||
|
In addition to the standard versioning scheme, this action also uses the `v[major.minor.patch]-sec` convention for versions that implement hardening security strategies as described in the [GitHub Actions security hardening guide](https://docs.github.com/en/actions/security-guides/security-hardening-for-github-actions#using-third-party-actions).
|
||||||
|
|
||||||
|
The format of the version string is as follows:
|
||||||
|
|
||||||
|
major: is a major release number that indicates significant changes or new features that may not be backward compatible.
|
||||||
|
minor: is a minor release number that indicates minor changes or new features that are backward compatible.
|
||||||
|
patch : is a patch release number that indicates bug fixes or other small changes that are backward compatible.
|
||||||
|
|
||||||
|
`-sec` is a suffix that indicates a security-hardened version that implements additional security measures.
|
||||||
|
|
||||||
|
For example, `v1.2.3-sec` would indicate a security-hardened version of the action with major version 1, minor version 2, and patch version 3.
|
||||||
|
|
||||||
|
Using this versioning convention helps ensure that users can easily identify and choose security-hardened versions of this action when integrating it into their workflows.
|
||||||
|
|
||||||
## Examples
|
## Examples
|
||||||
|
|
||||||
@@ -173,7 +251,7 @@ Support this project with a :star:
|
|||||||
...
|
...
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@v32
|
uses: tj-actions/changed-files@v35
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -186,7 +264,7 @@ Support this project with a :star:
|
|||||||
...
|
...
|
||||||
- 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@v32
|
uses: tj-actions/changed-files@v35
|
||||||
with:
|
with:
|
||||||
separator: ","
|
separator: ","
|
||||||
...
|
...
|
||||||
@@ -203,7 +281,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@v32
|
uses: tj-actions/changed-files@v35
|
||||||
|
|
||||||
- name: List all added files
|
- name: List all added files
|
||||||
run: |
|
run: |
|
||||||
@@ -224,7 +302,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@v32
|
uses: tj-actions/changed-files@v35
|
||||||
|
|
||||||
- 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')
|
||||||
@@ -237,6 +315,51 @@ See [outputs](#outputs) for a list of all available outputs.
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Get all changed files and write the outputs to a json file</summary>
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
...
|
||||||
|
|
||||||
|
- name: Get changed files and write the outputs to a json file
|
||||||
|
id: changed-files-write-output-files-json
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
json: true
|
||||||
|
write_output_files: true
|
||||||
|
|
||||||
|
- name: Verify the contents of the .github/added_files.json file
|
||||||
|
run: |
|
||||||
|
cat .github/added_files.json
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
See [action.yml](action.yml#L264) for a list of all available keys.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Get all changed files and write the outputs to a txt file</summary>
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
...
|
||||||
|
|
||||||
|
- name: Get changed files and write the outputs to a txt file
|
||||||
|
id: changed-files-write-output-files-txt
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
write_output_files: true
|
||||||
|
|
||||||
|
- name: Verify the contents of the .github/added_files.txt file
|
||||||
|
run: |
|
||||||
|
cat .github/added_files.txt
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
See [action.yml](action.yml#L264) for a list of all available keys.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Get all changed files using a list of files</summary>
|
<summary>Get all changed files using a list of files</summary>
|
||||||
|
|
||||||
@@ -244,7 +367,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@v32
|
uses: tj-actions/changed-files@v35
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
my-file.txt
|
my-file.txt
|
||||||
@@ -261,13 +384,13 @@ See [inputs](#inputs) for more information.
|
|||||||
</details>
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Get all changed files using a list of files and take action base on the changes</summary>
|
<summary>Get all changed files using a list of files and take action based on the changes</summary>
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
...
|
...
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files-specific
|
||||||
uses: tj-actions/changed-files@v32
|
uses: tj-actions/changed-files@v35
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
my-file.txt
|
my-file.txt
|
||||||
@@ -288,16 +411,16 @@ See [inputs](#inputs) for more information.
|
|||||||
echo "Only files listed above have changed."
|
echo "Only files listed above have changed."
|
||||||
|
|
||||||
- name: Run step if any of the listed files above is deleted
|
- name: Run step if any of the listed files above is deleted
|
||||||
if: steps.changed-files.outputs.any_deleted == 'true'
|
if: steps.changed-files-specific.outputs.any_deleted == 'true'
|
||||||
run: |
|
run: |
|
||||||
for file in ${{ steps.changed-files.outputs.deleted_files }}; do
|
for file in ${{ steps.changed-files-specific.outputs.deleted_files }}; do
|
||||||
echo "$file was deleted"
|
echo "$file was deleted"
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Run step if all listed files above have been deleted
|
- name: Run step if all listed files above have been deleted
|
||||||
if: steps.changed-files.outputs.only_deleted == 'true'
|
if: steps.changed-files-specific.outputs.only_deleted == 'true'
|
||||||
run: |
|
run: |
|
||||||
for file in ${{ steps.changed-files.outputs.deleted_files }}; do
|
for file in ${{ steps.changed-files-specific.outputs.deleted_files }}; do
|
||||||
echo "$file was deleted"
|
echo "$file was deleted"
|
||||||
done
|
done
|
||||||
...
|
...
|
||||||
@@ -314,10 +437,9 @@ 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@v32
|
uses: tj-actions/changed-files@v35
|
||||||
with:
|
with:
|
||||||
files_from_source_file: |
|
files_from_source_file: test/changed-files-list.txt
|
||||||
test/changed-files-list.txt
|
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -332,7 +454,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@v32
|
uses: tj-actions/changed-files@v35
|
||||||
with:
|
with:
|
||||||
files_from_source_file: |
|
files_from_source_file: |
|
||||||
test/changed-files-list.txt
|
test/changed-files-list.txt
|
||||||
@@ -353,7 +475,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@v32
|
uses: tj-actions/changed-files@v35
|
||||||
with:
|
with:
|
||||||
sha: ${{ github.event.pull_request.head.sha }}
|
sha: ${{ github.event.pull_request.head.sha }}
|
||||||
...
|
...
|
||||||
@@ -370,7 +492,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@v32
|
uses: tj-actions/changed-files@v35
|
||||||
with:
|
with:
|
||||||
base_sha: ${{ github.event.pull_request.base.sha }}
|
base_sha: ${{ github.event.pull_request.base.sha }}
|
||||||
...
|
...
|
||||||
@@ -380,6 +502,49 @@ See [inputs](#inputs) for more information.
|
|||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Get all changed files between the previous tag and the current tag</summary>
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
...
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- 'v*'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: Release
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Get changed files
|
||||||
|
id: changed-files
|
||||||
|
uses: tj-actions/changed-files@v35
|
||||||
|
|
||||||
|
- name: Get changed files in the .github folder
|
||||||
|
id: changed-files-specific
|
||||||
|
uses: tj-actions/changed-files@v35
|
||||||
|
with:
|
||||||
|
base_sha: ${{ steps.get-base-sha.outputs.base_sha }}
|
||||||
|
files: .github/**
|
||||||
|
|
||||||
|
- name: Run step if any file(s) in the .github folder change
|
||||||
|
if: steps.changed-files-specific.outputs.any_changed == 'true'
|
||||||
|
run: |
|
||||||
|
echo "One or more files in the .github folder has changed."
|
||||||
|
echo "List all the files that have changed: ${{ steps.changed-files-specific.outputs.all_changed_files }}"
|
||||||
|
...
|
||||||
|
```
|
||||||
|
|
||||||
|
See [inputs](#inputs) for more information.
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Get all changed files for a repository located in a different path</summary>
|
<summary>Get all changed files for a repository located in a different path</summary>
|
||||||
|
|
||||||
@@ -393,7 +558,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@v32
|
uses: tj-actions/changed-files@v35
|
||||||
with:
|
with:
|
||||||
path: dir1
|
path: dir1
|
||||||
|
|
||||||
@@ -416,7 +581,7 @@ 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@v32
|
uses: tj-actions/changed-files@v35
|
||||||
with:
|
with:
|
||||||
quotepath: "false"
|
quotepath: "false"
|
||||||
|
|
||||||
@@ -447,18 +612,17 @@ See [inputs](#inputs) for more information.
|
|||||||
id: branch-name
|
id: branch-name
|
||||||
uses: tj-actions/branch-names@v6
|
uses: tj-actions/branch-names@v6
|
||||||
|
|
||||||
- uses: nrwl/last-successful-commit-action@v1
|
- uses: nrwl/nx-set-shas@v3
|
||||||
id: last_successful_commit_push
|
id: last_successful_commit_push
|
||||||
with:
|
with:
|
||||||
branch: ${{ steps.branch-name.outputs.current_branch }} # Get the last successful commit for the current branch.
|
main-branch-name: ${{ steps.branch-name.outputs.current_branch }} # Get the last successful commit for the current branch.
|
||||||
workflow_id: 'test.yml'
|
workflow-id: 'test.yml'
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- 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@v32
|
uses: tj-actions/changed-files@v35
|
||||||
with:
|
with:
|
||||||
base_sha: ${{ steps.last_successful_commit_push.outputs.commit_hash }}
|
base_sha: ${{ steps.last_successful_commit_push.outputs.base }}
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -475,18 +639,17 @@ See [inputs](#inputs) for more information.
|
|||||||
id: branch-name
|
id: branch-name
|
||||||
uses: tj-actions/branch-names@v5
|
uses: tj-actions/branch-names@v5
|
||||||
|
|
||||||
- uses: nrwl/last-successful-commit-action@v1
|
- uses: nrwl/nx-set-shas@v3
|
||||||
id: last_successful_commit_pull_request
|
id: last_successful_commit_pull_request
|
||||||
with:
|
with:
|
||||||
branch: ${{ steps.branch-name.outputs.base_ref_branch }} # Get the last successful commit on master or main branch
|
main-branch-name: ${{ steps.branch-name.outputs.base_ref_branch }} # Get the last successful commit on master or main branch
|
||||||
workflow_id: 'test.yml'
|
workflow_id: 'test.yml'
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Run changed-files with the commit of the last successful test workflow run on main
|
- name: Run changed-files with the commit of the last successful test workflow run on main
|
||||||
id: changed-files-base-sha-pull-request
|
id: changed-files-base-sha-pull-request
|
||||||
uses: tj-actions/changed-files@v32
|
uses: tj-actions/changed-files@v35
|
||||||
with:
|
with:
|
||||||
base_sha: ${{ steps.last_successful_commit_pull_request.outputs.commit_hash }}
|
base_sha: ${{ steps.last_successful_commit_pull_request.outputs.base }}
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -508,7 +671,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@v32
|
uses: tj-actions/changed-files@v35
|
||||||
with:
|
with:
|
||||||
dir_names: "true"
|
dir_names: "true"
|
||||||
...
|
...
|
||||||
@@ -525,7 +688,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@v32
|
uses: tj-actions/changed-files@v35
|
||||||
with:
|
with:
|
||||||
json: "true"
|
json: "true"
|
||||||
...
|
...
|
||||||
@@ -542,13 +705,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@v32
|
uses: tj-actions/changed-files@v35
|
||||||
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@v32
|
uses: tj-actions/changed-files@v35
|
||||||
with:
|
with:
|
||||||
until: "2022-08-20"
|
until: "2022-08-20"
|
||||||
...
|
...
|
||||||
@@ -562,8 +725,6 @@ See [inputs](#inputs) for more information.
|
|||||||
|
|
||||||
<img width="1147" alt="Screen Shot 2021-11-19 at 4 59 21 PM" src="https://user-images.githubusercontent.com/17484350/142696936-8b7ca955-7ef9-4d53-9bdf-3e0008e90c3f.png">
|
<img width="1147" alt="Screen Shot 2021-11-19 at 4 59 21 PM" src="https://user-images.githubusercontent.com/17484350/142696936-8b7ca955-7ef9-4d53-9bdf-3e0008e90c3f.png">
|
||||||
|
|
||||||
* Free software: [MIT license](LICENSE)
|
|
||||||
|
|
||||||
## Known Limitation
|
## Known Limitation
|
||||||
|
|
||||||
> NOTE: :warning:
|
> NOTE: :warning:
|
||||||
@@ -571,14 +732,57 @@ See [inputs](#inputs) for more information.
|
|||||||
> * Using characters like `\n`, `%`, `.` and `\r` as separators would be [URL encoded](https://www.w3schools.com/tags/ref_urlencode.asp)
|
> * Using characters like `\n`, `%`, `.` and `\r` as separators would be [URL encoded](https://www.w3schools.com/tags/ref_urlencode.asp)
|
||||||
> * Spaces in file names can introduce bugs when using bash loops. See: [#216](https://github.com/tj-actions/changed-files/issues/216)
|
> * Spaces in file names can introduce bugs when using bash loops. See: [#216](https://github.com/tj-actions/changed-files/issues/216)
|
||||||
> However, this action will handle spaces in file names, with a recommendation of using a separator to prevent hidden issues.
|
> However, this action will handle spaces in file names, with a recommendation of using a separator to prevent hidden issues.
|
||||||
|
>
|
||||||
> 
|
> 
|
||||||
|
|
||||||
|
## Migration guide
|
||||||
|
|
||||||
|
With the switch from using grep's Extended regex to match files to the natively supported workflow glob pattern matching syntax introduced in [v13](https://github.com/tj-actions/changed-files/releases/tag/v13) you'll need to modify patterns used to match `files`.
|
||||||
|
|
||||||
|
**BEFORE**
|
||||||
|
|
||||||
|
```yml
|
||||||
|
...
|
||||||
|
|
||||||
|
- name: Get specific changed files
|
||||||
|
id: changed-files-specific
|
||||||
|
uses: tj-actions/changed-files@v12.2
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
\.sh$
|
||||||
|
.(sql|py)$
|
||||||
|
^(mynewfile|custom)
|
||||||
|
```
|
||||||
|
|
||||||
|
**AFTER**
|
||||||
|
|
||||||
|
```yml
|
||||||
|
...
|
||||||
|
|
||||||
|
- name: Get specific changed files
|
||||||
|
id: changed-files-specific
|
||||||
|
uses: tj-actions/changed-files@v24
|
||||||
|
with:
|
||||||
|
files: |
|
||||||
|
*.sh
|
||||||
|
*.sql
|
||||||
|
*.py
|
||||||
|
mynewfile
|
||||||
|
custom/**
|
||||||
|
```
|
||||||
|
|
||||||
|
* Free software: [MIT license](LICENSE)
|
||||||
|
|
||||||
## Credits
|
## Credits
|
||||||
|
|
||||||
This package was created with [Cookiecutter](https://github.com/cookiecutter/cookiecutter).
|
This package was created with [Cookiecutter](https://github.com/cookiecutter/cookiecutter).
|
||||||
|
|
||||||
* [tj-actions/glob](https://github.com/tj-actions/glob)
|
* [tj-actions/glob](https://github.com/tj-actions/glob)
|
||||||
|
* [tj-actions/auto-doc](https://github.com/tj-actions/auto-doc)
|
||||||
|
* [tj-actions/verify-changed-files](https://github.com/tj-actions/verify-changed-files)
|
||||||
* [tj-actions/demo](https://github.com/tj-actions/demo)
|
* [tj-actions/demo](https://github.com/tj-actions/demo)
|
||||||
|
* [tj-actions/demo2](https://github.com/tj-actions/demo2)
|
||||||
|
* [tj-actions/demo3](https://github.com/tj-actions/demo3)
|
||||||
* [tj-actions/release-tagger](https://github.com/tj-actions/release-tagger)
|
* [tj-actions/release-tagger](https://github.com/tj-actions/release-tagger)
|
||||||
|
|
||||||
## Report Bugs
|
## Report Bugs
|
||||||
@@ -588,7 +792,7 @@ Report bugs at https://github.com/tj-actions/changed-files/issues.
|
|||||||
If you are reporting a bug, please include:
|
If you are reporting a bug, please include:
|
||||||
|
|
||||||
* Your operating system name and version.
|
* Your operating system name and version.
|
||||||
* Any details about your workflow that might be helpful in troubleshooting.
|
* Any details about your workflow that might be helpful in troubleshooting. (**NOTE**: Ensure that you include full log outputs with debugging enabled)
|
||||||
* Detailed steps to reproduce the bug.
|
* Detailed steps to reproduce the bug.
|
||||||
|
|
||||||
## Contributors ✨
|
## Contributors ✨
|
||||||
@@ -624,6 +828,9 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|||||||
<tr>
|
<tr>
|
||||||
<td align="center"><a href="https://github.com/kostiantyn-korniienko-aurea"><img src="https://avatars.githubusercontent.com/u/37180625?v=4?s=100" width="100px;" alt="Kostiantyn Korniienko"/><br /><sub><b>Kostiantyn Korniienko</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=kostiantyn-korniienko-aurea" title="Documentation">📖</a></td>
|
<td align="center"><a href="https://github.com/kostiantyn-korniienko-aurea"><img src="https://avatars.githubusercontent.com/u/37180625?v=4?s=100" width="100px;" alt="Kostiantyn Korniienko"/><br /><sub><b>Kostiantyn Korniienko</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=kostiantyn-korniienko-aurea" title="Documentation">📖</a></td>
|
||||||
<td align="center"><a href="https://github.com/lpulley"><img src="https://avatars.githubusercontent.com/u/7193187?v=4?s=100" width="100px;" alt="Logan Pulley"/><br /><sub><b>Logan Pulley</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=lpulley" title="Code">💻</a></td>
|
<td align="center"><a href="https://github.com/lpulley"><img src="https://avatars.githubusercontent.com/u/7193187?v=4?s=100" width="100px;" alt="Logan Pulley"/><br /><sub><b>Logan Pulley</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=lpulley" title="Code">💻</a></td>
|
||||||
|
<td align="center"><a href="https://www.linkedin.com/in/kenji-miyake/"><img src="https://avatars.githubusercontent.com/u/31987104?v=4?s=100" width="100px;" alt="Kenji Miyake"/><br /><sub><b>Kenji Miyake</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=kenji-miyake" title="Code">💻</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/adonisgarciac"><img src="https://avatars.githubusercontent.com/u/71078987?v=4?s=100" width="100px;" alt="adonisgarciac"/><br /><sub><b>adonisgarciac</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=adonisgarciac" title="Code">💻</a> <a href="https://github.com/tj-actions/changed-files/commits?author=adonisgarciac" title="Documentation">📖</a></td>
|
||||||
|
<td align="center"><a href="https://github.com/cfernhout"><img src="https://avatars.githubusercontent.com/u/22294606?v=4?s=100" width="100px;" alt="Chiel Fernhout"/><br /><sub><b>Chiel Fernhout</b></sub></a><br /><a href="https://github.com/tj-actions/changed-files/commits?author=cfernhout" title="Documentation">📖</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|||||||
172
action.yml
172
action.yml
@@ -8,143 +8,169 @@ inputs:
|
|||||||
required: false
|
required: false
|
||||||
default: " "
|
default: " "
|
||||||
include_all_old_new_renamed_files:
|
include_all_old_new_renamed_files:
|
||||||
description: "Include all_old_new_renamed_files output. Note this can generate a large debug output See: #501."
|
description: "Include `all_old_new_renamed_files` output. Note this can generate a large output See: [#501](https://github.com/tj-actions/changed-files/issues/501)."
|
||||||
required: false
|
required: false
|
||||||
default: "false"
|
default: "false"
|
||||||
old_new_separator:
|
old_new_separator:
|
||||||
description: "Split character for old and new filename pairs"
|
description: "Split character for old and new filename pairs."
|
||||||
required: false
|
required: false
|
||||||
default: ","
|
default: ","
|
||||||
old_new_files_separator:
|
old_new_files_separator:
|
||||||
description: "Split character for multiple old and new filename pairs"
|
description: "Split character for old and new renamed filename pairs."
|
||||||
required: false
|
required: false
|
||||||
default: " "
|
default: " "
|
||||||
files_from_source_file:
|
files_from_source_file:
|
||||||
description: "Source file(s) to populate the files input"
|
description: "Source file(s) used to populate the `files` input."
|
||||||
required: false
|
required: false
|
||||||
default: ""
|
default: ""
|
||||||
files:
|
files:
|
||||||
description: "Check for changes using only this list of files (Defaults to the entire repo)"
|
description: "File and directory patterns to detect changes using only these list of file(s) (Defaults to the entire repo) **NOTE:** Multiline file/directory patterns should not include quotes."
|
||||||
required: false
|
required: false
|
||||||
default: ""
|
default: ""
|
||||||
files_separator:
|
files_separator:
|
||||||
description: "Separator used to split the files input"
|
description: "Separator used to split the `files` input"
|
||||||
default: "\n"
|
default: "\n"
|
||||||
required: false
|
required: false
|
||||||
files_ignore:
|
files_ignore:
|
||||||
description: "Ignore changes to this list of files"
|
description: "Ignore changes to these file(s) **NOTE:** Multiline file/directory patterns should not include quotes."
|
||||||
required: false
|
required: false
|
||||||
default: ""
|
default: ""
|
||||||
files_ignore_separator:
|
files_ignore_separator:
|
||||||
description: "Separator used to split the files-ignore input"
|
description: "Separator used to split the `files_ignore` input"
|
||||||
default: "\n"
|
default: "\n"
|
||||||
required: false
|
required: false
|
||||||
files_ignore_from_source_file:
|
files_ignore_from_source_file:
|
||||||
description: "Source file(s) to populate the files-ignore input"
|
description: "Source file(s) used to populate the `files_ignore` input"
|
||||||
required: false
|
required: false
|
||||||
default: ""
|
default: ""
|
||||||
sha:
|
sha:
|
||||||
description: "Specify a current commit SHA used for comparing changes"
|
description: "Specify a different commit SHA used for comparing changes"
|
||||||
required: true
|
required: false
|
||||||
default: ${{ github.sha }}
|
|
||||||
base_sha:
|
base_sha:
|
||||||
description: "Specify a base commit SHA on used for comparing changes"
|
description: "Specify a different base commit SHA used for comparing changes"
|
||||||
required: false
|
required: false
|
||||||
since:
|
since:
|
||||||
description: "Get changed files for commits whose timestamp is older than the given time"
|
description: "Get changed files for commits whose timestamp is older than the given time."
|
||||||
required: false
|
required: false
|
||||||
default: ""
|
default: ""
|
||||||
until:
|
until:
|
||||||
description: "Get changed files for commits whose timestamp is earlier than the given time"
|
description: "Get changed files for commits whose timestamp is earlier than the given time."
|
||||||
required: false
|
required: false
|
||||||
default: ""
|
default: ""
|
||||||
path:
|
path:
|
||||||
description: "Specify a relative path under $GITHUB_WORKSPACE to locate the repository"
|
description: "Specify a relative path under `$GITHUB_WORKSPACE` to locate the repository."
|
||||||
required: false
|
required: false
|
||||||
default: "."
|
default: "."
|
||||||
quotepath:
|
quotepath:
|
||||||
description: "Output filenames completely verbatim by setting this to false"
|
description: "Use non ascii characters to match files and output the filenames completely verbatim by setting this to `false`"
|
||||||
default: "true"
|
default: "true"
|
||||||
required: false
|
required: false
|
||||||
diff_relative:
|
diff_relative:
|
||||||
description: "Exclude changes outside the current directory and show pathnames relative to it"
|
description: "Exclude changes outside the current directory and show path names relative to it. **NOTE:** This requires you to specify the top level directory via the `path` input."
|
||||||
required: false
|
required: false
|
||||||
dir_names:
|
dir_names:
|
||||||
default: "false"
|
default: "false"
|
||||||
description: "Output the absolute path to the changed directories instead of the filenames"
|
description: "Output unique changed directories instead of filenames. **NOTE:** This returns `.` for changed files located in the root of the project."
|
||||||
required: false
|
required: false
|
||||||
json:
|
dir_names_max_depth:
|
||||||
description: "Output changed files in JSON format which can be used for matrix jobs"
|
description: "Maximum depth of directories to output. e.g `test/test1/test2` with max depth of `2` returns `test/test1`."
|
||||||
|
required: false
|
||||||
|
dir_names_exclude_root:
|
||||||
|
description: "Exclude the root directory represented by `.` from the output when `dir_names`is set to `true`."
|
||||||
required: false
|
required: false
|
||||||
default: "false"
|
default: "false"
|
||||||
target_branch_fetch_depth:
|
json:
|
||||||
description: "Limit fetching commits from the target branch to a specified number. **NOTE**: This can be adjusted to resolve errors with insufficient history. See: [#668](https://github.com/tj-actions/changed-files/issues/668)."
|
description: "Output list of changed files in a JSON formatted string which can be used for matrix jobs."
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
json_raw_format:
|
||||||
|
description: "Output list of changed files in [jq](https://devdocs.io/jq/) raw output format which means that the output will not be surrounded by quotes and special characters will not be escaped."
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
fetch_depth:
|
||||||
|
description: "Depth of additional branch history fetched. **NOTE**: This can be adjusted to resolve errors with insufficient history."
|
||||||
|
required: false
|
||||||
|
default: "50"
|
||||||
|
since_last_remote_commit:
|
||||||
|
description: "Use the last commit on the remote branch as the `base_sha`. Defaults to the last non merge commit on the target branch for pull request events and the previous remote commit of the current branch for push events."
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
write_output_files:
|
||||||
|
description: "Write outputs to files in the `.github/outputs` folder by default."
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
output_dir:
|
||||||
|
description: "Directory to store output files."
|
||||||
|
required: false
|
||||||
|
default: ".github/outputs"
|
||||||
|
match_directories:
|
||||||
|
description: "Indicates whether to include match directories"
|
||||||
|
default: "true"
|
||||||
required: false
|
required: false
|
||||||
default: "20"
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
added_files:
|
added_files:
|
||||||
description: List of added files.
|
description: "Returns only files that are Added (A)."
|
||||||
value: ${{ steps.changed-files.outputs.added_files }}
|
value: ${{ steps.changed-files.outputs.added_files }}
|
||||||
copied_files:
|
copied_files:
|
||||||
description: List of copied files.
|
description: "Returns only files that are Copied (C)."
|
||||||
value: ${{ steps.changed-files.outputs.copied_files }}
|
value: ${{ steps.changed-files.outputs.copied_files }}
|
||||||
deleted_files:
|
deleted_files:
|
||||||
description: List of deleted files.
|
description: "Returns only files that are Deleted (D)."
|
||||||
value: ${{ steps.changed-files.outputs.deleted_files }}
|
value: ${{ steps.changed-files.outputs.deleted_files }}
|
||||||
modified_files:
|
modified_files:
|
||||||
description: List of modified files.
|
description: "Returns only files that are Modified (M)."
|
||||||
value: ${{ steps.changed-files.outputs.modified_files }}
|
value: ${{ steps.changed-files.outputs.modified_files }}
|
||||||
renamed_files:
|
renamed_files:
|
||||||
description: List of renamed files.
|
description: "Returns only files that are Renamed (R)."
|
||||||
value: ${{ steps.changed-files.outputs.renamed_files }}
|
value: ${{ steps.changed-files.outputs.renamed_files }}
|
||||||
all_old_new_renamed_files:
|
all_old_new_renamed_files:
|
||||||
description: List of all old and new names of renamed files.
|
description: "Returns only files that are Renamed and list their old and new names. **NOTE:** This requires setting `include_all_old_new_renamed_files` to `true` (R)"
|
||||||
value: ${{ steps.changed-files.outputs.all_old_new_renamed_files }}
|
value: ${{ steps.changed-files.outputs.all_old_new_renamed_files }}
|
||||||
type_changed_files:
|
type_changed_files:
|
||||||
description: List of files that had type changes.
|
description: "Returns only files that have their file type changed (T)."
|
||||||
value: ${{ steps.changed-files.outputs.type_changed_files }}
|
value: ${{ steps.changed-files.outputs.type_changed_files }}
|
||||||
unmerged_files:
|
unmerged_files:
|
||||||
description: List of unmerged files.
|
description: "Returns only files that are Unmerged (U)."
|
||||||
value: ${{ steps.changed-files.outputs.unmerged_files }}
|
value: ${{ steps.changed-files.outputs.unmerged_files }}
|
||||||
unknown_files:
|
unknown_files:
|
||||||
description: List of unknown files.
|
description: "Returns only files that are Unknown (X)."
|
||||||
value: ${{ steps.changed-files.outputs.unknown_files }}
|
value: ${{ steps.changed-files.outputs.unknown_files }}
|
||||||
all_changed_and_modified_files:
|
all_changed_and_modified_files:
|
||||||
description: List of all changed files.
|
description: "Returns all changed and modified files i.e. *a combination of (ACMRDTUX)*"
|
||||||
value: ${{ steps.changed-files.outputs.all_changed_and_modified_files }}
|
value: ${{ steps.changed-files.outputs.all_changed_and_modified_files }}
|
||||||
all_changed_files:
|
all_changed_files:
|
||||||
description: List of all copied, modified, and added files.
|
description: "Returns all changed files i.e. *a combination of all added, copied, modified and renamed files (ACMR)*"
|
||||||
value: ${{ steps.changed-files.outputs.all_changed_files }}
|
value: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
any_changed:
|
any_changed:
|
||||||
description: Return true only when any files provided using the files input have changed.
|
description: "Returns `true` when any of the filenames provided using the `files` input has changed. If no `files` have been specified,an empty string `''` is returned. i.e. *using a combination of all added, copied, modified and renamed files (ACMR)*."
|
||||||
value: ${{ steps.changed-files.outputs.any_changed }}
|
value: ${{ steps.changed-files.outputs.any_changed }}
|
||||||
only_changed:
|
only_changed:
|
||||||
description: Return true when all files provided using the files input have changed.
|
description: "Returns `true` when only files provided using the `files` input has changed. If no `files` have been specified,an empty string `''` is returned. i.e. *using a combination of all added, copied, modified and renamed files (ACMR)*."
|
||||||
value: ${{ steps.changed-files.outputs.only_changed }}
|
value: ${{ steps.changed-files.outputs.only_changed }}
|
||||||
other_changed_files:
|
other_changed_files:
|
||||||
description: Return list of changed files not listed in the files input.
|
description: "Returns all other changed files not listed in the files input i.e. *using a combination of all added, copied, modified and renamed files (ACMR)*."
|
||||||
value: ${{ steps.changed-files.outputs.other_changed_files }}
|
value: ${{ steps.changed-files.outputs.other_changed_files }}
|
||||||
all_modified_files:
|
all_modified_files:
|
||||||
description: List of all copied, modified, added and deleted files.
|
description: "Returns all changed files i.e. *a combination of all added, copied, modified, renamed and deleted files (ACMRD)*."
|
||||||
value: ${{ steps.changed-files.outputs.all_modified_files }}
|
value: ${{ steps.changed-files.outputs.all_modified_files }}
|
||||||
any_modified:
|
any_modified:
|
||||||
description: Return true only when any files provided using the files input have been modified.
|
description: "Returns `true` when any of the filenames provided using the `files` input has been modified. If no `files` have been specified,an empty string `''` is returned. i.e. *using a combination of all added, copied, modified, renamed, and deleted files (ACMRD)*."
|
||||||
value: ${{ steps.changed-files.outputs.any_modified }}
|
value: ${{ steps.changed-files.outputs.any_modified }}
|
||||||
only_modified:
|
only_modified:
|
||||||
description: Return true when all files provided using the files input have been modified.
|
description: "Returns `true` when only files provided using the `files` input has been modified. If no `files` have been specified,an empty string `''` is returned.(ACMRD)."
|
||||||
value: ${{ steps.changed-files.outputs.only_modified }}
|
value: ${{ steps.changed-files.outputs.only_modified }}
|
||||||
other_modified_files:
|
other_modified_files:
|
||||||
description: Return list of modified files not listed in the files input.
|
description: "Returns all other modified files not listed in the files input i.e. *a combination of all added, copied, modified, and deleted files (ACMRD)*"
|
||||||
value: ${{ steps.changed-files.outputs.other_modified_files }}
|
value: ${{ steps.changed-files.outputs.other_modified_files }}
|
||||||
any_deleted:
|
any_deleted:
|
||||||
description: Return true only when any files provided using the files input have been deleted.
|
description: "Returns `true` when any of the filenames provided using the `files` input has been deleted. If no `files` have been specified,an empty string `''` is returned. (D)"
|
||||||
value: ${{ steps.changed-files.outputs.any_deleted }}
|
value: ${{ steps.changed-files.outputs.any_deleted }}
|
||||||
only_deleted:
|
only_deleted:
|
||||||
description: Return true when all files provided using the files input have been deleted.
|
description: "Returns `true` when only files provided using the `files` input has been deleted. If no `files` have been specified,an empty string `''` is returned. (D)"
|
||||||
value: ${{ steps.changed-files.outputs.only_deleted }}
|
value: ${{ steps.changed-files.outputs.only_deleted }}
|
||||||
other_deleted_files:
|
other_deleted_files:
|
||||||
description: Return list of deleted files not listed in the files input.
|
description: "Returns all other deleted files not listed in the files input i.e. *a combination of all deleted files (D)*"
|
||||||
value: ${{ steps.changed-files.outputs.other_deleted_files }}
|
value: ${{ steps.changed-files.outputs.other_deleted_files }}
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
@@ -158,12 +184,20 @@ runs:
|
|||||||
env:
|
env:
|
||||||
GITHUB_SERVER_URL: ${{ github.server_url }}
|
GITHUB_SERVER_URL: ${{ github.server_url }}
|
||||||
GITHUB_REPOSITORY: ${{ github.repository }}
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
||||||
GITHUB_BASE_REF: ${{ github.base_ref }}
|
GITHUB_REF: ${{ github.ref }}
|
||||||
GITHUB_HEAD_REF: ${{ github.head_ref }}
|
GITHUB_SHA: ${{ github.sha }}
|
||||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||||
|
GITHUB_EVENT_BASE_REF: ${{ github.event.base_ref }}
|
||||||
|
GITHUB_EVENT_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }}
|
||||||
|
GITHUB_EVENT_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
|
GITHUB_EVENT_PULL_REQUEST_BASE_REF: ${{ github.event.pull_request.base.ref }}
|
||||||
|
GITHUB_EVENT_PULL_REQUEST_HEAD_REF: ${{ github.event.pull_request.head.ref }}
|
||||||
GITHUB_EVENT_PULL_REQUEST_BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
GITHUB_EVENT_PULL_REQUEST_BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||||
|
GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
||||||
|
GITHUB_EVENT_PULL_REQUEST_COMMITS: ${{ github.event.pull_request.commits }}
|
||||||
GITHUB_EVENT_BEFORE: ${{ github.event.before }}
|
GITHUB_EVENT_BEFORE: ${{ github.event.before }}
|
||||||
GITHUB_EVENT_FORCED: ${{ github.event.forced }}
|
GITHUB_EVENT_FORCED: ${{ github.event.forced }}
|
||||||
|
GITHUB_REFNAME: ${{ github.ref_name }}
|
||||||
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
|
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
|
||||||
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
|
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
|
||||||
INPUT_SHA: ${{ inputs.sha }}
|
INPUT_SHA: ${{ inputs.sha }}
|
||||||
@@ -171,9 +205,10 @@ runs:
|
|||||||
INPUT_SINCE: ${{ inputs.since }}
|
INPUT_SINCE: ${{ inputs.since }}
|
||||||
INPUT_UNTIL: ${{ inputs.until }}
|
INPUT_UNTIL: ${{ inputs.until }}
|
||||||
INPUT_PATH: ${{ inputs.path }}
|
INPUT_PATH: ${{ inputs.path }}
|
||||||
INPUT_TARGET_BRANCH_FETCH_DEPTH: ${{ inputs.target_branch_fetch_depth }}
|
INPUT_FETCH_DEPTH: ${{ inputs.fetch_depth }}
|
||||||
|
INPUT_SINCE_LAST_REMOTE_COMMIT: ${{ inputs.since_last_remote_commit }}
|
||||||
- name: Glob match
|
- name: Glob match
|
||||||
uses: tj-actions/glob@v15
|
uses: tj-actions/glob@cebfb084cdf62d72c5318b1b3595ac5a45ed022f # renovate: tag=v16.11
|
||||||
id: glob
|
id: glob
|
||||||
with:
|
with:
|
||||||
files: ${{ inputs.files }}
|
files: ${{ inputs.files }}
|
||||||
@@ -186,6 +221,8 @@ runs:
|
|||||||
working-directory: ${{ inputs.path }}
|
working-directory: ${{ inputs.path }}
|
||||||
base-sha: ${{ steps.changed-files-diff-sha.outputs.previous_sha }}
|
base-sha: ${{ steps.changed-files-diff-sha.outputs.previous_sha }}
|
||||||
sha: ${{ steps.changed-files-diff-sha.outputs.current_sha }}
|
sha: ${{ steps.changed-files-diff-sha.outputs.current_sha }}
|
||||||
|
diff: ${{ steps.changed-files-diff-sha.outputs.diff }}
|
||||||
|
match-directories: ${{ inputs.match_directories }}
|
||||||
include-deleted-files: true
|
include-deleted-files: true
|
||||||
separator: "|"
|
separator: "|"
|
||||||
- run: |
|
- run: |
|
||||||
@@ -194,7 +231,8 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
GITHUB_WORKSPACE: ${{ github.workspace }}
|
GITHUB_WORKSPACE: ${{ github.workspace }}
|
||||||
GITHUB_BASE_REF: ${{ github.base_ref }}
|
GITHUB_EVENT_PULL_REQUEST_BASE_REF: ${{ github.event.pull_request.base.ref }}
|
||||||
|
GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }}
|
||||||
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
|
# INPUT_<VARIABLE_NAME> is not available in Composite run steps
|
||||||
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
|
# https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#example-specifying-inputs
|
||||||
INPUT_FILES_PATTERN_FILE: ${{ steps.glob.outputs.paths-output-file }}
|
INPUT_FILES_PATTERN_FILE: ${{ steps.glob.outputs.paths-output-file }}
|
||||||
@@ -204,14 +242,48 @@ runs:
|
|||||||
INPUT_CURRENT_SHA: ${{ steps.changed-files-diff-sha.outputs.current_sha }}
|
INPUT_CURRENT_SHA: ${{ steps.changed-files-diff-sha.outputs.current_sha }}
|
||||||
INPUT_TARGET_BRANCH: ${{ steps.changed-files-diff-sha.outputs.target_branch }}
|
INPUT_TARGET_BRANCH: ${{ steps.changed-files-diff-sha.outputs.target_branch }}
|
||||||
INPUT_CURRENT_BRANCH: ${{ steps.changed-files-diff-sha.outputs.current_branch }}
|
INPUT_CURRENT_BRANCH: ${{ steps.changed-files-diff-sha.outputs.current_branch }}
|
||||||
|
INPUT_DIFF: ${{ steps.changed-files-diff-sha.outputs.diff }}
|
||||||
INPUT_QUOTEPATH: ${{ inputs.quotepath }}
|
INPUT_QUOTEPATH: ${{ inputs.quotepath }}
|
||||||
INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES: ${{ inputs.include_all_old_new_renamed_files }}
|
INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES: ${{ inputs.include_all_old_new_renamed_files }}
|
||||||
INPUT_OLD_NEW_SEPARATOR: ${{ inputs.old_new_separator }}
|
INPUT_OLD_NEW_SEPARATOR: ${{ inputs.old_new_separator }}
|
||||||
INPUT_OLD_NEW_FILES_SEPARATOR: ${{ inputs.old_new_files_separator }}
|
INPUT_OLD_NEW_FILES_SEPARATOR: ${{ inputs.old_new_files_separator }}
|
||||||
INPUT_DIFF_RELATIVE: ${{ inputs.diff_relative }}
|
INPUT_DIFF_RELATIVE: ${{ inputs.diff_relative }}
|
||||||
INPUT_DIR_NAMES: ${{ inputs.dir_names }}
|
INPUT_DIR_NAMES: ${{ inputs.dir_names }}
|
||||||
|
INPUT_DIR_NAMES_MAX_DEPTH: ${{ inputs.dir_names_max_depth }}
|
||||||
|
INPUT_DIR_NAMES_EXCLUDE_ROOT: ${{ inputs.dir_names_exclude_root }}
|
||||||
INPUT_JSON: ${{ inputs.json }}
|
INPUT_JSON: ${{ inputs.json }}
|
||||||
INPUT_HAS_CUSTOM_PATTERNS: ${{ steps.glob.outputs.has-custom-patterns }}
|
INPUT_HAS_CUSTOM_PATTERNS: ${{ steps.glob.outputs.has-custom-patterns }}
|
||||||
|
INPUT_JSON_RAW_FORMAT: ${{ inputs.json_raw_format }}
|
||||||
|
- name: Generate output files
|
||||||
|
uses: tj-actions/json2file@ee0fd2ce53e57fa50da61615cd644018eaf3ab6c # renovate: tag=v1.3.0
|
||||||
|
if: inputs.write_output_files == 'true'
|
||||||
|
with:
|
||||||
|
outputs: ${{ toJSON(steps.changed-files.outputs) }}
|
||||||
|
directory: ${{ inputs.output_dir }}
|
||||||
|
skip_missing_keys: true
|
||||||
|
keys: |
|
||||||
|
added_files
|
||||||
|
copied_files
|
||||||
|
deleted_files
|
||||||
|
modified_files
|
||||||
|
renamed_files
|
||||||
|
all_old_new_renamed_files
|
||||||
|
type_changed_files
|
||||||
|
unmerged_files
|
||||||
|
unknown_files
|
||||||
|
all_changed_and_modified_files
|
||||||
|
all_changed_files
|
||||||
|
any_changed
|
||||||
|
only_changed
|
||||||
|
other_changed_files
|
||||||
|
all_modified_files
|
||||||
|
any_modified
|
||||||
|
only_modified
|
||||||
|
other_modified_files
|
||||||
|
any_deleted
|
||||||
|
only_deleted
|
||||||
|
other_deleted_files
|
||||||
|
extension: ${{ steps.changed-files.outputs.outputs_extension }}
|
||||||
|
|
||||||
branding:
|
branding:
|
||||||
icon: file-text
|
icon: file-text
|
||||||
|
|||||||
263
diff-sha.sh
263
diff-sha.sh
@@ -1,9 +1,25 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -eu
|
set -euo pipefail
|
||||||
|
|
||||||
INITIAL_COMMIT="false"
|
INITIAL_COMMIT="false"
|
||||||
GITHUB_OUTPUT=${GITHUB_OUTPUT:-""}
|
GITHUB_OUTPUT=${GITHUB_OUTPUT:-""}
|
||||||
|
EXTRA_ARGS="--no-tags --prune --recurse-submodules"
|
||||||
|
PREVIOUS_SHA=""
|
||||||
|
CURRENT_SHA=""
|
||||||
|
DIFF="..."
|
||||||
|
IS_TAG="false"
|
||||||
|
SOURCE_BRANCH=""
|
||||||
|
|
||||||
|
if [[ "$GITHUB_REF" == "refs/tags/"* ]]; then
|
||||||
|
IS_TAG="true"
|
||||||
|
EXTRA_ARGS="--prune --no-recurse-submodules"
|
||||||
|
SOURCE_BRANCH=${GITHUB_EVENT_BASE_REF#refs/heads/}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $GITHUB_EVENT_PULL_REQUEST_BASE_REF || "$GITHUB_EVENT_HEAD_REPO_FORK" == "true" ]]; then
|
||||||
|
DIFF=".."
|
||||||
|
fi
|
||||||
|
|
||||||
echo "::group::changed-files-diff-sha"
|
echo "::group::changed-files-diff-sha"
|
||||||
|
|
||||||
@@ -18,12 +34,12 @@ if [[ -n $INPUT_PATH ]]; then
|
|||||||
cd "$REPO_DIR"
|
cd "$REPO_DIR"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Verifying git version..."
|
|
||||||
|
|
||||||
function __version() {
|
function __version() {
|
||||||
echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }';
|
echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo "Verifying git version..."
|
||||||
|
|
||||||
GIT_VERSION=$(git --version | awk '{print $3}') && exit_status=$? || exit_status=$?
|
GIT_VERSION=$(git --version | awk '{print $3}') && exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
if [[ $exit_status -ne 0 ]]; then
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
@@ -32,45 +48,67 @@ if [[ $exit_status -ne 0 ]]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $(__version "$GIT_VERSION") -lt $(__version "2.18.0") ]]; then
|
if [[ $(__version "$GIT_VERSION") -lt $(__version "2.18.0") ]]; then
|
||||||
echo "::error::Invalid git version. Please upgrade git ($GIT_VERSION) to >= (2.18.0)"
|
echo "::error::Invalid git version. Please upgrade ($GIT_VERSION) to >= (2.18.0)"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "Valid git version found: ($GIT_VERSION)"
|
echo "Valid git version found: ($GIT_VERSION)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "::debug::Getting HEAD SHA..."
|
IS_SHALLOW=$(git rev-parse --is-shallow-repository) && exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
if [[ -n "$INPUT_UNTIL" ]]; then
|
|
||||||
echo "::debug::Getting HEAD SHA for '$INPUT_UNTIL'..."
|
|
||||||
CURRENT_SHA=$(git log -1 --format="%H" --date=local --until="$INPUT_UNTIL") && exit_status=$? || exit_status=$?
|
|
||||||
|
|
||||||
if [[ $exit_status -ne 0 ]]; then
|
|
||||||
echo "::error::Invalid until date: $INPUT_UNTIL"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
if [[ -z $INPUT_SHA ]]; then
|
|
||||||
CURRENT_SHA=$(git rev-list -n 1 "HEAD" 2>&1) && exit_status=$? || exit_status=$?
|
|
||||||
else
|
|
||||||
CURRENT_SHA=$INPUT_SHA; exit_status=$?
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "::debug::Verifying the current commit SHA: $CURRENT_SHA"
|
|
||||||
git rev-parse --quiet --verify "$CURRENT_SHA^{commit}" 1>/dev/null 2>&1 && exit_status=$? || exit_status=$?
|
|
||||||
|
|
||||||
if [[ $exit_status -ne 0 ]]; then
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
echo "::error::Unable to locate the current sha: $CURRENT_SHA"
|
echo "::error::Unable to determine if the repository is shallow"
|
||||||
echo "::error::You seem to be missing 'fetch-depth: 0' or 'fetch-depth: 2'. See https://github.com/tj-actions/changed-files#usage"
|
|
||||||
exit 1
|
exit 1
|
||||||
else
|
|
||||||
echo "::debug::Current SHA: $CURRENT_SHA"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $GITHUB_BASE_REF ]]; then
|
if [[ -z $GITHUB_EVENT_PULL_REQUEST_BASE_REF ]]; then
|
||||||
echo "Running on a push event..."
|
echo "Running on a push event..."
|
||||||
TARGET_BRANCH=${GITHUB_REF/refs\/heads\//} && exit_status=$? || exit_status=$?
|
TARGET_BRANCH=$GITHUB_REFNAME
|
||||||
CURRENT_BRANCH=$TARGET_BRANCH && exit_status=$? || exit_status=$?
|
CURRENT_BRANCH=$TARGET_BRANCH
|
||||||
|
|
||||||
|
if [[ "$IS_SHALLOW" == "true" ]]; then
|
||||||
|
echo "Fetching remote refs..."
|
||||||
|
if [[ "$IS_TAG" == "false" ]]; then
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH" origin +refs/heads/"$CURRENT_BRANCH":refs/remotes/origin/"$CURRENT_BRANCH" 1>/dev/null
|
||||||
|
elif [[ "$SOURCE_BRANCH" != "" ]]; then
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH" origin +refs/heads/"$SOURCE_BRANCH":refs/remotes/origin/"$SOURCE_BRANCH" 1>/dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
if git submodule status &>/dev/null; then
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
git submodule foreach git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH" || true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "::debug::Getting HEAD SHA..."
|
||||||
|
if [[ -n "$INPUT_UNTIL" ]]; then
|
||||||
|
echo "::debug::Getting HEAD SHA for '$INPUT_UNTIL'..."
|
||||||
|
CURRENT_SHA=$(git log -1 --format="%H" --date=local --until="$INPUT_UNTIL") && exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
|
echo "::error::Invalid until date: $INPUT_UNTIL"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ -z $INPUT_SHA ]]; then
|
||||||
|
CURRENT_SHA=$(git rev-list -n 1 HEAD) && exit_status=$? || exit_status=$?
|
||||||
|
else
|
||||||
|
CURRENT_SHA=$INPUT_SHA; exit_status=$?
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "::debug::Verifying the current commit SHA: $CURRENT_SHA"
|
||||||
|
git rev-parse --quiet --verify "$CURRENT_SHA^{commit}" 1>/dev/null 2>&1 && exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
|
echo "::error::Unable to locate the current sha: $CURRENT_SHA"
|
||||||
|
echo "::error::Please verify that current sha is valid, and increase the fetch_depth to a number higher than $INPUT_FETCH_DEPTH."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "::debug::Current SHA: $CURRENT_SHA"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -z $INPUT_BASE_SHA ]]; then
|
if [[ -z $INPUT_BASE_SHA ]]; then
|
||||||
if [[ -n "$INPUT_SINCE" ]]; then
|
if [[ -n "$INPUT_SINCE" ]]; then
|
||||||
@@ -81,37 +119,51 @@ if [[ -z $GITHUB_BASE_REF ]]; then
|
|||||||
echo "::error::Unable to locate a previous commit for the specified date: $INPUT_SINCE"
|
echo "::error::Unable to locate a previous commit for the specified date: $INPUT_SINCE"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
elif [[ "$IS_TAG" == "true" ]]; then
|
||||||
|
PREVIOUS_SHA=$(git rev-parse "$(git tag --sort=-v:refname | head -n 2 | tail -n 1)") && exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
|
if [[ -z "$PREVIOUS_SHA" ]]; then
|
||||||
|
echo "::error::Unable to locate a previous commit for the specified tag: $GITHUB_REF"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
git fetch --no-tags -u --progress origin --depth="$INPUT_TARGET_BRANCH_FETCH_DEPTH" "${TARGET_BRANCH}":"${TARGET_BRANCH}" && exit_status=$? || exit_status=$?
|
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "true" ]]; then
|
||||||
|
PREVIOUS_SHA=""
|
||||||
|
|
||||||
PREVIOUS_SHA=""
|
if [[ "$GITHUB_EVENT_FORCED" == "false" || -z "$GITHUB_EVENT_FORCED" ]]; then
|
||||||
|
PREVIOUS_SHA=$GITHUB_EVENT_BEFORE && exit_status=$? || exit_status=$?
|
||||||
if [[ "$GITHUB_EVENT_FORCED" == "false" ]]; then
|
else
|
||||||
PREVIOUS_SHA=$GITHUB_EVENT_BEFORE
|
PREVIOUS_SHA=$(git rev-list -n 1 "HEAD^") && exit_status=$? || exit_status=$?
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
PREVIOUS_SHA=$(git rev-list -n 1 "HEAD^") && exit_status=$? || exit_status=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "0000000000000000000000000000000000000000" ]]; then
|
if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "0000000000000000000000000000000000000000" ]]; then
|
||||||
PREVIOUS_SHA=$(git rev-parse "$(git branch -r --sort=-committerdate | head -1 | xargs)")
|
PREVIOUS_SHA=$(git rev-list -n 1 "HEAD^") && exit_status=$? || exit_status=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then
|
if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then
|
||||||
PREVIOUS_SHA=$(git rev-parse "$CURRENT_SHA^1")
|
if ! git rev-parse "$PREVIOUS_SHA^1" &>/dev/null; then
|
||||||
|
|
||||||
if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then
|
|
||||||
INITIAL_COMMIT="true"
|
INITIAL_COMMIT="true"
|
||||||
echo "::debug::Initial commit detected"
|
PREVIOUS_SHA=$(git rev-parse "$CURRENT_SHA")
|
||||||
|
echo "::warning::Initial commit detected no previous commit found."
|
||||||
|
else
|
||||||
|
PREVIOUS_SHA=$(git rev-parse "$PREVIOUS_SHA^1")
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ -z "$PREVIOUS_SHA" ]]; then
|
||||||
|
echo "::error::Unable to locate a previous commit."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ -z "$PREVIOUS_SHA" ]]; then
|
|
||||||
echo "::error::Unable to locate a previous commit"
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
PREVIOUS_SHA=$INPUT_BASE_SHA
|
PREVIOUS_SHA=$INPUT_BASE_SHA
|
||||||
TARGET_BRANCH=$(git name-rev --name-only "$PREVIOUS_SHA" 2>&1) && exit_status=$? || exit_status=$?
|
|
||||||
CURRENT_BRANCH=$TARGET_BRANCH
|
if [[ "$IS_TAG" == "true" ]]; then
|
||||||
|
TARGET_BRANCH=$(git describe --tags "$PREVIOUS_SHA")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "::debug::Target branch $TARGET_BRANCH..."
|
echo "::debug::Target branch $TARGET_BRANCH..."
|
||||||
@@ -122,24 +174,112 @@ if [[ -z $GITHUB_BASE_REF ]]; then
|
|||||||
|
|
||||||
if [[ $exit_status -ne 0 ]]; then
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
echo "::error::Unable to locate the previous sha: $PREVIOUS_SHA"
|
echo "::error::Unable to locate the previous sha: $PREVIOUS_SHA"
|
||||||
echo "::error::You seem to be missing 'fetch-depth: 0' or 'fetch-depth: 2'. See https://github.com/tj-actions/changed-files#usage"
|
echo "::error::Please verify that the previous sha commit is valid, and increase the fetch_depth to a number higher than $INPUT_FETCH_DEPTH."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Running on a pull request event..."
|
echo "Running on a pull request event..."
|
||||||
TARGET_BRANCH=$GITHUB_BASE_REF
|
TARGET_BRANCH=$GITHUB_EVENT_PULL_REQUEST_BASE_REF
|
||||||
CURRENT_BRANCH=$GITHUB_HEAD_REF
|
CURRENT_BRANCH=$GITHUB_EVENT_PULL_REQUEST_HEAD_REF
|
||||||
|
|
||||||
git fetch --no-tags -u --progress origin --depth="$INPUT_TARGET_BRANCH_FETCH_DEPTH" "${TARGET_BRANCH}":"${TARGET_BRANCH}" &&
|
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "true" ]]; then
|
||||||
exit_status=$? || exit_status=$?
|
TARGET_BRANCH=$CURRENT_BRANCH
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$IS_SHALLOW" == "true" ]]; then
|
||||||
|
echo "Fetching remote refs..."
|
||||||
|
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
if git fetch $EXTRA_ARGS -u --progress origin pull/"$GITHUB_EVENT_PULL_REQUEST_NUMBER"/head:"$CURRENT_BRANCH" 1>/dev/null; then
|
||||||
|
echo "First fetch succeeded"
|
||||||
|
else
|
||||||
|
echo "First fetch failed, falling back to second fetch"
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH" origin +refs/heads/"$CURRENT_BRANCH"*:refs/remotes/origin/"$CURRENT_BRANCH"* 1>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" != "true" ]]; then
|
||||||
|
echo "::debug::Fetching remote target branch..."
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH" origin +refs/heads/"$TARGET_BRANCH":refs/remotes/origin/"$TARGET_BRANCH" 1>/dev/null
|
||||||
|
git branch --track "$TARGET_BRANCH" origin/"$TARGET_BRANCH" 1>/dev/null || true
|
||||||
|
fi
|
||||||
|
|
||||||
|
if git submodule status &>/dev/null; then
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
git submodule foreach git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH" || true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "::debug::Getting HEAD SHA..."
|
||||||
|
if [[ -n "$INPUT_UNTIL" ]]; then
|
||||||
|
echo "::debug::Getting HEAD SHA for '$INPUT_UNTIL'..."
|
||||||
|
CURRENT_SHA=$(git log -1 --format="%H" --date=local --until="$INPUT_UNTIL") && exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
|
echo "::error::Invalid until date: $INPUT_UNTIL"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [[ -z $INPUT_SHA ]]; then
|
||||||
|
CURRENT_SHA=$(git rev-list -n 1 HEAD) && exit_status=$? || exit_status=$?
|
||||||
|
else
|
||||||
|
CURRENT_SHA=$INPUT_SHA; exit_status=$?
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "::debug::Verifying the current commit SHA: $CURRENT_SHA"
|
||||||
|
git rev-parse --quiet --verify "$CURRENT_SHA^{commit}" 1>/dev/null 2>&1 && exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
|
echo "::error::Unable to locate the current sha: $CURRENT_SHA"
|
||||||
|
echo "::error::Please verify that current sha is valid, and increase the fetch_depth to a number higher than $INPUT_FETCH_DEPTH."
|
||||||
|
exit 1
|
||||||
|
else
|
||||||
|
echo "::debug::Current SHA: $CURRENT_SHA"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -z $INPUT_BASE_SHA ]]; then
|
if [[ -z $INPUT_BASE_SHA ]]; then
|
||||||
PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA && exit_status=$? || exit_status=$?
|
if [[ "$INPUT_SINCE_LAST_REMOTE_COMMIT" == "true" ]]; then
|
||||||
|
PREVIOUS_SHA=$GITHUB_EVENT_BEFORE
|
||||||
|
|
||||||
|
if ! git rev-parse --quiet --verify "$PREVIOUS_SHA^{commit}" 1>/dev/null 2>&1; then
|
||||||
|
PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
PREVIOUS_SHA=$(git rev-parse origin/"$TARGET_BRANCH") && exit_status=$? || exit_status=$?
|
||||||
|
|
||||||
|
if [[ "$IS_SHALLOW" == "true" ]]; then
|
||||||
|
# check if the merge base is in the local history
|
||||||
|
if ! git merge-base "$PREVIOUS_SHA" "$CURRENT_SHA" 1>/dev/null 2>&1; then
|
||||||
|
echo "::debug::Merge base is not in the local history, fetching remote target branch..."
|
||||||
|
# Fetch more of the target branch history until the merge base is found
|
||||||
|
for i in {1..10}; do
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
git fetch $EXTRA_ARGS -u --progress --deepen="$INPUT_FETCH_DEPTH" origin +refs/heads/"$TARGET_BRANCH":refs/remotes/origin/"$TARGET_BRANCH" 1>/dev/null
|
||||||
|
if git merge-base "$PREVIOUS_SHA" "$CURRENT_SHA" 1>/dev/null 2>&1; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
echo "::debug::Merge base is not in the local history, fetching remote target branch again..."
|
||||||
|
echo "::debug::Attempt $i/10"
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z "$PREVIOUS_SHA" || "$PREVIOUS_SHA" == "$CURRENT_SHA" ]]; then
|
||||||
|
PREVIOUS_SHA=$GITHUB_EVENT_PULL_REQUEST_BASE_SHA && exit_status=$? || exit_status=$?
|
||||||
|
fi
|
||||||
|
|
||||||
echo "::debug::Previous SHA: $PREVIOUS_SHA"
|
echo "::debug::Previous SHA: $PREVIOUS_SHA"
|
||||||
else
|
else
|
||||||
PREVIOUS_SHA=$INPUT_BASE_SHA && exit_status=$? || exit_status=$?
|
PREVIOUS_SHA=$INPUT_BASE_SHA && exit_status=$? || exit_status=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! git diff --name-only --ignore-submodules=all "$PREVIOUS_SHA$DIFF$CURRENT_SHA" 1>/dev/null 2>&1; then
|
||||||
|
DIFF=".."
|
||||||
|
fi
|
||||||
|
|
||||||
echo "::debug::Target branch: $TARGET_BRANCH"
|
echo "::debug::Target branch: $TARGET_BRANCH"
|
||||||
echo "::debug::Current branch: $CURRENT_BRANCH"
|
echo "::debug::Current branch: $CURRENT_BRANCH"
|
||||||
|
|
||||||
@@ -148,14 +288,19 @@ else
|
|||||||
|
|
||||||
if [[ $exit_status -ne 0 ]]; then
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
echo "::error::Unable to locate the previous sha: $PREVIOUS_SHA"
|
echo "::error::Unable to locate the previous sha: $PREVIOUS_SHA"
|
||||||
echo "::error::You seem to be missing 'fetch-depth: 0' or 'fetch-depth: 2'. See https://github.com/tj-actions/changed-files#usage"
|
echo "::error::Please verify that the previous sha is valid, and increase the fetch_depth to a number higher than $INPUT_FETCH_DEPTH."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if ! git diff --name-only --ignore-submodules=all "$PREVIOUS_SHA$DIFF$CURRENT_SHA" 1>/dev/null 2>&1; then
|
||||||
|
echo "::error::Unable to determine a difference between $PREVIOUS_SHA$DIFF$CURRENT_SHA"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "$PREVIOUS_SHA" && -n "$CURRENT_SHA" && "$PREVIOUS_SHA" == "$CURRENT_SHA" && "$INITIAL_COMMIT" == "false" ]]; then
|
if [[ "$PREVIOUS_SHA" == "$CURRENT_SHA" && "$INITIAL_COMMIT" == "false" ]]; then
|
||||||
echo "::error::Similar commit hashes detected: previous sha: $PREVIOUS_SHA is equivalent to the current sha: $CURRENT_SHA"
|
echo "::error::Similar commit hashes detected: previous sha: $PREVIOUS_SHA is equivalent to the current sha: $CURRENT_SHA."
|
||||||
echo "::error::You seem to be missing 'fetch-depth: 0' or 'fetch-depth: 2'. See https://github.com/tj-actions/changed-files#usage"
|
echo "::error::Please verify that both commits are valid, and increase the fetch_depth to a number higher than $INPUT_FETCH_DEPTH."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -164,12 +309,14 @@ if [[ -z "$GITHUB_OUTPUT" ]]; then
|
|||||||
echo "::set-output name=current_branch::$CURRENT_BRANCH"
|
echo "::set-output name=current_branch::$CURRENT_BRANCH"
|
||||||
echo "::set-output name=previous_sha::$PREVIOUS_SHA"
|
echo "::set-output name=previous_sha::$PREVIOUS_SHA"
|
||||||
echo "::set-output name=current_sha::$CURRENT_SHA"
|
echo "::set-output name=current_sha::$CURRENT_SHA"
|
||||||
|
echo "::set-output name=diff::$DIFF"
|
||||||
else
|
else
|
||||||
cat <<EOF >> "$GITHUB_OUTPUT"
|
cat <<EOF >> "$GITHUB_OUTPUT"
|
||||||
target_branch=$TARGET_BRANCH
|
target_branch=$TARGET_BRANCH
|
||||||
current_branch=$CURRENT_BRANCH
|
current_branch=$CURRENT_BRANCH
|
||||||
previous_sha=$PREVIOUS_SHA
|
previous_sha=$PREVIOUS_SHA
|
||||||
current_sha=$CURRENT_SHA
|
current_sha=$CURRENT_SHA
|
||||||
|
diff=$DIFF
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -eu
|
set -euo pipefail
|
||||||
|
|
||||||
INPUT_SEPARATOR="${INPUT_SEPARATOR//'%'/'%25'}"
|
INPUT_SEPARATOR="${INPUT_SEPARATOR//'%'/'%25'}"
|
||||||
INPUT_SEPARATOR="${INPUT_SEPARATOR//'.'/'%2E'}"
|
INPUT_SEPARATOR="${INPUT_SEPARATOR//'.'/'%2E'}"
|
||||||
@@ -8,10 +8,12 @@ INPUT_SEPARATOR="${INPUT_SEPARATOR//$'\n'/'%0A'}"
|
|||||||
INPUT_SEPARATOR="${INPUT_SEPARATOR//$'\r'/'%0D'}"
|
INPUT_SEPARATOR="${INPUT_SEPARATOR//$'\r'/'%0D'}"
|
||||||
|
|
||||||
GITHUB_OUTPUT=${GITHUB_OUTPUT:-""}
|
GITHUB_OUTPUT=${GITHUB_OUTPUT:-""}
|
||||||
DIFF="..."
|
DIFF=$INPUT_DIFF
|
||||||
|
|
||||||
if [[ -z $GITHUB_BASE_REF ]]; then
|
OUTPUTS_EXTENSION="txt"
|
||||||
DIFF=".."
|
|
||||||
|
if [[ "$INPUT_JSON" == "true" ]]; then
|
||||||
|
OUTPUTS_EXTENSION="json"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $INPUT_QUOTEPATH == "false" ]]; then
|
if [[ $INPUT_QUOTEPATH == "false" ]]; then
|
||||||
@@ -24,90 +26,119 @@ if [[ -n $INPUT_DIFF_RELATIVE ]]; then
|
|||||||
git config --global diff.relative "$INPUT_DIFF_RELATIVE"
|
git config --global diff.relative "$INPUT_DIFF_RELATIVE"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
function get_diff() {
|
function get_dirname_max_depth() {
|
||||||
base="$1"
|
while IFS='' read -r line; do
|
||||||
sha="$2"
|
local dir="$line"
|
||||||
filter="$3"
|
local dirs=()
|
||||||
while IFS='' read -r sub; do
|
IFS='/' read -ra dirs <<<"$dir"
|
||||||
sub_commit_pre="$(git diff "$base$DIFF$sha" -- "$sub" | grep '^[-]Subproject commit' | awk '{print $3}')" && exit_status=$? || exit_status=$?
|
|
||||||
if [[ $exit_status -ne 0 ]]; then
|
local max_depth=${#dirs[@]}
|
||||||
echo "::error::Failed to get previous commit for submodule ($sub) between: $base$DIFF$sha"
|
local input_dir_names_max_depth="${INPUT_DIR_NAMES_MAX_DEPTH:-$max_depth}"
|
||||||
exit 1
|
|
||||||
|
if [[ -n "$input_dir_names_max_depth" && "$input_dir_names_max_depth" -lt "$max_depth" ]]; then
|
||||||
|
max_depth="$input_dir_names_max_depth"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sub_commit_cur="$(git diff "$base$DIFF$sha" -- "$sub" | grep '^[+]Subproject commit' | awk '{print $3}')" && exit_status=$? || exit_status=$?
|
local output="${dirs[0]}"
|
||||||
|
local depth="1"
|
||||||
|
|
||||||
|
while [ "$depth" -lt "$max_depth" ]; do
|
||||||
|
output="$output/${dirs[${depth}]}"
|
||||||
|
depth=$((depth + 1))
|
||||||
|
done
|
||||||
|
|
||||||
|
if [[ "$INPUT_DIR_NAMES_EXCLUDE_ROOT" == "true" && "$output" == "." ]]; then
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "$output"
|
||||||
|
done < <(uniq)
|
||||||
|
}
|
||||||
|
|
||||||
|
function json_output() {
|
||||||
|
local jq_args="-sR"
|
||||||
|
if [[ "$INPUT_JSON_RAW_FORMAT" == "true" ]]; then
|
||||||
|
jq_args="$jq_args -r"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# shellcheck disable=SC2086
|
||||||
|
jq $jq_args 'split("\n") | map(select(. != "")) | @json' | sed -r 's/^"|"$//g' | tr -s /
|
||||||
|
}
|
||||||
|
|
||||||
|
function get_diff() {
|
||||||
|
local base="$1"
|
||||||
|
local sha="$2"
|
||||||
|
local filter="$3"
|
||||||
|
|
||||||
|
while IFS='' read -r sub; do
|
||||||
|
sub_commit_pre="$(git diff "$base" "$sha" -- "$sub" | { grep '^[-]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$?
|
||||||
if [[ $exit_status -ne 0 ]]; then
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
echo "::error::Failed to get current commit for submodule ($sub) between: $base$DIFF$sha"
|
echo "::warning::Failed to get previous commit for submodule ($sub) between: $base $sha. Please ensure that submodules are initialized and up to date. See: https://github.com/actions/checkout#usage" >&2
|
||||||
exit 1
|
fi
|
||||||
|
|
||||||
|
sub_commit_cur="$(git diff "$base" "$sha" -- "$sub" | { grep '^[+]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$?
|
||||||
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
|
echo "::warning::Failed to get current commit for submodule ($sub) between: $base $sha. Please ensure that submodules are initialized and up to date. See: https://github.com/actions/checkout#usage" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$sub_commit_cur" ]; then
|
if [ -n "$sub_commit_cur" ]; then
|
||||||
(
|
(
|
||||||
cd "$sub" && (
|
cd "$sub" && (
|
||||||
# the strange magic number is a hardcoded "empty tree" commit sha
|
# the strange magic number is a hardcoded "empty tree" commit sha
|
||||||
get_diff "${sub_commit_pre:-4b825dc642cb6eb9a060e54bf8d69288fbee4904}" "${sub_commit_cur}" "$filter" | awk -v r="$sub" '{ print "" r "/" $0}'
|
git diff --diff-filter="$filter" --name-only --ignore-submodules=all "${sub_commit_pre:-4b825dc642cb6eb9a060e54bf8d69288fbee4904}" "${sub_commit_cur}" | awk -v r="$sub" '{ print "" r "/" $0}' 2>/dev/null
|
||||||
)
|
)
|
||||||
)
|
) || {
|
||||||
|
echo "::warning::Failed to get changed files for submodule ($sub) between: ${sub_commit_pre:-4b825dc642cb6eb9a060e54bf8d69288fbee4904} ${sub_commit_cur}. Please ensure that submodules are initialized and up to date. See: https://github.com/actions/checkout#usage" >&2
|
||||||
|
}
|
||||||
fi
|
fi
|
||||||
done < <(git submodule | awk '{print $2}')
|
done < <(git submodule status --recursive | grep -v "^-" | awk '{print $2}')
|
||||||
|
|
||||||
if [[ "$INPUT_DIR_NAMES" == "true" ]]; then
|
if [[ "$filter" == "D" ]]; then
|
||||||
git diff --diff-filter="$filter" --name-only --ignore-submodules=all "$base$DIFF$sha" | xargs -I {} dirname {} | uniq && exit_status=$? || exit_status=$?
|
while read -r sub; do
|
||||||
|
echo "$sub"
|
||||||
|
done < <(git submodule status --recursive | grep -e "^-" | awk '{print $2}')
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $exit_status -ne 0 ]]; then
|
git diff --diff-filter="$filter" --name-only --ignore-submodules=all "$base$DIFF$sha" && exit_status=$? || exit_status=$?
|
||||||
echo "::error::Failed to get changed directories between: $base$DIFF$sha"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
git diff --diff-filter="$filter" --name-only --ignore-submodules=all "$base$DIFF$sha" && exit_status=$? || exit_status=$?
|
|
||||||
|
|
||||||
if [[ $exit_status -ne 0 ]]; then
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
echo "::error::Failed to get changed files between: $base$DIFF$sha"
|
echo "::error::Failed to get changed files between: $base$DIFF$sha" >&2
|
||||||
exit 1
|
return 1
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_renames() {
|
function get_renames() {
|
||||||
base="$1"
|
local base="$1"
|
||||||
sha="$2"
|
local sha="$2"
|
||||||
|
|
||||||
while IFS='' read -r sub; do
|
while IFS='' read -r sub; do
|
||||||
sub_commit_pre="$(git diff "$base$DIFF$sha" -- "$sub" | grep '^[-]Subproject commit' | awk '{print $3}')" && exit_status=$? || exit_status=$?
|
sub_commit_pre="$(git diff "$base" "$sha" -- "$sub" | { grep '^[-]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$?
|
||||||
if [[ $exit_status -ne 0 ]]; then
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
echo "::error::Failed to get previous commit for submodule ($sub) between: $base$DIFF$sha"
|
echo "::warning::Failed to get previous commit for submodule ($sub) between: $base $sha. Please ensure that submodules are initialized and up to date. See: https://github.com/actions/checkout#usage" >&2
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sub_commit_cur="$(git diff "$base$DIFF$sha" -- "$sub" | grep '^[+]Subproject commit' | awk '{print $3}')" && exit_status=$? || exit_status=$?
|
sub_commit_cur="$(git diff "$base" "$sha" -- "$sub" | { grep '^[+]Subproject commit' || true; } | awk '{print $3}')" && exit_status=$? || exit_status=$?
|
||||||
if [[ $exit_status -ne 0 ]]; then
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
echo "::error::Failed to get current commit for submodule ($sub) between: $base$DIFF$sha"
|
echo "::warning::Failed to get current commit for submodule ($sub) between: $base $sha. Please ensure that submodules are initialized and up to date. See: https://github.com/actions/checkout#usage" >&2
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$sub_commit_cur" ]; then
|
if [ -n "$sub_commit_cur" ]; then
|
||||||
(
|
(
|
||||||
cd "$sub" && (
|
cd "$sub" && (
|
||||||
# the strange magic number is a hardcoded "empty tree" commit sha
|
# the strange magic number is a hardcoded "empty tree" commit sha
|
||||||
get_renames "${sub_commit_pre:-4b825dc642cb6eb9a060e54bf8d69288fbee4904}" "${sub_commit_cur}" | awk -v r="$sub" '{ print "" r "/" $0}'
|
git log --name-status --ignore-submodules=all "${sub_commit_pre:-4b825dc642cb6eb9a060e54bf8d69288fbee4904}" "${sub_commit_cur}" | { grep -E "^R" || true; } | awk -F '\t' -v d="$INPUT_OLD_NEW_SEPARATOR" '{print $2d$3}' | awk -v r="$sub" '{ print "" r "/" $0}'
|
||||||
)
|
)
|
||||||
)
|
) || {
|
||||||
|
echo "::warning::Failed to get renamed files for submodule ($sub) between: ${sub_commit_pre:-4b825dc642cb6eb9a060e54bf8d69288fbee4904} ${sub_commit_cur}. Please ensure that submodules are initialized and up to date. See: https://github.com/actions/checkout#usage" >&2
|
||||||
|
}
|
||||||
fi
|
fi
|
||||||
done < <(git submodule | awk '{print $2}')
|
done < <(git submodule | awk '{print $2}')
|
||||||
|
|
||||||
if [[ "$INPUT_DIR_NAMES" == "true" ]]; then
|
git log --name-status --ignore-submodules=all "$base" "$sha" | { grep -E "^R" || true; } | awk -F '\t' -v d="$INPUT_OLD_NEW_SEPARATOR" '{print $2d$3}' && exit_status=$? || exit_status=$?
|
||||||
git log --name-status --ignore-submodules=all "$base" "$sha" | grep -E "^R" | awk -F '\t' -v d="$INPUT_OLD_NEW_SEPARATOR" '{print $2d$3}' | xargs -I {} dirname {} | uniq && exit_status=$? || exit_status=$?
|
|
||||||
|
|
||||||
if [[ $exit_status -ne 0 ]]; then
|
if [[ $exit_status -ne 0 ]]; then
|
||||||
echo "::error::Failed to get renamed directories between: $base → $sha"
|
echo "::error::Failed to get renamed files between: $base → $sha" >&2
|
||||||
exit 1
|
return 1
|
||||||
fi
|
|
||||||
else
|
|
||||||
git log --name-status --ignore-submodules=all "$base" "$sha" | grep -E "^R" | awk -F '\t' -v d="$INPUT_OLD_NEW_SEPARATOR" '{print $2d$3}' && exit_status=$? || exit_status=$?
|
|
||||||
|
|
||||||
if [[ $exit_status -ne 0 ]]; then
|
|
||||||
echo "::error::Failed to get renamed files between: $base → $sha"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -126,52 +157,88 @@ fi
|
|||||||
|
|
||||||
echo "Retrieving changes between $INPUT_PREVIOUS_SHA ($INPUT_TARGET_BRANCH) → $INPUT_CURRENT_SHA ($INPUT_CURRENT_BRANCH)"
|
echo "Retrieving changes between $INPUT_PREVIOUS_SHA ($INPUT_TARGET_BRANCH) → $INPUT_CURRENT_SHA ($INPUT_CURRENT_BRANCH)"
|
||||||
|
|
||||||
if [[ "$INPUT_HAS_CUSTOM_PATTERNS" == "false" ]]; then
|
if [[ "$INPUT_HAS_CUSTOM_PATTERNS" == "false" || -z "$INPUT_FILES_PATTERN_FILE" ]]; then
|
||||||
if [[ "$INPUT_JSON" == "false" ]]; then
|
if [[ "$INPUT_JSON" == "false" ]]; then
|
||||||
ADDED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" A | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
if [[ "$INPUT_DIR_NAMES" == "true" ]]; then
|
||||||
COPIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" C | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ADDED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" A | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
DELETED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" D | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
COPIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" C | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" M | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
DELETED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" D | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
RENAMED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" R | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" M | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
TYPE_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" T | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
RENAMED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" R | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
UNMERGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" U | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
TYPE_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" T | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
UNKNOWN=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" X | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
UNMERGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" U | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_CHANGED_AND_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "*ACDMRTUX" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
UNKNOWN=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" X | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMR" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_CHANGED_AND_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "*ACDMRTUX" | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMRD" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMR" | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
ALL_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMRD" | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
else
|
||||||
|
ADDED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" A | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
COPIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" C | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
DELETED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" D | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" M | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
RENAMED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" R | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
TYPE_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" T | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
UNMERGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" U | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
UNKNOWN=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" X | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
ALL_CHANGED_AND_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "*ACDMRTUX" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
ALL_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMR" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
ALL_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMRD" | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
fi
|
||||||
if [[ $INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES == "true" ]]; then
|
if [[ $INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES == "true" ]]; then
|
||||||
ALL_OLD_NEW_RENAMED=$(get_renames "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" | awk -v d="$INPUT_OLD_NEW_FILES_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
if [[ "$INPUT_DIR_NAMES" == "true" ]]; then
|
||||||
|
ALL_OLD_NEW_RENAMED=$(get_renames "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_OLD_NEW_FILES_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
else
|
||||||
|
ALL_OLD_NEW_RENAMED=$(get_renames "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" | awk -v d="$INPUT_OLD_NEW_FILES_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
ADDED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" A | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
if [[ "$INPUT_DIR_NAMES" == "true" ]]; then
|
||||||
COPIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" C | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
ADDED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" A | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
DELETED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" D | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
COPIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" C | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" M | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
DELETED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" D | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
RENAMED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" R | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" M | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
TYPE_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" T | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
RENAMED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" R | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
UNMERGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" U | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
TYPE_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" T | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
UNKNOWN=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" X | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
UNMERGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" U | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
ALL_CHANGED_AND_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "*ACDMRTUX" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
UNKNOWN=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" X | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
ALL_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMR" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
ALL_CHANGED_AND_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "*ACDMRTUX" | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
ALL_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMRD" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
ALL_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMR" | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
|
ALL_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMRD" | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
|
else
|
||||||
|
ADDED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" A | json_output)
|
||||||
|
COPIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" C | json_output)
|
||||||
|
DELETED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" D | json_output)
|
||||||
|
MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" M | json_output)
|
||||||
|
RENAMED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" R | json_output)
|
||||||
|
TYPE_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" T | json_output)
|
||||||
|
UNMERGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" U | json_output)
|
||||||
|
UNKNOWN=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" X | json_output)
|
||||||
|
ALL_CHANGED_AND_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "*ACDMRTUX" | json_output)
|
||||||
|
ALL_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMR" | json_output)
|
||||||
|
ALL_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMRD" | json_output)
|
||||||
|
fi
|
||||||
if [[ $INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES == "true" ]]; then
|
if [[ $INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES == "true" ]]; then
|
||||||
ALL_OLD_NEW_RENAMED=$(get_renames "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}'| jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
if [[ "$INPUT_DIR_NAMES" == "true" ]]; then
|
||||||
|
ALL_OLD_NEW_RENAMED=$(get_renames "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
|
else
|
||||||
|
ALL_OLD_NEW_RENAMED=$(get_renames "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" | json_output)
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
ADDED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" A | grep -x -E -f "$INPUT_FILES_PATTERN_FILE" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
ADDED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" A | { grep -x -E -f "$INPUT_FILES_PATTERN_FILE" || true; } | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
COPIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" C | grep -x -E -f "$INPUT_FILES_PATTERN_FILE" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
COPIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" C | { grep -x -E -f "$INPUT_FILES_PATTERN_FILE" || true; } | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
DELETED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" D | grep -x -E -f "$INPUT_FILES_PATTERN_FILE" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
DELETED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" D | { grep -x -E -f "$INPUT_FILES_PATTERN_FILE" || true; } | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" M | grep -x -E -f "$INPUT_FILES_PATTERN_FILE" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" M | { grep -x -E -f "$INPUT_FILES_PATTERN_FILE" || true; } | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
RENAMED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" R | grep -x -E -f "$INPUT_FILES_PATTERN_FILE" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
RENAMED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" R | { grep -x -E -f "$INPUT_FILES_PATTERN_FILE" || true; } | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
TYPE_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" T | grep -x -E -f "$INPUT_FILES_PATTERN_FILE" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
TYPE_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" T | { grep -x -E -f "$INPUT_FILES_PATTERN_FILE" || true; } | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
UNMERGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" U | grep -x -E -f "$INPUT_FILES_PATTERN_FILE" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
UNMERGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" U | { grep -x -E -f "$INPUT_FILES_PATTERN_FILE" || true; } | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
UNKNOWN=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" X | grep -x -E -f "$INPUT_FILES_PATTERN_FILE" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
UNKNOWN=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" X | { grep -x -E -f "$INPUT_FILES_PATTERN_FILE" || true; } | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_CHANGED_AND_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "*ACDMRTUX" | grep -x -E -f "$INPUT_FILES_PATTERN_FILE" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_CHANGED_AND_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "*ACDMRTUX" | { grep -x -E -f "$INPUT_FILES_PATTERN_FILE" || true; } | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMR" | grep -x -E -f "$INPUT_FILES_PATTERN_FILE" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMR" | { grep -x -E -f "$INPUT_FILES_PATTERN_FILE" || true; } | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMRD" | grep -x -E -f "$INPUT_FILES_PATTERN_FILE" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_MODIFIED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMRD" | { grep -x -E -f "$INPUT_FILES_PATTERN_FILE" || true; } | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
if [[ $INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES == "true" ]]; then
|
if [[ $INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES == "true" ]]; then
|
||||||
ALL_OLD_NEW_RENAMED=$(get_renames "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" | grep -w -E -f "$INPUT_FILES_PATTERN_FILE" | awk -v d="$INPUT_OLD_NEW_FILES_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_OLD_NEW_RENAMED=$(get_renames "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" | { grep -w -E -f "$INPUT_FILES_PATTERN_FILE" || true; } | awk -v d="$INPUT_OLD_NEW_FILES_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ALL_OTHER_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMR" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_OTHER_CHANGED=$(get_diff "$INPUT_PREVIOUS_SHA" "$INPUT_CURRENT_SHA" "ACMR" | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
@@ -181,13 +248,13 @@ else
|
|||||||
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
echo "::set-output name=any_changed::true"
|
echo "::set-output name=any_changed::true"
|
||||||
else
|
else
|
||||||
echo "any_changed=true" >> "$GITHUB_OUTPUT"
|
echo "any_changed=true" >>"$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
echo "::set-output name=any_changed::false"
|
echo "::set-output name=any_changed::false"
|
||||||
else
|
else
|
||||||
echo "any_changed=false" >> "$GITHUB_OUTPUT"
|
echo "any_changed=false" >>"$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -195,16 +262,24 @@ else
|
|||||||
|
|
||||||
if [[ -n $ALL_OTHER_CHANGED ]]; then
|
if [[ -n $ALL_OTHER_CHANGED ]]; then
|
||||||
if [[ -n "$ALL_CHANGED" ]]; then
|
if [[ -n "$ALL_CHANGED" ]]; then
|
||||||
OTHER_CHANGED=$(echo "${ALL_OTHER_CHANGED}|${ALL_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | sort | uniq -u | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
OTHER_CHANGED=$(echo "${ALL_OTHER_CHANGED}|${ALL_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | sort | uniq -u | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
else
|
else
|
||||||
OTHER_CHANGED=$ALL_OTHER_CHANGED
|
OTHER_CHANGED=$ALL_OTHER_CHANGED
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$INPUT_JSON" == "false" ]]; then
|
if [[ "$INPUT_JSON" == "false" ]]; then
|
||||||
OTHER_CHANGED=$(echo "${OTHER_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
if [[ "$INPUT_DIR_NAMES" == "true" ]]; then
|
||||||
|
OTHER_CHANGED=$(echo "${OTHER_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
else
|
||||||
|
OTHER_CHANGED=$(echo "${OTHER_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
OTHER_CHANGED=$(echo "${OTHER_CHANGED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
if [[ "$INPUT_DIR_NAMES" == "true" ]]; then
|
||||||
|
OTHER_CHANGED=$(echo "${OTHER_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
|
else
|
||||||
|
OTHER_CHANGED=$(echo "${OTHER_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | json_output)
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${OTHER_CHANGED}" && "${OTHER_CHANGED}" != "[]" ]]; then
|
if [[ -n "${OTHER_CHANGED}" && "${OTHER_CHANGED}" != "[]" ]]; then
|
||||||
@@ -214,15 +289,15 @@ else
|
|||||||
echo "::set-output name=only_changed::false"
|
echo "::set-output name=only_changed::false"
|
||||||
echo "::set-output name=other_changed_files::$OTHER_CHANGED"
|
echo "::set-output name=other_changed_files::$OTHER_CHANGED"
|
||||||
else
|
else
|
||||||
echo "only_changed=false" >> "$GITHUB_OUTPUT"
|
echo "only_changed=false" >>"$GITHUB_OUTPUT"
|
||||||
echo "other_changed_files=$OTHER_CHANGED" >> "$GITHUB_OUTPUT"
|
echo "other_changed_files=$OTHER_CHANGED" >>"$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
elif [[ -n "${ALL_CHANGED}" ]]; then
|
elif [[ -n "${ALL_CHANGED}" ]]; then
|
||||||
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
echo "::set-output name=only_changed::true"
|
echo "::set-output name=only_changed::true"
|
||||||
else
|
else
|
||||||
echo "only_changed=true" >> "$GITHUB_OUTPUT"
|
echo "only_changed=true" >>"$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -233,13 +308,13 @@ else
|
|||||||
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
echo "::set-output name=any_modified::true"
|
echo "::set-output name=any_modified::true"
|
||||||
else
|
else
|
||||||
echo "any_modified=true" >> "$GITHUB_OUTPUT"
|
echo "any_modified=true" >>"$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
echo "::set-output name=any_modified::false"
|
echo "::set-output name=any_modified::false"
|
||||||
else
|
else
|
||||||
echo "any_modified=false" >> "$GITHUB_OUTPUT"
|
echo "any_modified=false" >>"$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -247,16 +322,24 @@ else
|
|||||||
|
|
||||||
if [[ -n $ALL_OTHER_MODIFIED ]]; then
|
if [[ -n $ALL_OTHER_MODIFIED ]]; then
|
||||||
if [[ -n "$ALL_MODIFIED" ]]; then
|
if [[ -n "$ALL_MODIFIED" ]]; then
|
||||||
OTHER_MODIFIED=$(echo "${ALL_OTHER_MODIFIED}|${ALL_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | sort | uniq -u | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
OTHER_MODIFIED=$(echo "${ALL_OTHER_MODIFIED}|${ALL_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | sort | uniq -u | awk -v d="|" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
else
|
else
|
||||||
OTHER_MODIFIED=$ALL_OTHER_MODIFIED
|
OTHER_MODIFIED=$ALL_OTHER_MODIFIED
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$INPUT_JSON" == "false" ]]; then
|
if [[ "$INPUT_JSON" == "false" ]]; then
|
||||||
OTHER_MODIFIED=$(echo "${OTHER_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
if [[ "$INPUT_DIR_NAMES" == "true" ]]; then
|
||||||
|
OTHER_MODIFIED=$(echo "${OTHER_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
else
|
||||||
|
OTHER_MODIFIED=$(echo "${OTHER_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
OTHER_MODIFIED=$(echo "${OTHER_MODIFIED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
if [[ "$INPUT_DIR_NAMES" == "true" ]]; then
|
||||||
|
OTHER_MODIFIED=$(echo "${OTHER_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
|
else
|
||||||
|
OTHER_MODIFIED=$(echo "${OTHER_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | json_output)
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${OTHER_MODIFIED}" && "$OTHER_MODIFIED" != "[]" ]]; then
|
if [[ -n "${OTHER_MODIFIED}" && "$OTHER_MODIFIED" != "[]" ]]; then
|
||||||
@@ -266,14 +349,14 @@ else
|
|||||||
echo "::set-output name=only_modified::false"
|
echo "::set-output name=only_modified::false"
|
||||||
echo "::set-output name=other_modified_files::$OTHER_MODIFIED"
|
echo "::set-output name=other_modified_files::$OTHER_MODIFIED"
|
||||||
else
|
else
|
||||||
echo "only_modified=false" >> "$GITHUB_OUTPUT"
|
echo "only_modified=false" >>"$GITHUB_OUTPUT"
|
||||||
echo "other_modified_files=$OTHER_MODIFIED" >> "$GITHUB_OUTPUT"
|
echo "other_modified_files=$OTHER_MODIFIED" >>"$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
elif [[ -n "${ALL_MODIFIED}" ]]; then
|
elif [[ -n "${ALL_MODIFIED}" ]]; then
|
||||||
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
echo "::set-output name=only_modified::true"
|
echo "::set-output name=only_modified::true"
|
||||||
else
|
else
|
||||||
echo "only_modified=true" >> "$GITHUB_OUTPUT"
|
echo "only_modified=true" >>"$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -284,13 +367,13 @@ else
|
|||||||
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
echo "::set-output name=any_deleted::true"
|
echo "::set-output name=any_deleted::true"
|
||||||
else
|
else
|
||||||
echo "any_deleted=true" >> "$GITHUB_OUTPUT"
|
echo "any_deleted=true" >>"$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
echo "::set-output name=any_deleted::false"
|
echo "::set-output name=any_deleted::false"
|
||||||
else
|
else
|
||||||
echo "any_deleted=false" >> "$GITHUB_OUTPUT"
|
echo "any_deleted=false" >>"$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -305,9 +388,17 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$INPUT_JSON" == "false" ]]; then
|
if [[ "$INPUT_JSON" == "false" ]]; then
|
||||||
OTHER_DELETED=$(echo "${OTHER_DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
if [[ "$INPUT_DIR_NAMES" == "true" ]]; then
|
||||||
|
OTHER_DELETED=$(echo "${OTHER_DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
else
|
||||||
|
OTHER_DELETED=$(echo "${OTHER_DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
OTHER_DELETED=$(echo "${OTHER_DELETED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
if [[ "$INPUT_DIR_NAMES" == "true" ]]; then
|
||||||
|
OTHER_DELETED=$(echo "${OTHER_DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
|
else
|
||||||
|
OTHER_DELETED=$(echo "${OTHER_DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | json_output)
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -n "${OTHER_DELETED}" && "${OTHER_DELETED}" != "[]" ]]; then
|
if [[ -n "${OTHER_DELETED}" && "${OTHER_DELETED}" != "[]" ]]; then
|
||||||
@@ -316,40 +407,68 @@ else
|
|||||||
echo "::set-output name=only_deleted::false"
|
echo "::set-output name=only_deleted::false"
|
||||||
echo "::set-output name=other_deleted_files::$OTHER_DELETED"
|
echo "::set-output name=other_deleted_files::$OTHER_DELETED"
|
||||||
else
|
else
|
||||||
echo "only_deleted=false" >> "$GITHUB_OUTPUT"
|
echo "only_deleted=false" >>"$GITHUB_OUTPUT"
|
||||||
echo "other_deleted_files=$OTHER_DELETED" >> "$GITHUB_OUTPUT"
|
echo "other_deleted_files=$OTHER_DELETED" >>"$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
elif [[ -n "${DELETED}" ]]; then
|
elif [[ -n "${DELETED}" ]]; then
|
||||||
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
echo "::set-output name=only_deleted::true"
|
echo "::set-output name=only_deleted::true"
|
||||||
else
|
else
|
||||||
echo "only_deleted=true" >> "$GITHUB_OUTPUT"
|
echo "only_deleted=true" >>"$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ "$INPUT_JSON" == "false" ]]; then
|
if [[ "$INPUT_JSON" == "false" ]]; then
|
||||||
ADDED=$(echo "${ADDED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
if [[ "$INPUT_DIR_NAMES" == "true" ]]; then
|
||||||
COPIED=$(echo "${COPIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ADDED=$(echo "${ADDED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
DELETED=$(echo "${DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
COPIED=$(echo "${COPIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
MODIFIED=$(echo "${MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
DELETED=$(echo "${DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
RENAMED=$(echo "${RENAMED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
MODIFIED=$(echo "${MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
TYPE_CHANGED=$(echo "${TYPE_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
RENAMED=$(echo "${RENAMED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
UNMERGED=$(echo "${UNMERGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
TYPE_CHANGED=$(echo "${TYPE_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
UNKNOWN=$(echo "${UNKNOWN}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
UNMERGED=$(echo "${UNMERGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_CHANGED_AND_MODIFIED=$(echo "${ALL_CHANGED_AND_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
UNKNOWN=$(echo "${UNKNOWN}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_CHANGED=$(echo "${ALL_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_CHANGED_AND_MODIFIED=$(echo "${ALL_CHANGED_AND_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
ALL_MODIFIED=$(echo "${ALL_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
ALL_CHANGED=$(echo "${ALL_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
ALL_MODIFIED=$(echo "${ALL_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
else
|
||||||
|
ADDED=$(echo "${ADDED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
COPIED=$(echo "${COPIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
DELETED=$(echo "${DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
MODIFIED=$(echo "${MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
RENAMED=$(echo "${RENAMED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
TYPE_CHANGED=$(echo "${TYPE_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
UNMERGED=$(echo "${UNMERGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
UNKNOWN=$(echo "${UNKNOWN}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
ALL_CHANGED_AND_MODIFIED=$(echo "${ALL_CHANGED_AND_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
ALL_CHANGED=$(echo "${ALL_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
ALL_MODIFIED=$(echo "${ALL_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | awk -v d="$INPUT_SEPARATOR" '{s=(NR==1?s:s d)$0}END{print s}')
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
ADDED=$(echo "${ADDED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
if [[ "$INPUT_DIR_NAMES" == "true" ]]; then
|
||||||
COPIED=$(echo "${COPIED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
ADDED=$(echo "${ADDED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
DELETED=$(echo "${DELETED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
COPIED=$(echo "${COPIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
MODIFIED=$(echo "${MODIFIED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
DELETED=$(echo "${DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
RENAMED=$(echo "${RENAMED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
MODIFIED=$(echo "${MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
TYPE_CHANGED=$(echo "${TYPE_CHANGED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
RENAMED=$(echo "${RENAMED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
UNMERGED=$(echo "${UNMERGED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
TYPE_CHANGED=$(echo "${TYPE_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
UNKNOWN=$(echo "${UNKNOWN}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
UNMERGED=$(echo "${UNMERGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
ALL_CHANGED_AND_MODIFIED=$(echo "${ALL_CHANGED_AND_MODIFIED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
UNKNOWN=$(echo "${UNKNOWN}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
ALL_CHANGED=$(echo "${ALL_CHANGED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
ALL_CHANGED_AND_MODIFIED=$(echo "${ALL_CHANGED_AND_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
ALL_MODIFIED=$(echo "${ALL_MODIFIED}" | jq -R 'split("|") | @json' | sed -r 's/^"|"$//g' | tr -s /)
|
ALL_CHANGED=$(echo "${ALL_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
|
ALL_MODIFIED=$(echo "${ALL_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | xargs -I {} dirname {} | get_dirname_max_depth | uniq | json_output)
|
||||||
|
else
|
||||||
|
ADDED=$(echo "${ADDED}" | awk '{gsub(/\|/,"\n"); print $0;}' | json_output)
|
||||||
|
COPIED=$(echo "${COPIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | json_output)
|
||||||
|
DELETED=$(echo "${DELETED}" | awk '{gsub(/\|/,"\n"); print $0;}' | json_output)
|
||||||
|
MODIFIED=$(echo "${MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | json_output)
|
||||||
|
RENAMED=$(echo "${RENAMED}" | awk '{gsub(/\|/,"\n"); print $0;}' | json_output)
|
||||||
|
TYPE_CHANGED=$(echo "${TYPE_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | json_output)
|
||||||
|
UNMERGED=$(echo "${UNMERGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | json_output)
|
||||||
|
UNKNOWN=$(echo "${UNKNOWN}" | awk '{gsub(/\|/,"\n"); print $0;}' | json_output)
|
||||||
|
ALL_CHANGED_AND_MODIFIED=$(echo "${ALL_CHANGED_AND_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | json_output)
|
||||||
|
ALL_CHANGED=$(echo "${ALL_CHANGED}" | awk '{gsub(/\|/,"\n"); print $0;}' | json_output)
|
||||||
|
ALL_MODIFIED=$(echo "${ALL_MODIFIED}" | awk '{gsub(/\|/,"\n"); print $0;}' | json_output)
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -380,8 +499,9 @@ if [[ -z "$GITHUB_OUTPUT" ]]; then
|
|||||||
echo "::set-output name=all_changed_and_modified_files::$ALL_CHANGED_AND_MODIFIED"
|
echo "::set-output name=all_changed_and_modified_files::$ALL_CHANGED_AND_MODIFIED"
|
||||||
echo "::set-output name=all_changed_files::$ALL_CHANGED"
|
echo "::set-output name=all_changed_files::$ALL_CHANGED"
|
||||||
echo "::set-output name=all_modified_files::$ALL_MODIFIED"
|
echo "::set-output name=all_modified_files::$ALL_MODIFIED"
|
||||||
|
echo "::set-output name=outputs_extension::$OUTPUTS_EXTENSION"
|
||||||
else
|
else
|
||||||
cat <<EOF >> "$GITHUB_OUTPUT"
|
cat <<EOF >>"$GITHUB_OUTPUT"
|
||||||
added_files=$ADDED
|
added_files=$ADDED
|
||||||
copied_files=$COPIED
|
copied_files=$COPIED
|
||||||
deleted_files=$DELETED
|
deleted_files=$DELETED
|
||||||
@@ -393,6 +513,7 @@ unknown_files=$UNKNOWN
|
|||||||
all_changed_and_modified_files=$ALL_CHANGED_AND_MODIFIED
|
all_changed_and_modified_files=$ALL_CHANGED_AND_MODIFIED
|
||||||
all_changed_files=$ALL_CHANGED
|
all_changed_files=$ALL_CHANGED
|
||||||
all_modified_files=$ALL_MODIFIED
|
all_modified_files=$ALL_MODIFIED
|
||||||
|
outputs_extension=$OUTPUTS_EXTENSION
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -400,7 +521,7 @@ if [[ $INPUT_INCLUDE_ALL_OLD_NEW_RENAMED_FILES == "true" ]]; then
|
|||||||
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
if [[ -z "$GITHUB_OUTPUT" ]]; then
|
||||||
echo "::set-output name=all_old_new_renamed_files::$ALL_OLD_NEW_RENAMED"
|
echo "::set-output name=all_old_new_renamed_files::$ALL_OLD_NEW_RENAMED"
|
||||||
else
|
else
|
||||||
echo "all_old_new_renamed_files=$ALL_OLD_NEW_RENAMED" >> "$GITHUB_OUTPUT"
|
echo "all_old_new_renamed_files=$ALL_OLD_NEW_RENAMED" >>"$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
"prConcurrentLimit": 5,
|
"prConcurrentLimit": 5,
|
||||||
"rebaseWhen": "behind-base-branch",
|
"rebaseWhen": "behind-base-branch",
|
||||||
"addLabels": [
|
"addLabels": [
|
||||||
"dependencies"
|
"dependencies",
|
||||||
|
"merge when passing"
|
||||||
],
|
],
|
||||||
"assignees": [
|
"assignees": [
|
||||||
"jackton1"
|
"jackton1"
|
||||||
|
|||||||
Submodule test/demo updated: 3b8549eb19...83ccca9b63
@@ -1 +1 @@
|
|||||||
This is a test file
|
This is a test file.
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
This is test file 1.
|
|
||||||
1
test/test rename-1.txt
Normal file
1
test/test rename-1.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
This is a test file 1.
|
||||||
@@ -1 +1 @@
|
|||||||
This is a test file
|
This is a test file.
|
||||||
|
|||||||
1
test/test2/test.txt
Normal file
1
test/test2/test.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Lorem ipsum dolor sit amet, consectetur adipiscing elit et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
||||||
1
test/test2/test3/new.txt
Normal file
1
test/test2/test3/new.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Test file.
|
||||||
1
test/test2/test3/test4/test.txt
Normal file
1
test/test2/test3/test4/test.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Test file.
|
||||||
Reference in New Issue
Block a user