Skip to content

Commit 28cb854

Browse files
authored
Update ci.yml
1 parent ae6abcc commit 28cb854

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,58 @@ on:
1212

1313
jobs:
1414
test-v35:
15+
name: Test changed-files v35
16+
runs-on: ${{ matrix.platform }}
17+
strategy:
18+
fail-fast: false
19+
max-parallel: 4
20+
matrix:
21+
platform: [ubuntu-latest, ubuntu-22.04, windows-latest, macos-latest, macos-11, windows-2022]
22+
fetch-depth: [0, 1, 2]
23+
24+
steps:
25+
- uses: actions/checkout@v3
26+
with:
27+
fetch-depth: ${{ matrix.fetch-depth }}
28+
29+
- name: Get changed files
30+
id: changed-files
31+
uses: tj-actions/changed-files@v35
32+
33+
- run: |
34+
echo "id=$(git merge-base $GITHUB_EVENT_PULL_REQUEST_BASE_SHA $GITHUB_SHA)" >> $GITHUB_OUTPUT
35+
env:
36+
GITHUB_EVENT_PULL_REQUEST_BASE_SHA: ${{ github.event.pull_request.base.sha }}
37+
GITHUB_EVENT_PULL_REQUEST_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
38+
GITHUB_SHA: ${{ github.sha }}
39+
shell: bash
40+
id: merge_base
41+
if: always()
42+
43+
- run: |
44+
echo "The merge base of the current branch and the base branch is: ${{ steps.merge_base.outputs.id }}"
45+
shell: bash
46+
if: always()
47+
48+
- name: Show output
49+
run: |
50+
echo '${{ toJSON(steps.changed-files.outputs) }}'
51+
shell:
52+
bash
53+
54+
- name: Get changed files in the .github folder
55+
id: changed-files-specific
56+
uses: tj-actions/changed-files@v35
57+
with:
58+
files: .github/**
59+
60+
- name: Run step if any file(s) in the .github folder change
61+
if: steps.changed-files-specific.outputs.any_changed == 'true'
62+
run: |
63+
echo "One or more files in the .github folder has changed."
64+
echo "List all the files that have changed: ${{ steps.changed-files-specific.outputs.all_changed_files }}"
65+
66+
test-v36:
1567
name: Test changed-files v36
1668
runs-on: ${{ matrix.platform }}
1769
strategy:

0 commit comments

Comments
 (0)