@@ -24,68 +24,42 @@ jobs:
24
24
get_modified_files :
25
25
runs-on : ubuntu-latest
26
26
outputs :
27
- processed_files : ${{ steps.filter-modified-files.outputs.processed_files }}
28
- steps :
29
- - name : Checkout
30
- uses : actions/checkout@v4
31
- with :
32
- fetch-depth : 0
33
-
34
- - name : Setup Python
35
- uses : actions/setup-python@v4
36
- with :
37
- python-version : ' 3.x'
38
-
39
- - name : Install dependencies
40
- run : pip install pyyaml
27
+ processed_files : ${{ steps.modified-files.outputs.processed_files }}
41
28
42
- - name : Fetch base branch
43
- run : |
44
- git fetch origin +refs/heads/${{ github.event.pull_request.base.ref }}:refs/remotes/origin/${{ github.event.pull_request.base.ref }}
29
+ steps :
30
+ - name : ' Checkout'
31
+ uses : actions/checkout@v4
32
+ with :
33
+ fetch-depth : 2
45
34
46
- - name : Get list of changed files
47
- id : modified-files
48
- run : |
49
- git diff --name-only origin/${{ github.event.pull_request.base.ref }}...HEAD > changed_files.txt
50
- echo "changed files:"
51
- echo " "
52
- cat changed_files.txt
53
- files=$(paste -sd, changed_files.txt)
54
- echo "files=$files" >> $GITHUB_OUTPUT
35
+ - name : Setup Python
36
+ uses : actions/setup-python@v2
37
+ with :
38
+ python-version : ' 3.x'
55
39
56
- - name : Filter changed files
57
- id : filter-modified-files
58
- env :
59
- FILES : ${{ steps.modified-files.outputs.files }}
60
- run : |
61
- echo "Files to be processed $FILES"
62
- processed=$(echo "$FILES" | python3 .github/scripts/list_modified_scripts_with_secrets.py)
63
- echo "$processed"
64
- echo "processed_files<<EOF" >> $GITHUB_OUTPUT
65
- echo "$processed" >> $GITHUB_OUTPUT
66
- echo "EOF" >> $GITHUB_OUTPUT
40
+ - name : Install dependencies
41
+ run : |
42
+ pip install pyyaml
67
43
68
- - name : Debug processed_files output
69
- run : |
70
- echo "Processed files output:"
71
- echo "${{ steps.filter-modified-files.outputs.processed_files }}"
44
+ - name : Get changed files
45
+ id : modified-files
46
+ run : |
47
+ git remote add upstream ${{ github.event.pull_request.base.repo.clone_url }}
48
+ git fetch upstream
49
+ changed_files=$(git diff upstream/${{ github.event.pull_request.base.ref }} --name-only | paste -sd, -)
50
+ echo "$changed_files" | python3 .github/scripts/list_modified_files.py
72
51
73
52
process_modified_files :
74
53
needs :
75
54
- get_modified_files
76
55
- fetch-secret
77
56
runs-on : ubuntu-latest
78
- if : needs.get_modified_files.outputs.processed_files != '[]'
57
+ if : needs.get_modified_files.outputs.processed_files != '[]' && needs.get_modified_files.outputs.processed_files != ''
79
58
strategy :
80
59
fail-fast : false
81
60
matrix :
82
- file_info : ${{ fromJSON(needs.get_modified_files.outputs.processed_files) }}
61
+ file_info : ${{ fromJSON(needs.get_modified_files.outputs.processed_files).file_info }}
83
62
steps :
84
- - name : Checkout repository
85
- uses : actions/checkout@v4
86
- with :
87
- fetch-depth : 2
88
-
89
63
- name : Set RCLONE Service account env var from secret
90
64
shell : bash
91
65
run : |
0 commit comments