|
31 | 31 | outputs: |
32 | 32 | ci: ${{ !contains(steps.metadata.outputs.dependency-names, 'swiftorg') }} |
33 | 33 | merge: ${{ steps.update-swiftorg.outputs.result == 'true' }} |
34 | | - approve: ${{ fromJSON(steps.changed-submodule-files.outputs.result).swift_release == 'true' }} |
| 34 | + approve: ${{ steps.changed-submodule-files.outputs.swift_release == 'true' }} |
35 | 35 |
|
36 | 36 | steps: |
37 | 37 | - name: Dependabot metadata |
@@ -79,39 +79,36 @@ jobs: |
79 | 79 | const parts = line.split('\t'); |
80 | 80 | return parts.length > 2 ? [parts[1], parts[2]] : [parts[1]]; |
81 | 81 | }).filter((file) => /(download\/(index.md|_older-releases.md)|_data\/builds\/.*)/.exec(file)); |
82 | | - return { |
83 | | - any_changed: files.length > 0, |
84 | | - swift_release: files.some(file => /_data\/builds\/(swift-.*-release.*|swift_releases\.yml)/.exec(file)) |
85 | | - }; |
| 82 | +
|
| 83 | + core.setOutput('any_changed', files.length > 0); |
| 84 | + core.setOutput('swift_release', files.some(file => /_data\/builds\/(swift-.*-release.*|swift_releases\.yml)/.exec(file))); |
86 | 85 | } catch (error) { |
87 | 86 | core.error(error); |
88 | | - return { |
89 | | - any_changed: true, |
90 | | - swift_release: false |
91 | | - }; |
| 87 | + core.setOutput('any_changed', true); |
| 88 | + core.setOutput('swift_release', false); |
92 | 89 | } |
93 | 90 |
|
94 | 91 | - name: Setup Node.js |
95 | | - if: fromJSON(steps.changed-submodule-files.outputs.result).any_changed == 'true' |
| 92 | + if: steps.changed-submodule-files.outputs.any_changed == 'true' |
96 | 93 | id: setup-node |
97 | 94 | uses: actions/setup-node@v3 |
98 | 95 | with: |
99 | 96 | cache: npm |
100 | 97 |
|
101 | 98 | - name: Cache dependencies |
102 | | - if: fromJSON(steps.changed-submodule-files.outputs.result).any_changed == 'true' |
| 99 | + if: steps.changed-submodule-files.outputs.any_changed == 'true' |
103 | 100 | id: cache-node |
104 | 101 | |
105 | 102 | with: |
106 | 103 | key: node-${{ github.ref }} |
107 | 104 | path: node_modules |
108 | 105 |
|
109 | 106 | - name: Setup npm pacakges |
110 | | - if: fromJSON(steps.changed-submodule-files.outputs.result).any_changed == 'true' |
| 107 | + if: steps.changed-submodule-files.outputs.any_changed == 'true' |
111 | 108 | run: npm install |
112 | 109 |
|
113 | 110 | - name: Update submodule ref in package.json |
114 | | - if: fromJSON(steps.changed-submodule-files.outputs.result).any_changed == 'true' |
| 111 | + if: steps.changed-submodule-files.outputs.any_changed == 'true' |
115 | 112 | id: update-swiftorg |
116 | 113 | uses: actions/github-script@v6 |
117 | 114 | with: |
|
0 commit comments