mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
Only write formatted files in CI when not in a PR
This commit is contained in:
parent
5e5f023b8a
commit
0bca16deb6
@ -72,26 +72,26 @@ jobs:
|
|||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: Lint and fix
|
- name: Lint and fix
|
||||||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' && github.repository == 'owncast/owncast'
|
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' && github.event_name != 'pull_request'
|
||||||
run: npx eslint --fix ${{ steps.changed-files-yaml.outputs.src_all_changed_files }}
|
run: npx eslint --fix ${{ steps.changed-files-yaml.outputs.src_all_changed_files }}
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' && github.repository != 'owncast/owncast'
|
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' && github.event_name == 'pull_request'
|
||||||
run: npx eslint --fix ${{ steps.changed-files-yaml.outputs.src_all_changed_files }}
|
run: npx eslint --fix ${{ steps.changed-files-yaml.outputs.src_all_changed_files }}
|
||||||
|
|
||||||
- name: Prettier formatting
|
- name: Prettier formatting
|
||||||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' && github.repository == 'owncast/owncast'
|
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' && github.event_name == 'pull_request'
|
||||||
run: npx prettier --write ${{ steps.changed-files-yaml.outputs.src_all_changed_files }}
|
run: npx prettier --write ${{ steps.changed-files-yaml.outputs.src_all_changed_files }}
|
||||||
|
|
||||||
- name: Prettier check
|
- name: Prettier check
|
||||||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' && github.repository != 'owncast/owncast'
|
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' && github.event_name != 'pull_request'
|
||||||
run: npx prettier ${{ steps.changed-files-yaml.outputs.src_all_changed_files }}
|
run: npx prettier ${{ steps.changed-files-yaml.outputs.src_all_changed_files }}
|
||||||
|
|
||||||
- name: Debug changed files output
|
- name: Debug changed files output
|
||||||
run: 'pwd && echo "Changed files: ${{ steps.changed-files-yaml.outputs.src_all_changed_files }}"'
|
run: 'pwd && echo "Changed files: ${{ steps.changed-files-yaml.outputs.src_all_changed_files }}"'
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' && github.repository == 'owncast/owncast'
|
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' && github.event_name != 'pull_request'
|
||||||
uses: EndBug/add-and-commit@v9
|
uses: EndBug/add-and-commit@v9
|
||||||
with:
|
with:
|
||||||
author_name: Owncast
|
author_name: Owncast
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user