|
35 | 35 | outputs: |
36 | 36 | files_changed: ${{ steps.changed_files.outputs.files_changed }} |
37 | 37 | permissions: |
38 | | - contents: write |
39 | | - pull-requests: read |
| 38 | + contents: read |
| 39 | + pull-requests: write |
40 | 40 | steps: |
41 | 41 | - name: Harden the runner (Audit all outbound calls) |
42 | 42 | uses: step-security/harden-runner@4d991eb9b905ef189e4c376166672c3f2f230481 # v2.11.0 |
|
75 | 75 | - name: Run build and test |
76 | 76 | run: | |
77 | 77 | yarn all |
78 | | - env: |
79 | | - GITHUB_EVENT_PULL_REQUEST_HEAD_REPO_FORK: ${{ github.event.pull_request.head.repo.fork }} |
| 78 | +
|
80 | 79 |
|
81 | 80 | # - name: Verify Changed files |
82 | 81 | # uses: tj-actions/verify-changed-files@v20 |
|
87 | 86 | # src |
88 | 87 | # dist |
89 | 88 |
|
90 | | - - name: Commit files |
91 | | - if: steps.changed_files.outputs.files_changed == 'true' && github.event_name == 'pull_request' |
92 | | - run: | |
93 | | - git config --local user.email "action@github.com" |
94 | | - git config --local user.name "GitHub Action" |
95 | | - git add src dist |
96 | | - git commit -m "Added missing changes and modified dist assets." |
97 | | -
|
98 | | - - name: Push changes |
99 | | - if: steps.changed_files.outputs.files_changed == 'true' && github.event_name == 'pull_request' |
100 | | - continue-on-error: true |
101 | | - uses: ad-m/github-push-action@77c5b412c50b723d2a4fbc6d71fb5723bcd439aa # master |
102 | | - with: |
103 | | - github_token: ${{ secrets.GITHUB_TOKEN }} |
104 | | - branch: ${{ github.head_ref }} |
105 | | - |
106 | | - - name: Upload build assets |
107 | | - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 |
108 | | - with: |
109 | | - name: build-assets |
110 | | - path: dist |
111 | | - |
112 | | - - name: Run codacy-coverage-reporter |
113 | | - uses: codacy/codacy-coverage-reporter-action@89d6c85cfafaec52c72b6c5e8b2878d33104c699 # v1.3.0 |
114 | | - continue-on-error: true |
115 | | - with: |
116 | | - project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} |
117 | | - coverage-reports: coverage/lcov.info |
118 | 89 |
|
119 | 90 | # test-multiple-repositories: |
120 | 91 | # name: Test with multiple repositories |
|
0 commit comments