Compare commits
89 Commits
v47
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2af4b3abc0 | ||
|
|
3d37a7ff08 | ||
|
|
445b0eb328 | ||
|
|
4f892cd563 | ||
|
|
611865116d | ||
|
|
e517d7a5ca | ||
|
|
c23d52ba6f | ||
|
|
4750530ff4 | ||
|
|
22103cc46b | ||
|
|
6c02e900a2 | ||
|
|
05f9457d92 | ||
|
|
52ed872dd7 | ||
|
|
1cc5746379 | ||
|
|
de2962f9f4 | ||
|
|
37e96ccbfe | ||
|
|
2180b0f05d | ||
|
|
cf021c158c | ||
|
|
b54ac6f17f | ||
|
|
0f2a510bd7 | ||
|
|
35dace0375 | ||
|
|
9ee99eb5bd | ||
|
|
b7ac303c86 | ||
|
|
7dee1b0c15 | ||
|
|
28b28f6e4e | ||
|
|
875e6e5df8 | ||
|
|
8cba46e29c | ||
|
|
925972f627 | ||
|
|
a98754bb6a | ||
|
|
9c13e73478 | ||
|
|
caee9d94ce | ||
|
|
16d791cc10 | ||
|
|
8e056dec7d | ||
|
|
7d5bbf4e8d | ||
|
|
078e2bcd1e | ||
|
|
8c4da285a3 | ||
|
|
2f2f6cf099 | ||
|
|
8262acc559 | ||
|
|
b3bb1f8753 | ||
|
|
c6a5847dac | ||
|
|
daf9d2d497 | ||
|
|
3c4bc6fa0c | ||
|
|
cd7fbbcebb | ||
|
|
60a1a28396 | ||
|
|
e002140703 | ||
|
|
01ddfae411 | ||
|
|
a364493bbb | ||
|
|
45a2aae7ee | ||
|
|
a4f6de32d5 | ||
|
|
95fbe9b431 | ||
|
|
b3b97244a9 | ||
|
|
503bc3e7d7 | ||
|
|
3e9e5a2aa2 | ||
|
|
2b6c719845 | ||
|
|
043285ef6c | ||
|
|
abdd2f68ea | ||
|
|
1d08ab228c | ||
|
|
085eb10d7e | ||
|
|
72321d1f00 | ||
|
|
8c66df4f78 | ||
|
|
6da3c88b60 | ||
|
|
48b6e9756d | ||
|
|
4206138f17 | ||
|
|
31e663cd71 | ||
|
|
46fd332157 | ||
|
|
2d752abc95 | ||
|
|
70069877f2 | ||
|
|
5df1bad3a5 | ||
|
|
0ff001de08 | ||
|
|
52b808ab08 | ||
|
|
d6388b78bd | ||
|
|
cf5e80aa29 | ||
|
|
cff4543226 | ||
|
|
9dc1b5f80e | ||
|
|
dbf178ceec | ||
|
|
1900262303 | ||
|
|
27e5d78f9b | ||
|
|
d03a93c0db | ||
|
|
df9aabcdef | ||
|
|
d6f020b1d9 | ||
|
|
212f9a7760 | ||
|
|
0dc2215e58 | ||
|
|
28cf3adc4b | ||
|
|
0b7adf7963 | ||
|
|
4563c729c5 | ||
|
|
257f3acedc | ||
|
|
cac596ed08 | ||
|
|
4fb6914af9 | ||
|
|
2371aa7cd2 | ||
|
|
1ac6096503 |
4
.github/workflows/codacy-analysis.yml
vendored
4
.github/workflows/codacy-analysis.yml
vendored
@@ -29,7 +29,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
# Checkout the repository to the GitHub Actions runner
|
# Checkout the repository to the GitHub Actions runner
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
|
# Execute Codacy Analysis CLI and generate a SARIF output with the security issues identified during the analysis
|
||||||
- name: Run Codacy Analysis CLI
|
- name: Run Codacy Analysis CLI
|
||||||
@@ -51,6 +51,6 @@ jobs:
|
|||||||
# Upload the SARIF file generated in the previous step
|
# Upload the SARIF file generated in the previous step
|
||||||
- name: Upload SARIF results file
|
- name: Upload SARIF results file
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: github/codeql-action/upload-sarif@192325c86100d080feab897ff886c34abd4c83a3 # v3.29.5
|
uses: github/codeql-action/upload-sarif@38697555549f1db7851b81482ff19f1fa5c4fedc # v3.29.5
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
|||||||
8
.github/workflows/codeql.yml
vendored
8
.github/workflows/codeql.yml
vendored
@@ -43,11 +43,11 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@192325c86100d080feab897ff886c34abd4c83a3 # v3.29.5
|
uses: github/codeql-action/init@38697555549f1db7851b81482ff19f1fa5c4fedc # v3.29.5
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
@@ -61,7 +61,7 @@ jobs:
|
|||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@192325c86100d080feab897ff886c34abd4c83a3 # v3.29.5
|
uses: github/codeql-action/autobuild@38697555549f1db7851b81482ff19f1fa5c4fedc # v3.29.5
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
|
||||||
@@ -74,6 +74,6 @@ jobs:
|
|||||||
# ./location_of_script_within_repo/buildscript.sh
|
# ./location_of_script_within_repo/buildscript.sh
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@192325c86100d080feab897ff886c34abd4c83a3 # v3.29.5
|
uses: github/codeql-action/analyze@38697555549f1db7851b81482ff19f1fa5c4fedc # v3.29.5
|
||||||
with:
|
with:
|
||||||
category: "/language:${{matrix.language}}"
|
category: "/language:${{matrix.language}}"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ jobs:
|
|||||||
NUMBER: ${{ github.event.issue.number }}
|
NUMBER: ${{ github.event.issue.number }}
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -104,7 +104,7 @@ jobs:
|
|||||||
NUMBER: ${{ github.event.issue.number }}
|
NUMBER: ${{ github.event.issue.number }}
|
||||||
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|||||||
16
.github/workflows/matrix-example.yml
vendored
16
.github/workflows/matrix-example.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
|||||||
matrix: ${{ steps.changed-files.outputs.all_changed_files }}
|
matrix: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
@@ -39,7 +39,19 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
- name: Test
|
- name: Test
|
||||||
run: |
|
run: |
|
||||||
echo ${{ matrix.files }}
|
echo ${{ matrix.files }}
|
||||||
|
|
||||||
|
conditional-job:
|
||||||
|
name: Run Conditional Job
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [changed-files]
|
||||||
|
if: contains(needs.changed-files.outputs.matrix, 'README.md') # Conditional check for README
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
- name: Execute Conditional Logic
|
||||||
|
run: |
|
||||||
|
echo "README.md has been changed. Running conditional job."
|
||||||
|
|||||||
4
.github/workflows/multi-job-example.yml
vendored
4
.github/workflows/multi-job-example.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
|||||||
all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
|
all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
@@ -45,7 +45,7 @@ jobs:
|
|||||||
all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
|
all_changed_files: ${{ steps.changed-files.outputs.all_changed_files }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
|
|||||||
6
.github/workflows/sync-release-version.yml
vendored
6
.github/workflows/sync-release-version.yml
vendored
@@ -13,11 +13,11 @@ jobs:
|
|||||||
update-version:
|
update-version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Run release-tagger
|
- name: Run release-tagger
|
||||||
uses: tj-actions/release-tagger@1a9264b0fd99a1ef92c4fd2f077f292900cc79b6 # v4.0.0
|
uses: tj-actions/release-tagger@970a1f5f827a7b90902b0adc904f3bb70c1074e7 # v6.0.6
|
||||||
- name: Sync release version.
|
- name: Sync release version.
|
||||||
uses: tj-actions/sync-release-version@2a7ef0deb39b3ecce887ee99d2261c6cef989d84 # v13.16
|
uses: tj-actions/sync-release-version@2a7ef0deb39b3ecce887ee99d2261c6cef989d84 # v13.16
|
||||||
id: sync-release-version
|
id: sync-release-version
|
||||||
@@ -38,7 +38,7 @@ jobs:
|
|||||||
- name: Run git-cliff
|
- name: Run git-cliff
|
||||||
uses: tj-actions/git-cliff@679041f051a4d2ab452f7e5e7b0eed2abee21131 # v2.2.0
|
uses: tj-actions/git-cliff@679041f051a4d2ab452f7e5e7b0eed2abee21131 # v2.2.0
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
|
||||||
with:
|
with:
|
||||||
base: "main"
|
base: "main"
|
||||||
labels: "merge when passing"
|
labels: "merge when passing"
|
||||||
|
|||||||
191
.github/workflows/test.yml
vendored
191
.github/workflows/test.yml
vendored
@@ -38,14 +38,14 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
pull-requests: read
|
pull-requests: read
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
|
|
||||||
- name: Use Node.js 24.x
|
- name: Use Node.js 24.x
|
||||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
|
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
|
||||||
with:
|
with:
|
||||||
cache: 'yarn'
|
cache: 'yarn'
|
||||||
node-version: '24.x'
|
node-version: '24.x'
|
||||||
@@ -73,7 +73,7 @@ jobs:
|
|||||||
GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }}
|
GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }}
|
||||||
|
|
||||||
- name: Upload build assets
|
- name: Upload build assets
|
||||||
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
|
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
path: dist
|
path: dist
|
||||||
@@ -109,7 +109,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout into dir1
|
- name: Checkout into dir1
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
submodules: true
|
submodules: true
|
||||||
@@ -117,7 +117,7 @@ jobs:
|
|||||||
path: dir1
|
path: dir1
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
path: dir1/dist
|
path: dir1/dist
|
||||||
@@ -143,13 +143,13 @@ jobs:
|
|||||||
bash
|
bash
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
path: dir2/dist
|
path: dir2/dist
|
||||||
|
|
||||||
- name: Checkout into dir2
|
- name: Checkout into dir2
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
submodules: true
|
submodules: true
|
||||||
@@ -185,13 +185,13 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -245,13 +245,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -275,6 +275,113 @@ jobs:
|
|||||||
shell:
|
shell:
|
||||||
bash
|
bash
|
||||||
|
|
||||||
|
test-skip-same-base-and-commit-sha:
|
||||||
|
name: Test changed-files skip same base and commit sha
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
if: needs.build.outputs.files_changed != 'true'
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout branch
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
with:
|
||||||
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Download build assets
|
||||||
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
|
with:
|
||||||
|
name: build-assets
|
||||||
|
|
||||||
|
- name: Get head SHA
|
||||||
|
id: head-sha
|
||||||
|
run: |
|
||||||
|
echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
|
- name: Run changed-files with same base and commit sha
|
||||||
|
id: changed-files
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
base_sha: ${{ steps.head-sha.outputs.sha }}
|
||||||
|
sha: ${{ steps.head-sha.outputs.sha }}
|
||||||
|
skip_same_sha: true
|
||||||
|
|
||||||
|
- name: Verify empty outputs
|
||||||
|
if: steps.changed-files.outputs.all_changed_files_count != '0' || steps.changed-files.outputs.any_changed != 'false'
|
||||||
|
run: |
|
||||||
|
echo "Expected empty outputs; got count=${{ steps.changed-files.outputs.all_changed_files_count }} any_changed=${{ steps.changed-files.outputs.any_changed }}"
|
||||||
|
exit 1
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files.outputs) }}'
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
|
test-exclude-symlinks:
|
||||||
|
name: Test changed-files exclude symlinks
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: build
|
||||||
|
if: needs.build.outputs.files_changed != 'true'
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout branch
|
||||||
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
with:
|
||||||
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Download build assets
|
||||||
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
|
with:
|
||||||
|
name: build-assets
|
||||||
|
|
||||||
|
- name: Run changed-files without symlink exclusion
|
||||||
|
id: changed-files-symlink-included
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
base_sha: 2f2f6cf099167fa7d7c6aba8fc0421327e181a5a
|
||||||
|
sha: 8c4da285a3cb8b621b4a5cc251d6282b4b0a67a5
|
||||||
|
|
||||||
|
- name: Verify symlink is present
|
||||||
|
if: "!contains(steps.changed-files-symlink-included.outputs.added_files, 'test/symlink-to-target')"
|
||||||
|
run: |
|
||||||
|
echo "Expected symlink to be present in added_files; got ${{ steps.changed-files-symlink-included.outputs.added_files }}"
|
||||||
|
exit 1
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
|
- name: Run changed-files excluding symlinks
|
||||||
|
id: changed-files-symlink-excluded
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
base_sha: 2f2f6cf099167fa7d7c6aba8fc0421327e181a5a
|
||||||
|
sha: 8c4da285a3cb8b621b4a5cc251d6282b4b0a67a5
|
||||||
|
exclude_symlinks: true
|
||||||
|
|
||||||
|
- name: Verify symlink is excluded
|
||||||
|
if: "contains(steps.changed-files-symlink-excluded.outputs.added_files, 'test/symlink-to-target') || contains(steps.changed-files-symlink-excluded.outputs.all_changed_files, 'test/symlink-to-target')"
|
||||||
|
run: |
|
||||||
|
echo "Expected symlink to be excluded; got added=${{ steps.changed-files-symlink-excluded.outputs.added_files }} all=${{ steps.changed-files-symlink-excluded.outputs.all_changed_files }}"
|
||||||
|
exit 1
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
|
- name: Show output
|
||||||
|
run: |
|
||||||
|
echo '${{ toJSON(steps.changed-files-symlink-included.outputs) }}'
|
||||||
|
echo '${{ toJSON(steps.changed-files-symlink-excluded.outputs) }}'
|
||||||
|
shell:
|
||||||
|
bash
|
||||||
|
|
||||||
test-using-branch-names-for-base-sha-and-sha-inputs:
|
test-using-branch-names-for-base-sha-and-sha-inputs:
|
||||||
name: Test using branch names for base_sha and sha inputs
|
name: Test using branch names for base_sha and sha inputs
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -289,13 +396,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -328,13 +435,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
fetch-depth: ${{ matrix.fetch-depth }}
|
fetch-depth: ${{ matrix.fetch-depth }}
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -362,12 +469,12 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -396,14 +503,14 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: ${{ matrix.fetch-depth }}
|
fetch-depth: ${{ matrix.fetch-depth }}
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -426,10 +533,10 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -481,10 +588,10 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -536,7 +643,7 @@ jobs:
|
|||||||
pull-requests: read
|
pull-requests: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout into dir1
|
- name: Checkout into dir1
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
submodules: true
|
submodules: true
|
||||||
@@ -544,7 +651,7 @@ jobs:
|
|||||||
path: dir1
|
path: dir1
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
path: dir1/dist
|
path: dir1/dist
|
||||||
@@ -568,14 +675,14 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
path: dist
|
path: dist
|
||||||
@@ -605,7 +712,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout into dir1
|
- name: Checkout into dir1
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
submodules: true
|
submodules: true
|
||||||
@@ -613,7 +720,7 @@ jobs:
|
|||||||
path: dir1
|
path: dir1
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
path: dir1/dist
|
path: dir1/dist
|
||||||
@@ -644,14 +751,14 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: ${{ matrix.fetch-depth }}
|
fetch-depth: ${{ matrix.fetch-depth }}
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -710,14 +817,14 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: ${{ matrix.fetch-depth }}
|
fetch-depth: ${{ matrix.fetch-depth }}
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -805,14 +912,14 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
fetch-depth: ${{ matrix.fetch-depth }}
|
fetch-depth: ${{ matrix.fetch-depth }}
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -991,7 +1098,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
ref: a52f8621d26d5d9f54b80f74bda2d9eedff94693
|
ref: a52f8621d26d5d9f54b80f74bda2d9eedff94693
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
@@ -1029,7 +1136,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
@@ -1108,7 +1215,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout branch
|
- name: Checkout branch
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
@@ -1116,7 +1223,7 @@ jobs:
|
|||||||
fetch-depth: ${{ matrix.fetch-depth }}
|
fetch-depth: ${{ matrix.fetch-depth }}
|
||||||
|
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
|
|
||||||
@@ -1161,13 +1268,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||||
fetch-depth: ${{ matrix.fetch-depth }}
|
fetch-depth: ${{ matrix.fetch-depth }}
|
||||||
- name: Download build assets
|
- name: Download build assets
|
||||||
uses: actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
with:
|
with:
|
||||||
name: build-assets
|
name: build-assets
|
||||||
- name: Dump GitHub context
|
- name: Dump GitHub context
|
||||||
@@ -2154,7 +2261,7 @@ jobs:
|
|||||||
id: branch-name
|
id: branch-name
|
||||||
uses: tj-actions/branch-names@5250492686b253f06fa55861556d1027b067aeb5 # v9.0.2
|
uses: tj-actions/branch-names@5250492686b253f06fa55861556d1027b067aeb5 # v9.0.2
|
||||||
if: github.event_name == 'pull_request' && matrix.fetch-depth == 0
|
if: github.event_name == 'pull_request' && matrix.fetch-depth == 0
|
||||||
- uses: nrwl/nx-set-shas@826660b82addbef3abff5fa871492ebad618c9e1 # v4.3.3
|
- uses: nrwl/nx-set-shas@3e9ad7370203c1e93d109be57f3b72eb0eb511b1 # v4.4.0
|
||||||
id: last_successful_commit
|
id: last_successful_commit
|
||||||
if: github.event_name == 'pull_request' && github.event.action != 'closed' && matrix.fetch-depth == 0
|
if: github.event_name == 'pull_request' && github.event.action != 'closed' && matrix.fetch-depth == 0
|
||||||
with:
|
with:
|
||||||
|
|||||||
5
.github/workflows/update-readme.yml
vendored
5
.github/workflows/update-readme.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
|||||||
sync-assets:
|
sync-assets:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
@@ -21,7 +21,6 @@ jobs:
|
|||||||
uses: tj-actions/auto-doc@b10ceedffd794ec29a8fa8700529f40c1b64a951 # v3.6.0
|
uses: tj-actions/auto-doc@b10ceedffd794ec29a8fa8700529f40c1b64a951 # v3.6.0
|
||||||
with:
|
with:
|
||||||
use_code_blocks: true
|
use_code_blocks: true
|
||||||
use_major_version: true
|
|
||||||
use_tag_commit_hash: true
|
use_tag_commit_hash: true
|
||||||
|
|
||||||
- name: Run remark
|
- name: Run remark
|
||||||
@@ -42,7 +41,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
if: failure()
|
if: failure()
|
||||||
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
|
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
|
||||||
with:
|
with:
|
||||||
base: "main"
|
base: "main"
|
||||||
labels: "merge when passing"
|
labels: "merge when passing"
|
||||||
|
|||||||
4
.github/workflows/workflow-run-example.yml
vendored
4
.github/workflows/workflow-run-example.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
|||||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
@@ -29,7 +29,7 @@ jobs:
|
|||||||
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
|
|||||||
1904
HISTORY.md
1904
HISTORY.md
File diff suppressed because it is too large
Load Diff
91
README.md
91
README.md
@@ -3,9 +3,8 @@
|
|||||||
[](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)
|
[](https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on)
|
||||||
[](https://github.com/search?o=desc\&q=tj-actions+changed-files+language%3AYAML\&s=\&type=Code)
|
[](https://github.com/search?o=desc\&q=tj-actions+changed-files+language%3AYAML\&s=\&type=Code)
|
||||||
|
|
||||||
[](https://app.codacy.com/gh/tj-actions/changed-files/dashboard?utm_source=gh\&utm_medium=referral\&utm_content=\&utm_campaign=Badge_grade)
|
[](https://app.codacy.com/gh/tj-actions/changed-files/dashboard?utm_source=gh\&utm_medium=referral\&utm_content=\&utm_campaign=Badge_grade)
|
||||||
[](https://github.com/tj-actions/changed-files/actions/workflows/test.yml)
|
[](https://github.com/tj-actions/changed-files/actions/workflows/test.yml)
|
||||||
[](https://github.com/tj-actions/changed-files/actions/workflows/sync-release-version.yml)
|
|
||||||
|
|
||||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||||
|
|
||||||
@@ -45,6 +44,7 @@ Effortlessly track all changed files and directories relative to a target branch
|
|||||||
* [Credits 👏](#credits-)
|
* [Credits 👏](#credits-)
|
||||||
* [Report Bugs 🐛](#report-bugs-)
|
* [Report Bugs 🐛](#report-bugs-)
|
||||||
* [Contributors ✨](#contributors-)
|
* [Contributors ✨](#contributors-)
|
||||||
|
* [💼 Automate Your Job Search Too](#-automate-your-job-search-too)
|
||||||
|
|
||||||
## Features 🚀
|
## Features 🚀
|
||||||
|
|
||||||
@@ -122,7 +122,7 @@ jobs:
|
|||||||
# -----------------------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------------------
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
# To compare changes between the current commit and the last pushed remote commit set `since_last_remote_commit: true`. e.g
|
# To compare changes between the current commit and the last pushed remote commit set `since_last_remote_commit: true`. e.g
|
||||||
# with:
|
# with:
|
||||||
# since_last_remote_commit: true
|
# since_last_remote_commit: true
|
||||||
@@ -140,7 +140,7 @@ jobs:
|
|||||||
# -----------------------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------------------
|
||||||
- name: Get all changed markdown files
|
- name: Get all changed markdown files
|
||||||
id: changed-markdown-files
|
id: changed-markdown-files
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
# Avoid using single or double quotes for multiline patterns
|
# Avoid using single or double quotes for multiline patterns
|
||||||
files: |
|
files: |
|
||||||
@@ -161,7 +161,7 @@ jobs:
|
|||||||
# -----------------------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------------------
|
||||||
- name: Get all test, doc and src files that have changed
|
- name: Get all test, doc and src files that have changed
|
||||||
id: changed-files-yaml
|
id: changed-files-yaml
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
files_yaml: |
|
files_yaml: |
|
||||||
doc:
|
doc:
|
||||||
@@ -196,7 +196,7 @@ jobs:
|
|||||||
# -----------------------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------------------
|
||||||
- name: Get changed files in the docs folder
|
- name: Get changed files in the docs folder
|
||||||
id: changed-files-specific
|
id: changed-files-specific
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
files: docs/*.{js,html} # Alternatively using: `docs/**`
|
files: docs/*.{js,html} # Alternatively using: `docs/**`
|
||||||
files_ignore: docs/static.js
|
files_ignore: docs/static.js
|
||||||
@@ -238,7 +238,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
|
|
||||||
- name: List all changed files
|
- name: List all changed files
|
||||||
env:
|
env:
|
||||||
@@ -281,7 +281,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
# NOTE: `since_last_remote_commit: true` is implied by default and falls back to the previous local commit.
|
# NOTE: `since_last_remote_commit: true` is implied by default and falls back to the previous local commit.
|
||||||
|
|
||||||
- name: List all changed files
|
- name: List all changed files
|
||||||
@@ -328,7 +328,7 @@ Support this project with a :star:
|
|||||||
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
|
<!-- AUTO-DOC-INPUT:START - Do not remove or modify this section -->
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
- uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
- uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
id: changed-files
|
id: changed-files
|
||||||
with:
|
with:
|
||||||
# Github API URL.
|
# Github API URL.
|
||||||
@@ -411,6 +411,11 @@ Support this project with a :star:
|
|||||||
# Default: "false"
|
# Default: "false"
|
||||||
exclude_submodules: ''
|
exclude_submodules: ''
|
||||||
|
|
||||||
|
# Exclude symlinks from changed files.
|
||||||
|
# Type: boolean
|
||||||
|
# Default: "false"
|
||||||
|
exclude_symlinks: ''
|
||||||
|
|
||||||
# Fail when the initial diff
|
# Fail when the initial diff
|
||||||
# fails.
|
# fails.
|
||||||
# Type: boolean
|
# Type: boolean
|
||||||
@@ -675,6 +680,12 @@ Support this project with a :star:
|
|||||||
# Default: "false"
|
# Default: "false"
|
||||||
skip_initial_fetch: ''
|
skip_initial_fetch: ''
|
||||||
|
|
||||||
|
# Do not fail when base
|
||||||
|
# and head SHAs are identical.
|
||||||
|
# Type: boolean
|
||||||
|
# Default: "false"
|
||||||
|
skip_same_sha: ''
|
||||||
|
|
||||||
# Tags pattern to ignore.
|
# Tags pattern to ignore.
|
||||||
# Type: string
|
# Type: string
|
||||||
tags_ignore_pattern: ''
|
tags_ignore_pattern: ''
|
||||||
@@ -814,7 +825,7 @@ The format of the version string is as follows:
|
|||||||
...
|
...
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -827,7 +838,7 @@ The format of the version string is as follows:
|
|||||||
...
|
...
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
safe_output: false # set to false because we are using an environment variable to store the output and avoid command injection.
|
safe_output: false # set to false because we are using an environment variable to store the output and avoid command injection.
|
||||||
|
|
||||||
@@ -850,7 +861,7 @@ The format of the version string is as follows:
|
|||||||
...
|
...
|
||||||
- name: Get all changed files and use a comma separator in the output
|
- name: Get all changed files and use a comma separator in the output
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
separator: ","
|
separator: ","
|
||||||
...
|
...
|
||||||
@@ -867,7 +878,7 @@ See [inputs](#inputs) for more information.
|
|||||||
...
|
...
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
|
|
||||||
- name: List all added files
|
- name: List all added files
|
||||||
env:
|
env:
|
||||||
@@ -890,7 +901,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
|||||||
...
|
...
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
|
|
||||||
- name: Run a step if my-file.txt was modified
|
- name: Run a step if my-file.txt was modified
|
||||||
if: contains(steps.changed-files.outputs.modified_files, 'my-file.txt')
|
if: contains(steps.changed-files.outputs.modified_files, 'my-file.txt')
|
||||||
@@ -911,7 +922,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
|||||||
|
|
||||||
- name: Get changed files and write the outputs to a Txt file
|
- name: Get changed files and write the outputs to a Txt file
|
||||||
id: changed-files-write-output-files-txt
|
id: changed-files-write-output-files-txt
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
write_output_files: true
|
write_output_files: true
|
||||||
|
|
||||||
@@ -930,7 +941,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
|||||||
...
|
...
|
||||||
- name: Get changed files and write the outputs to a JSON file
|
- name: Get changed files and write the outputs to a JSON file
|
||||||
id: changed-files-write-output-files-json
|
id: changed-files-write-output-files-json
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
json: true
|
json: true
|
||||||
write_output_files: true
|
write_output_files: true
|
||||||
@@ -950,7 +961,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
|||||||
...
|
...
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
my-file.txt
|
my-file.txt
|
||||||
@@ -973,7 +984,7 @@ See [inputs](#inputs) for more information.
|
|||||||
...
|
...
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files-specific
|
id: changed-files-specific
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
my-file.txt
|
my-file.txt
|
||||||
@@ -1024,7 +1035,7 @@ See [outputs](#outputs) for a list of all available outputs.
|
|||||||
...
|
...
|
||||||
- name: Get changed files using a source file or list of file(s) to populate to files input.
|
- name: Get changed files using a source file or list of file(s) to populate to files input.
|
||||||
id: changed-files-specific-source-file
|
id: changed-files-specific-source-file
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
files_from_source_file: test/changed-files-list.txt
|
files_from_source_file: test/changed-files-list.txt
|
||||||
...
|
...
|
||||||
@@ -1041,7 +1052,7 @@ See [inputs](#inputs) for more information.
|
|||||||
...
|
...
|
||||||
- name: Get changed files using a source file or list of file(s) to populate to files input and optionally specify more files.
|
- name: Get changed files using a source file or list of file(s) to populate to files input and optionally specify more files.
|
||||||
id: changed-files-specific-source-file-and-specify-files
|
id: changed-files-specific-source-file-and-specify-files
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
files_from_source_file: |
|
files_from_source_file: |
|
||||||
test/changed-files-list.txt
|
test/changed-files-list.txt
|
||||||
@@ -1062,7 +1073,7 @@ See [inputs](#inputs) for more information.
|
|||||||
...
|
...
|
||||||
- name: Get changed files using a different SHA
|
- name: Get changed files using a different SHA
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
sha: ${{ github.event.pull_request.head.sha }}
|
sha: ${{ github.event.pull_request.head.sha }}
|
||||||
...
|
...
|
||||||
@@ -1079,7 +1090,7 @@ See [inputs](#inputs) for more information.
|
|||||||
...
|
...
|
||||||
- name: Get changed files using a different base SHA
|
- name: Get changed files using a different base SHA
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
base_sha: ${{ github.event.pull_request.base.sha }}
|
base_sha: ${{ github.event.pull_request.base.sha }}
|
||||||
...
|
...
|
||||||
@@ -1111,7 +1122,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Get changed files
|
- name: Get changed files
|
||||||
id: changed-files
|
id: changed-files
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
|
|
||||||
- name: List changed files
|
- name: List changed files
|
||||||
env:
|
env:
|
||||||
@@ -1121,7 +1132,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Get changed files in the .github folder
|
- name: Get changed files in the .github folder
|
||||||
id: changed-files-specific
|
id: changed-files-specific
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
files: .github/**
|
files: .github/**
|
||||||
|
|
||||||
@@ -1152,7 +1163,7 @@ See [inputs](#inputs) for more information.
|
|||||||
|
|
||||||
- name: Run changed-files with defaults in dir1
|
- name: Run changed-files with defaults in dir1
|
||||||
id: changed-files-for-dir1
|
id: changed-files-for-dir1
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
path: dir1
|
path: dir1
|
||||||
|
|
||||||
@@ -1177,13 +1188,13 @@ See [inputs](#inputs) for more information.
|
|||||||
...
|
...
|
||||||
- name: Run changed-files with quotepath disabled
|
- name: Run changed-files with quotepath disabled
|
||||||
id: changed-files-quotepath
|
id: changed-files-quotepath
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
quotepath: "false"
|
quotepath: "false"
|
||||||
|
|
||||||
- name: Run changed-files with quotepath disabled for a specified list of file(s)
|
- name: Run changed-files with quotepath disabled for a specified list of file(s)
|
||||||
id: changed-files-quotepath-specific
|
id: changed-files-quotepath-specific
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
files: test/test-è.txt
|
files: test/test-è.txt
|
||||||
quotepath: "false"
|
quotepath: "false"
|
||||||
@@ -1216,7 +1227,7 @@ See [inputs](#inputs) for more information.
|
|||||||
|
|
||||||
- name: Run changed-files with the commit of the last successful test workflow run
|
- name: Run changed-files with the commit of the last successful test workflow run
|
||||||
id: changed-files-base-sha-push
|
id: changed-files-base-sha-push
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
base_sha: ${{ steps.last_successful_commit_push.outputs.base }}
|
base_sha: ${{ steps.last_successful_commit_push.outputs.base }}
|
||||||
...
|
...
|
||||||
@@ -1243,7 +1254,7 @@ See [inputs](#inputs) for more information.
|
|||||||
|
|
||||||
- name: Run changed-files with the commit of the last successful test workflow run on the main branch
|
- name: Run changed-files with the commit of the last successful test workflow run on the main branch
|
||||||
id: changed-files-base-sha-pull-request
|
id: changed-files-base-sha-pull-request
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
base_sha: ${{ steps.last_successful_commit_pull_request.outputs.base }}
|
base_sha: ${{ steps.last_successful_commit_pull_request.outputs.base }}
|
||||||
...
|
...
|
||||||
@@ -1269,7 +1280,7 @@ See [inputs](#inputs) for more information.
|
|||||||
...
|
...
|
||||||
- name: Run changed-files with dir_names
|
- name: Run changed-files with dir_names
|
||||||
id: changed-files-dir-names
|
id: changed-files-dir-names
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
dir_names: "true"
|
dir_names: "true"
|
||||||
...
|
...
|
||||||
@@ -1286,7 +1297,7 @@ See [inputs](#inputs) for more information.
|
|||||||
...
|
...
|
||||||
- name: Run changed-files with JSON output
|
- name: Run changed-files with JSON output
|
||||||
id: changed-files-json
|
id: changed-files-json
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
json: "true"
|
json: "true"
|
||||||
...
|
...
|
||||||
@@ -1303,13 +1314,13 @@ See [inputs](#inputs) for more information.
|
|||||||
...
|
...
|
||||||
- name: Get changed-files since 2022-08-19
|
- name: Get changed-files since 2022-08-19
|
||||||
id: changed-files-since
|
id: changed-files-since
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
since: "2022-08-19"
|
since: "2022-08-19"
|
||||||
|
|
||||||
- name: Get changed-files until 2022-08-20
|
- name: Get changed-files until 2022-08-20
|
||||||
id: changed-files-until
|
id: changed-files-until
|
||||||
uses: tj-actions/changed-files@ed68ef82c095e0d48ec87eccea555d944a631a4c # v46
|
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
|
||||||
with:
|
with:
|
||||||
until: "2022-08-20"
|
until: "2022-08-20"
|
||||||
...
|
...
|
||||||
@@ -1459,3 +1470,17 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
|||||||
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
<!-- ALL-CONTRIBUTORS-LIST:END -->
|
||||||
|
|
||||||
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
## 💼 Automate Your Job Search Too
|
||||||
|
|
||||||
|
You automate your CI/CD. Automate your job applications too.
|
||||||
|
|
||||||
|
**[ApplySmart AI](https://applysmart.ai)** helps you:
|
||||||
|
|
||||||
|
* Generate tailored resumes & cover letters in seconds
|
||||||
|
* Extract job details from any posting automatically
|
||||||
|
* Track applications like you track deployments
|
||||||
|
|
||||||
|
**Free tier available** → [applysmart.ai](https://applysmart.ai)
|
||||||
|
|||||||
@@ -227,6 +227,14 @@ inputs:
|
|||||||
description: "Exclude changes to submodules."
|
description: "Exclude changes to submodules."
|
||||||
required: false
|
required: false
|
||||||
default: "false"
|
default: "false"
|
||||||
|
exclude_symlinks:
|
||||||
|
description: "Exclude symlinks from changed files."
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
|
skip_same_sha:
|
||||||
|
description: "Do not fail when base and head SHAs are identical."
|
||||||
|
required: false
|
||||||
|
default: "false"
|
||||||
fetch_missing_history_max_retries:
|
fetch_missing_history_max_retries:
|
||||||
description: "Maximum number of retries to fetch missing history."
|
description: "Maximum number of retries to fetch missing history."
|
||||||
required: false
|
required: false
|
||||||
|
|||||||
1845
dist/index.js
generated
vendored
1845
dist/index.js
generated
vendored
File diff suppressed because it is too large
Load Diff
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@@ -33,8 +33,8 @@
|
|||||||
},
|
},
|
||||||
"homepage": "https://github.com/tj-actions/changed-files#readme",
|
"homepage": "https://github.com/tj-actions/changed-files#readme",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^2.0.0",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^2.0.0",
|
||||||
"@actions/github": "^6.0.0",
|
"@actions/github": "^6.0.0",
|
||||||
"@octokit/rest": "^22.0.0",
|
"@octokit/rest": "^22.0.0",
|
||||||
"@stdlib/utils-convert-path": "^0.2.1",
|
"@stdlib/utils-convert-path": "^0.2.1",
|
||||||
@@ -46,8 +46,8 @@
|
|||||||
"@types/jest": "^30.0.0",
|
"@types/jest": "^30.0.0",
|
||||||
"@types/lodash": "^4.14.195",
|
"@types/lodash": "^4.14.195",
|
||||||
"@types/micromatch": "^4.0.2",
|
"@types/micromatch": "^4.0.2",
|
||||||
"@types/node": "^24.0.1",
|
"@types/node": "^25.0.0",
|
||||||
"@types/uuid": "^10.0.0",
|
"@types/uuid": "^11.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
"@typescript-eslint/eslint-plugin": "^7.0.0",
|
||||||
"@typescript-eslint/parser": "^7.0.0",
|
"@typescript-eslint/parser": "^7.0.0",
|
||||||
"@vercel/ncc": "^0.38.0",
|
"@vercel/ncc": "^0.38.0",
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ exports[`getInputs should correctly parse boolean inputs 1`] = `
|
|||||||
"dirNamesIncludeFilesSeparator": "",
|
"dirNamesIncludeFilesSeparator": "",
|
||||||
"escapeJson": false,
|
"escapeJson": false,
|
||||||
"excludeSubmodules": "false",
|
"excludeSubmodules": "false",
|
||||||
|
"excludeSymlinks": "false",
|
||||||
"failOnInitialDiffError": "false",
|
"failOnInitialDiffError": "false",
|
||||||
"failOnSubmoduleDiffError": "false",
|
"failOnSubmoduleDiffError": "false",
|
||||||
"fetchAdditionalSubmoduleHistory": "false",
|
"fetchAdditionalSubmoduleHistory": "false",
|
||||||
@@ -53,6 +54,7 @@ exports[`getInputs should correctly parse boolean inputs 1`] = `
|
|||||||
"since": "",
|
"since": "",
|
||||||
"sinceLastRemoteCommit": "false",
|
"sinceLastRemoteCommit": "false",
|
||||||
"skipInitialFetch": "true",
|
"skipInitialFetch": "true",
|
||||||
|
"skipSameSha": "false",
|
||||||
"tagsIgnorePattern": "",
|
"tagsIgnorePattern": "",
|
||||||
"tagsPattern": "*",
|
"tagsPattern": "*",
|
||||||
"token": "",
|
"token": "",
|
||||||
@@ -76,6 +78,7 @@ exports[`getInputs should correctly parse numeric inputs 1`] = `
|
|||||||
"dirNamesMaxDepth": 2,
|
"dirNamesMaxDepth": 2,
|
||||||
"escapeJson": false,
|
"escapeJson": false,
|
||||||
"excludeSubmodules": false,
|
"excludeSubmodules": false,
|
||||||
|
"excludeSymlinks": false,
|
||||||
"failOnInitialDiffError": false,
|
"failOnInitialDiffError": false,
|
||||||
"failOnSubmoduleDiffError": false,
|
"failOnSubmoduleDiffError": false,
|
||||||
"fetchAdditionalSubmoduleHistory": false,
|
"fetchAdditionalSubmoduleHistory": false,
|
||||||
@@ -115,6 +118,7 @@ exports[`getInputs should correctly parse numeric inputs 1`] = `
|
|||||||
"since": "",
|
"since": "",
|
||||||
"sinceLastRemoteCommit": false,
|
"sinceLastRemoteCommit": false,
|
||||||
"skipInitialFetch": false,
|
"skipInitialFetch": false,
|
||||||
|
"skipSameSha": false,
|
||||||
"tagsIgnorePattern": "",
|
"tagsIgnorePattern": "",
|
||||||
"tagsPattern": "",
|
"tagsPattern": "",
|
||||||
"token": "",
|
"token": "",
|
||||||
@@ -137,6 +141,7 @@ exports[`getInputs should correctly parse string inputs 1`] = `
|
|||||||
"dirNamesIncludeFilesSeparator": "",
|
"dirNamesIncludeFilesSeparator": "",
|
||||||
"escapeJson": false,
|
"escapeJson": false,
|
||||||
"excludeSubmodules": false,
|
"excludeSubmodules": false,
|
||||||
|
"excludeSymlinks": false,
|
||||||
"failOnInitialDiffError": false,
|
"failOnInitialDiffError": false,
|
||||||
"failOnSubmoduleDiffError": false,
|
"failOnSubmoduleDiffError": false,
|
||||||
"fetchAdditionalSubmoduleHistory": false,
|
"fetchAdditionalSubmoduleHistory": false,
|
||||||
@@ -175,6 +180,7 @@ exports[`getInputs should correctly parse string inputs 1`] = `
|
|||||||
"since": "",
|
"since": "",
|
||||||
"sinceLastRemoteCommit": false,
|
"sinceLastRemoteCommit": false,
|
||||||
"skipInitialFetch": false,
|
"skipInitialFetch": false,
|
||||||
|
"skipSameSha": false,
|
||||||
"tagsIgnorePattern": "",
|
"tagsIgnorePattern": "",
|
||||||
"tagsPattern": "",
|
"tagsPattern": "",
|
||||||
"token": "token",
|
"token": "token",
|
||||||
@@ -198,6 +204,7 @@ exports[`getInputs should handle invalid numeric inputs correctly 1`] = `
|
|||||||
"dirNamesMaxDepth": 2,
|
"dirNamesMaxDepth": 2,
|
||||||
"escapeJson": false,
|
"escapeJson": false,
|
||||||
"excludeSubmodules": false,
|
"excludeSubmodules": false,
|
||||||
|
"excludeSymlinks": false,
|
||||||
"failOnInitialDiffError": false,
|
"failOnInitialDiffError": false,
|
||||||
"failOnSubmoduleDiffError": false,
|
"failOnSubmoduleDiffError": false,
|
||||||
"fetchAdditionalSubmoduleHistory": false,
|
"fetchAdditionalSubmoduleHistory": false,
|
||||||
@@ -237,6 +244,7 @@ exports[`getInputs should handle invalid numeric inputs correctly 1`] = `
|
|||||||
"since": "",
|
"since": "",
|
||||||
"sinceLastRemoteCommit": false,
|
"sinceLastRemoteCommit": false,
|
||||||
"skipInitialFetch": false,
|
"skipInitialFetch": false,
|
||||||
|
"skipSameSha": false,
|
||||||
"tagsIgnorePattern": "",
|
"tagsIgnorePattern": "",
|
||||||
"tagsPattern": "",
|
"tagsPattern": "",
|
||||||
"token": "",
|
"token": "",
|
||||||
@@ -260,6 +268,7 @@ exports[`getInputs should handle negative numeric inputs correctly 1`] = `
|
|||||||
"dirNamesMaxDepth": -2,
|
"dirNamesMaxDepth": -2,
|
||||||
"escapeJson": false,
|
"escapeJson": false,
|
||||||
"excludeSubmodules": false,
|
"excludeSubmodules": false,
|
||||||
|
"excludeSymlinks": false,
|
||||||
"failOnInitialDiffError": false,
|
"failOnInitialDiffError": false,
|
||||||
"failOnSubmoduleDiffError": false,
|
"failOnSubmoduleDiffError": false,
|
||||||
"fetchAdditionalSubmoduleHistory": false,
|
"fetchAdditionalSubmoduleHistory": false,
|
||||||
@@ -299,6 +308,7 @@ exports[`getInputs should handle negative numeric inputs correctly 1`] = `
|
|||||||
"since": "",
|
"since": "",
|
||||||
"sinceLastRemoteCommit": false,
|
"sinceLastRemoteCommit": false,
|
||||||
"skipInitialFetch": false,
|
"skipInitialFetch": false,
|
||||||
|
"skipSameSha": false,
|
||||||
"tagsIgnorePattern": "",
|
"tagsIgnorePattern": "",
|
||||||
"tagsPattern": "",
|
"tagsPattern": "",
|
||||||
"token": "",
|
"token": "",
|
||||||
@@ -321,6 +331,7 @@ exports[`getInputs should return default values when no inputs are provided 1`]
|
|||||||
"dirNamesIncludeFilesSeparator": "",
|
"dirNamesIncludeFilesSeparator": "",
|
||||||
"escapeJson": false,
|
"escapeJson": false,
|
||||||
"excludeSubmodules": false,
|
"excludeSubmodules": false,
|
||||||
|
"excludeSymlinks": false,
|
||||||
"failOnInitialDiffError": false,
|
"failOnInitialDiffError": false,
|
||||||
"failOnSubmoduleDiffError": false,
|
"failOnSubmoduleDiffError": false,
|
||||||
"fetchAdditionalSubmoduleHistory": false,
|
"fetchAdditionalSubmoduleHistory": false,
|
||||||
@@ -362,6 +373,7 @@ exports[`getInputs should return default values when no inputs are provided 1`]
|
|||||||
"since": "",
|
"since": "",
|
||||||
"sinceLastRemoteCommit": false,
|
"sinceLastRemoteCommit": false,
|
||||||
"skipInitialFetch": false,
|
"skipInitialFetch": false,
|
||||||
|
"skipSameSha": false,
|
||||||
"tagsIgnorePattern": "",
|
"tagsIgnorePattern": "",
|
||||||
"tagsPattern": "*",
|
"tagsPattern": "*",
|
||||||
"token": "",
|
"token": "",
|
||||||
|
|||||||
@@ -639,6 +639,8 @@ describe('utils test', () => {
|
|||||||
negationPatternsFirst: false,
|
negationPatternsFirst: false,
|
||||||
useRestApi: false,
|
useRestApi: false,
|
||||||
excludeSubmodules: false,
|
excludeSubmodules: false,
|
||||||
|
excludeSymlinks: false,
|
||||||
|
skipSameSha: false,
|
||||||
fetchMissingHistoryMaxRetries: 20,
|
fetchMissingHistoryMaxRetries: 20,
|
||||||
usePosixPathSeparator: false,
|
usePosixPathSeparator: false,
|
||||||
tagsPattern: '*',
|
tagsPattern: '*',
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ import {
|
|||||||
getFilteredChangedFiles,
|
getFilteredChangedFiles,
|
||||||
gitRenamedFiles,
|
gitRenamedFiles,
|
||||||
gitSubmoduleDiffSHA,
|
gitSubmoduleDiffSHA,
|
||||||
|
isSymlinkInGitTree,
|
||||||
|
isSymlinkOnDisk,
|
||||||
isWindows,
|
isWindows,
|
||||||
jsonOutput,
|
jsonOutput,
|
||||||
setArrayOutput
|
setArrayOutput
|
||||||
@@ -220,7 +222,8 @@ export const getAllDiffFiles = async ({
|
|||||||
outputRenamedFilesAsDeletedAndAdded,
|
outputRenamedFilesAsDeletedAndAdded,
|
||||||
fetchAdditionalSubmoduleHistory,
|
fetchAdditionalSubmoduleHistory,
|
||||||
failOnInitialDiffError,
|
failOnInitialDiffError,
|
||||||
failOnSubmoduleDiffError
|
failOnSubmoduleDiffError,
|
||||||
|
submoduleShas
|
||||||
}: {
|
}: {
|
||||||
workingDirectory: string
|
workingDirectory: string
|
||||||
diffSubmodule: boolean
|
diffSubmodule: boolean
|
||||||
@@ -230,6 +233,7 @@ export const getAllDiffFiles = async ({
|
|||||||
fetchAdditionalSubmoduleHistory: boolean
|
fetchAdditionalSubmoduleHistory: boolean
|
||||||
failOnInitialDiffError: boolean
|
failOnInitialDiffError: boolean
|
||||||
failOnSubmoduleDiffError: boolean
|
failOnSubmoduleDiffError: boolean
|
||||||
|
submoduleShas?: Record<string, {previousSha?: string; currentSha?: string}>
|
||||||
}): Promise<ChangedFiles> => {
|
}): Promise<ChangedFiles> => {
|
||||||
const files = await getAllChangedFiles({
|
const files = await getAllChangedFiles({
|
||||||
cwd: workingDirectory,
|
cwd: workingDirectory,
|
||||||
@@ -256,6 +260,9 @@ export const getAllDiffFiles = async ({
|
|||||||
)
|
)
|
||||||
|
|
||||||
if (submoduleShaResult.currentSha && submoduleShaResult.previousSha) {
|
if (submoduleShaResult.currentSha && submoduleShaResult.previousSha) {
|
||||||
|
if (submoduleShas) {
|
||||||
|
submoduleShas[submodulePath] = submoduleShaResult
|
||||||
|
}
|
||||||
let diff = '...'
|
let diff = '...'
|
||||||
|
|
||||||
if (
|
if (
|
||||||
@@ -300,6 +307,139 @@ export const getAllDiffFiles = async ({
|
|||||||
return files
|
return files
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const filterSymlinksFromChangedFiles = async ({
|
||||||
|
changedFiles,
|
||||||
|
workingDirectory,
|
||||||
|
diffResult,
|
||||||
|
submodulePaths,
|
||||||
|
submoduleShas
|
||||||
|
}: {
|
||||||
|
changedFiles: ChangedFiles
|
||||||
|
workingDirectory: string
|
||||||
|
diffResult: DiffResult
|
||||||
|
submodulePaths: string[]
|
||||||
|
submoduleShas?: Record<string, {previousSha?: string; currentSha?: string}>
|
||||||
|
}): Promise<ChangedFiles> => {
|
||||||
|
const filtered: ChangedFiles = {
|
||||||
|
[ChangeTypeEnum.Added]: [],
|
||||||
|
[ChangeTypeEnum.Copied]: [],
|
||||||
|
[ChangeTypeEnum.Deleted]: [],
|
||||||
|
[ChangeTypeEnum.Modified]: [],
|
||||||
|
[ChangeTypeEnum.Renamed]: [],
|
||||||
|
[ChangeTypeEnum.TypeChanged]: [],
|
||||||
|
[ChangeTypeEnum.Unmerged]: [],
|
||||||
|
[ChangeTypeEnum.Unknown]: []
|
||||||
|
}
|
||||||
|
|
||||||
|
const cache = new Map<string, boolean>()
|
||||||
|
const diskCache = new Map<string, boolean>()
|
||||||
|
|
||||||
|
const getSubmoduleContext = (
|
||||||
|
filePath: string
|
||||||
|
): {
|
||||||
|
cwd: string
|
||||||
|
relativePath: string
|
||||||
|
currentSha: string
|
||||||
|
previousSha: string
|
||||||
|
isSubmoduleRoot: boolean
|
||||||
|
} => {
|
||||||
|
const submodulePath = submodulePaths.find(p =>
|
||||||
|
filePath.startsWith(`${p}${path.sep}`)
|
||||||
|
)
|
||||||
|
if (!submodulePath) {
|
||||||
|
return {
|
||||||
|
cwd: workingDirectory,
|
||||||
|
relativePath: filePath,
|
||||||
|
currentSha: diffResult.currentSha,
|
||||||
|
previousSha: diffResult.previousSha,
|
||||||
|
isSubmoduleRoot: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (filePath === submodulePath) {
|
||||||
|
return {
|
||||||
|
cwd: workingDirectory,
|
||||||
|
relativePath: filePath,
|
||||||
|
currentSha: diffResult.currentSha,
|
||||||
|
previousSha: diffResult.previousSha,
|
||||||
|
isSubmoduleRoot: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const submoduleWorkingDirectory = path.join(workingDirectory, submodulePath)
|
||||||
|
const relativePath = filePath.substring(submodulePath.length + 1)
|
||||||
|
const submoduleSha = submoduleShas?.[submodulePath]
|
||||||
|
|
||||||
|
return {
|
||||||
|
cwd: submoduleWorkingDirectory,
|
||||||
|
relativePath,
|
||||||
|
currentSha: submoduleSha?.currentSha || diffResult.currentSha,
|
||||||
|
previousSha: submoduleSha?.previousSha || diffResult.previousSha,
|
||||||
|
isSubmoduleRoot: false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const isSymlinkCached = async ({
|
||||||
|
cwd,
|
||||||
|
filePath,
|
||||||
|
sha,
|
||||||
|
preferDisk
|
||||||
|
}: {
|
||||||
|
cwd: string
|
||||||
|
filePath: string
|
||||||
|
sha: string
|
||||||
|
preferDisk: boolean
|
||||||
|
}): Promise<boolean> => {
|
||||||
|
if (preferDisk) {
|
||||||
|
const diskKey = `${cwd}|disk|${filePath}`
|
||||||
|
const cachedDisk = diskCache.get(diskKey)
|
||||||
|
if (cachedDisk !== undefined) {
|
||||||
|
return cachedDisk
|
||||||
|
}
|
||||||
|
const diskResult = await isSymlinkOnDisk({cwd, filePath})
|
||||||
|
diskCache.set(diskKey, diskResult)
|
||||||
|
if (diskResult) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const treeKey = `${cwd}|${sha}|${filePath}`
|
||||||
|
const cachedTree = cache.get(treeKey)
|
||||||
|
if (cachedTree !== undefined) {
|
||||||
|
return cachedTree
|
||||||
|
}
|
||||||
|
const treeResult = await isSymlinkInGitTree({cwd, sha, filePath})
|
||||||
|
cache.set(treeKey, treeResult)
|
||||||
|
return treeResult
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const changeType of Object.keys(changedFiles) as ChangeTypeEnum[]) {
|
||||||
|
const files = changedFiles[changeType] || []
|
||||||
|
for (const filePath of files) {
|
||||||
|
const context = getSubmoduleContext(filePath)
|
||||||
|
if (context.isSubmoduleRoot) {
|
||||||
|
filtered[changeType].push(filePath)
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
|
const isDeleted = changeType === ChangeTypeEnum.Deleted
|
||||||
|
const sha = isDeleted ? context.previousSha : context.currentSha
|
||||||
|
const isSymlink = await isSymlinkCached({
|
||||||
|
cwd: context.cwd,
|
||||||
|
filePath: context.relativePath,
|
||||||
|
sha,
|
||||||
|
preferDisk: !isDeleted
|
||||||
|
})
|
||||||
|
|
||||||
|
if (!isSymlink) {
|
||||||
|
filtered[changeType].push(filePath)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return filtered
|
||||||
|
}
|
||||||
|
|
||||||
function* getFilePaths({
|
function* getFilePaths({
|
||||||
inputs,
|
inputs,
|
||||||
filePaths,
|
filePaths,
|
||||||
|
|||||||
@@ -84,6 +84,7 @@ export interface DiffResult {
|
|||||||
targetBranch: string
|
targetBranch: string
|
||||||
diff: string
|
diff: string
|
||||||
initialCommit?: boolean
|
initialCommit?: boolean
|
||||||
|
sameSha?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
interface SHAForNonPullRequestEvent {
|
interface SHAForNonPullRequestEvent {
|
||||||
@@ -198,6 +199,19 @@ export const getSHAForNonPullRequestEvent = async ({
|
|||||||
|
|
||||||
if (inputs.baseSha && inputs.sha && currentBranch && targetBranch) {
|
if (inputs.baseSha && inputs.sha && currentBranch && targetBranch) {
|
||||||
if (previousSha === currentSha) {
|
if (previousSha === currentSha) {
|
||||||
|
if (inputs.skipSameSha) {
|
||||||
|
core.info(
|
||||||
|
`Skipping diff because previous sha ${previousSha} is equivalent to the current sha ${currentSha}.`
|
||||||
|
)
|
||||||
|
return {
|
||||||
|
previousSha,
|
||||||
|
currentSha,
|
||||||
|
currentBranch,
|
||||||
|
targetBranch,
|
||||||
|
diff,
|
||||||
|
sameSha: true
|
||||||
|
}
|
||||||
|
}
|
||||||
core.error(
|
core.error(
|
||||||
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
|
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
|
||||||
)
|
)
|
||||||
@@ -305,6 +319,19 @@ export const getSHAForNonPullRequestEvent = async ({
|
|||||||
core.debug(`Current branch: ${currentBranch}`)
|
core.debug(`Current branch: ${currentBranch}`)
|
||||||
|
|
||||||
if (!initialCommit && previousSha === currentSha) {
|
if (!initialCommit && previousSha === currentSha) {
|
||||||
|
if (inputs.skipSameSha) {
|
||||||
|
core.info(
|
||||||
|
`Skipping diff because previous sha ${previousSha} is equivalent to the current sha ${currentSha}.`
|
||||||
|
)
|
||||||
|
return {
|
||||||
|
previousSha,
|
||||||
|
currentSha,
|
||||||
|
currentBranch,
|
||||||
|
targetBranch,
|
||||||
|
diff,
|
||||||
|
sameSha: true
|
||||||
|
}
|
||||||
|
}
|
||||||
core.error(
|
core.error(
|
||||||
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
|
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
|
||||||
)
|
)
|
||||||
@@ -430,6 +457,19 @@ export const getSHAForPullRequestEvent = async ({
|
|||||||
|
|
||||||
if (inputs.baseSha && inputs.sha && currentBranch && targetBranch) {
|
if (inputs.baseSha && inputs.sha && currentBranch && targetBranch) {
|
||||||
if (previousSha === currentSha) {
|
if (previousSha === currentSha) {
|
||||||
|
if (inputs.skipSameSha) {
|
||||||
|
core.info(
|
||||||
|
`Skipping diff because previous sha ${previousSha} is equivalent to the current sha ${currentSha}.`
|
||||||
|
)
|
||||||
|
return {
|
||||||
|
previousSha,
|
||||||
|
currentSha,
|
||||||
|
currentBranch,
|
||||||
|
targetBranch,
|
||||||
|
diff,
|
||||||
|
sameSha: true
|
||||||
|
}
|
||||||
|
}
|
||||||
core.error(
|
core.error(
|
||||||
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
|
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
|
||||||
)
|
)
|
||||||
@@ -608,6 +648,19 @@ export const getSHAForPullRequestEvent = async ({
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (previousSha === currentSha) {
|
if (previousSha === currentSha) {
|
||||||
|
if (inputs.skipSameSha) {
|
||||||
|
core.info(
|
||||||
|
`Skipping diff because previous sha ${previousSha} is equivalent to the current sha ${currentSha}.`
|
||||||
|
)
|
||||||
|
return {
|
||||||
|
previousSha,
|
||||||
|
currentSha,
|
||||||
|
currentBranch,
|
||||||
|
targetBranch,
|
||||||
|
diff,
|
||||||
|
sameSha: true
|
||||||
|
}
|
||||||
|
}
|
||||||
core.error(
|
core.error(
|
||||||
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
|
`Similar commit hashes detected: previous sha: ${previousSha} is equivalent to the current sha: ${currentSha}.`
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ export const DEFAULT_VALUES_OF_UNSUPPORTED_API_INPUTS: Partial<Inputs> = {
|
|||||||
fetchAdditionalSubmoduleHistory: false,
|
fetchAdditionalSubmoduleHistory: false,
|
||||||
dirNamesDeletedFilesIncludeOnlyDeletedDirs: false,
|
dirNamesDeletedFilesIncludeOnlyDeletedDirs: false,
|
||||||
excludeSubmodules: false,
|
excludeSubmodules: false,
|
||||||
|
excludeSymlinks: false,
|
||||||
|
skipSameSha: false,
|
||||||
fetchMissingHistoryMaxRetries: 20,
|
fetchMissingHistoryMaxRetries: 20,
|
||||||
usePosixPathSeparator: false,
|
usePosixPathSeparator: false,
|
||||||
tagsPattern: '*',
|
tagsPattern: '*',
|
||||||
|
|||||||
@@ -55,6 +55,8 @@ export type Inputs = {
|
|||||||
negationPatternsFirst: boolean
|
negationPatternsFirst: boolean
|
||||||
useRestApi: boolean
|
useRestApi: boolean
|
||||||
excludeSubmodules: boolean
|
excludeSubmodules: boolean
|
||||||
|
excludeSymlinks: boolean
|
||||||
|
skipSameSha: boolean
|
||||||
fetchMissingHistoryMaxRetries?: number
|
fetchMissingHistoryMaxRetries?: number
|
||||||
usePosixPathSeparator: boolean
|
usePosixPathSeparator: boolean
|
||||||
tagsPattern: string
|
tagsPattern: string
|
||||||
@@ -249,6 +251,14 @@ export const getInputs = (): Inputs => {
|
|||||||
required: false
|
required: false
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const excludeSymlinks = core.getBooleanInput('exclude_symlinks', {
|
||||||
|
required: false
|
||||||
|
})
|
||||||
|
|
||||||
|
const skipSameSha = core.getBooleanInput('skip_same_sha', {
|
||||||
|
required: false
|
||||||
|
})
|
||||||
|
|
||||||
const fetchMissingHistoryMaxRetries = core.getInput(
|
const fetchMissingHistoryMaxRetries = core.getInput(
|
||||||
'fetch_missing_history_max_retries',
|
'fetch_missing_history_max_retries',
|
||||||
{required: false}
|
{required: false}
|
||||||
@@ -310,6 +320,8 @@ export const getInputs = (): Inputs => {
|
|||||||
fetchAdditionalSubmoduleHistory,
|
fetchAdditionalSubmoduleHistory,
|
||||||
dirNamesDeletedFilesIncludeOnlyDeletedDirs,
|
dirNamesDeletedFilesIncludeOnlyDeletedDirs,
|
||||||
excludeSubmodules,
|
excludeSubmodules,
|
||||||
|
excludeSymlinks,
|
||||||
|
skipSameSha,
|
||||||
usePosixPathSeparator,
|
usePosixPathSeparator,
|
||||||
tagsPattern,
|
tagsPattern,
|
||||||
tagsIgnorePattern,
|
tagsIgnorePattern,
|
||||||
|
|||||||
66
src/main.ts
66
src/main.ts
@@ -5,8 +5,10 @@ import {
|
|||||||
processChangedFiles,
|
processChangedFiles,
|
||||||
ChangeTypeEnum,
|
ChangeTypeEnum,
|
||||||
getAllDiffFiles,
|
getAllDiffFiles,
|
||||||
|
filterSymlinksFromChangedFiles,
|
||||||
getChangedFilesFromGithubAPI,
|
getChangedFilesFromGithubAPI,
|
||||||
getRenamedFiles
|
getRenamedFiles,
|
||||||
|
ChangedFiles
|
||||||
} from './changedFiles'
|
} from './changedFiles'
|
||||||
import {
|
import {
|
||||||
DiffResult,
|
DiffResult,
|
||||||
@@ -127,11 +129,57 @@ const getChangedFilesFromLocalGitHistory = async ({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (diffResult.sameSha) {
|
||||||
|
core.info('Base and head SHAs are identical; no changed files to report.')
|
||||||
|
const emptyChangedFiles: ChangedFiles = {
|
||||||
|
[ChangeTypeEnum.Added]: [],
|
||||||
|
[ChangeTypeEnum.Copied]: [],
|
||||||
|
[ChangeTypeEnum.Deleted]: [],
|
||||||
|
[ChangeTypeEnum.Modified]: [],
|
||||||
|
[ChangeTypeEnum.Renamed]: [],
|
||||||
|
[ChangeTypeEnum.TypeChanged]: [],
|
||||||
|
[ChangeTypeEnum.Unmerged]: [],
|
||||||
|
[ChangeTypeEnum.Unknown]: []
|
||||||
|
}
|
||||||
|
await processChangedFiles({
|
||||||
|
filePatterns,
|
||||||
|
allDiffFiles: emptyChangedFiles,
|
||||||
|
inputs,
|
||||||
|
yamlFilePatterns,
|
||||||
|
workingDirectory
|
||||||
|
})
|
||||||
|
|
||||||
|
if (inputs.includeAllOldNewRenamedFiles) {
|
||||||
|
await setOutput({
|
||||||
|
key: 'all_old_new_renamed_files',
|
||||||
|
value: inputs.json ? [] : '',
|
||||||
|
writeOutputFiles: inputs.writeOutputFiles,
|
||||||
|
outputDir: inputs.outputDir,
|
||||||
|
json: inputs.json,
|
||||||
|
safeOutput: inputs.safeOutput
|
||||||
|
})
|
||||||
|
await setOutput({
|
||||||
|
key: 'all_old_new_renamed_files_count',
|
||||||
|
value: '0',
|
||||||
|
writeOutputFiles: inputs.writeOutputFiles,
|
||||||
|
outputDir: inputs.outputDir,
|
||||||
|
json: inputs.json
|
||||||
|
})
|
||||||
|
}
|
||||||
|
core.info('All Done!')
|
||||||
|
core.endGroup()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
core.info(
|
core.info(
|
||||||
`Retrieving changes between ${diffResult.previousSha} (${diffResult.targetBranch}) → ${diffResult.currentSha} (${diffResult.currentBranch})`
|
`Retrieving changes between ${diffResult.previousSha} (${diffResult.targetBranch}) → ${diffResult.currentSha} (${diffResult.currentBranch})`
|
||||||
)
|
)
|
||||||
|
|
||||||
const allDiffFiles = await getAllDiffFiles({
|
const submoduleShas: Record<
|
||||||
|
string,
|
||||||
|
{previousSha?: string; currentSha?: string}
|
||||||
|
> = {}
|
||||||
|
let allDiffFiles = await getAllDiffFiles({
|
||||||
workingDirectory,
|
workingDirectory,
|
||||||
diffSubmodule,
|
diffSubmodule,
|
||||||
diffResult,
|
diffResult,
|
||||||
@@ -139,8 +187,20 @@ const getChangedFilesFromLocalGitHistory = async ({
|
|||||||
outputRenamedFilesAsDeletedAndAdded,
|
outputRenamedFilesAsDeletedAndAdded,
|
||||||
fetchAdditionalSubmoduleHistory: inputs.fetchAdditionalSubmoduleHistory,
|
fetchAdditionalSubmoduleHistory: inputs.fetchAdditionalSubmoduleHistory,
|
||||||
failOnInitialDiffError: inputs.failOnInitialDiffError,
|
failOnInitialDiffError: inputs.failOnInitialDiffError,
|
||||||
failOnSubmoduleDiffError: inputs.failOnSubmoduleDiffError
|
failOnSubmoduleDiffError: inputs.failOnSubmoduleDiffError,
|
||||||
|
submoduleShas
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if (inputs.excludeSymlinks) {
|
||||||
|
core.info('Excluding symlinks from the diff')
|
||||||
|
allDiffFiles = await filterSymlinksFromChangedFiles({
|
||||||
|
changedFiles: allDiffFiles,
|
||||||
|
workingDirectory,
|
||||||
|
diffResult,
|
||||||
|
submodulePaths,
|
||||||
|
submoduleShas
|
||||||
|
})
|
||||||
|
}
|
||||||
core.debug(`All diff files: ${JSON.stringify(allDiffFiles)}`)
|
core.debug(`All diff files: ${JSON.stringify(allDiffFiles)}`)
|
||||||
core.info('All Done!')
|
core.info('All Done!')
|
||||||
core.endGroup()
|
core.endGroup()
|
||||||
|
|||||||
110
src/utils.ts
110
src/utils.ts
@@ -152,6 +152,69 @@ export const exists = async (filePath: string): Promise<boolean> => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if a file is a symlink on disk
|
||||||
|
* @param cwd - working directory
|
||||||
|
* @param filePath - path to check
|
||||||
|
* @returns file is a symlink
|
||||||
|
*/
|
||||||
|
export const isSymlinkOnDisk = async ({
|
||||||
|
cwd,
|
||||||
|
filePath
|
||||||
|
}: {
|
||||||
|
cwd: string
|
||||||
|
filePath: string
|
||||||
|
}): Promise<boolean> => {
|
||||||
|
try {
|
||||||
|
const stat = await fs.lstat(path.join(cwd, filePath))
|
||||||
|
return stat.isSymbolicLink()
|
||||||
|
} catch {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if a file is a symlink in a git tree
|
||||||
|
* @param cwd - working directory
|
||||||
|
* @param sha - commit sha
|
||||||
|
* @param filePath - path to check
|
||||||
|
* @returns file is a symlink
|
||||||
|
*/
|
||||||
|
export const isSymlinkInGitTree = async ({
|
||||||
|
cwd,
|
||||||
|
sha,
|
||||||
|
filePath
|
||||||
|
}: {
|
||||||
|
cwd: string
|
||||||
|
sha: string
|
||||||
|
filePath: string
|
||||||
|
}): Promise<boolean> => {
|
||||||
|
if (!sha) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
const {stdout, exitCode} = await exec.getExecOutput(
|
||||||
|
'git',
|
||||||
|
['ls-tree', '-r', sha, '--', filePath],
|
||||||
|
{
|
||||||
|
cwd,
|
||||||
|
ignoreReturnCode: true,
|
||||||
|
silent: !core.isDebug()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
|
if (exitCode !== 0) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
const line = stdout.split('\n').find(Boolean)
|
||||||
|
if (!line) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
const [mode] = line.split(/\s+/)
|
||||||
|
return mode === '120000'
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generates lines of a file as an async iterable iterator
|
* Generates lines of a file as an async iterable iterator
|
||||||
* @param filePath - path of file to read
|
* @param filePath - path of file to read
|
||||||
@@ -819,14 +882,49 @@ export const cleanShaInput = async ({
|
|||||||
|
|
||||||
if (exitCode !== 0) {
|
if (exitCode !== 0) {
|
||||||
const octokit = github.getOctokit(token)
|
const octokit = github.getOctokit(token)
|
||||||
// If it's not a valid commit sha, assume it's a branch name and get the HEAD sha
|
const owner = github.context.repo.owner
|
||||||
const {data: refData} = await octokit.rest.git.getRef({
|
const repo = github.context.repo.repo
|
||||||
owner: github.context.repo.owner,
|
const isNotFoundError = (error: unknown): boolean =>
|
||||||
repo: github.context.repo.repo,
|
typeof error === 'object' &&
|
||||||
ref: `heads/${sha}`
|
error !== null &&
|
||||||
|
'status' in error &&
|
||||||
|
(error as {status?: number}).status === 404
|
||||||
|
// If it's not a valid commit sha, assume it's a ref name first.
|
||||||
|
try {
|
||||||
|
const {data: refData} = await octokit.rest.git.getRef({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
ref: `heads/${sha}`
|
||||||
|
})
|
||||||
|
|
||||||
|
return refData.object.sha
|
||||||
|
} catch (error) {
|
||||||
|
if (!isNotFoundError(error)) {
|
||||||
|
throw error
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const {data: refData} = await octokit.rest.git.getRef({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
ref: `tags/${sha}`
|
||||||
|
})
|
||||||
|
|
||||||
|
return refData.object.sha
|
||||||
|
} catch (error) {
|
||||||
|
if (!isNotFoundError(error)) {
|
||||||
|
throw error
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const {data: commitData} = await octokit.rest.git.getCommit({
|
||||||
|
owner,
|
||||||
|
repo,
|
||||||
|
commit_sha: sha
|
||||||
})
|
})
|
||||||
|
|
||||||
return refData.object.sha
|
return commitData.sha
|
||||||
}
|
}
|
||||||
|
|
||||||
return stdout.trim()
|
return stdout.trim()
|
||||||
|
|||||||
1
test/symlink-target.txt
Normal file
1
test/symlink-target.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Symlink target fixture.
|
||||||
1
test/symlink-to-target
Symbolic link
1
test/symlink-to-target
Symbolic link
@@ -0,0 +1 @@
|
|||||||
|
symlink-target.txt
|
||||||
Reference in New Issue
Block a user