mirror of
https://github.com/owncast/owncast.git
synced 2024-11-28 11:09:01 +03:00
Only try to commit formated files if running on the owncast/owncast repo
This commit is contained in:
parent
02bfc6b3d9
commit
5e5f023b8a
1 changed files with 13 additions and 5 deletions
|
@ -71,19 +71,27 @@ jobs:
|
|||
- name: Install Dependencies
|
||||
run: npm install
|
||||
|
||||
- name: Lint
|
||||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true'
|
||||
- name: Lint and fix
|
||||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' && github.repository == 'owncast/owncast'
|
||||
run: npx eslint --fix ${{ steps.changed-files-yaml.outputs.src_all_changed_files }}
|
||||
|
||||
- name: Prettier
|
||||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true'
|
||||
- name: Lint
|
||||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' && github.repository != 'owncast/owncast'
|
||||
run: npx eslint --fix ${{ steps.changed-files-yaml.outputs.src_all_changed_files }}
|
||||
|
||||
- name: Prettier formatting
|
||||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' && github.repository == 'owncast/owncast'
|
||||
run: npx prettier --write ${{ steps.changed-files-yaml.outputs.src_all_changed_files }}
|
||||
|
||||
- name: Prettier check
|
||||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' && github.repository != 'owncast/owncast'
|
||||
run: npx prettier ${{ steps.changed-files-yaml.outputs.src_all_changed_files }}
|
||||
|
||||
- name: Debug changed files output
|
||||
run: 'pwd && echo "Changed files: ${{ steps.changed-files-yaml.outputs.src_all_changed_files }}"'
|
||||
|
||||
- name: Commit changes
|
||||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true'
|
||||
if: steps.changed-files-yaml.outputs.src_any_changed == 'true' && github.repository == 'owncast/owncast'
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
author_name: Owncast
|
||||
|
|
Loading…
Reference in a new issue