Rename workflow to file naming convention
This commit is contained in:
+10
-10
@@ -1,34 +1,34 @@
|
||||
name: Godot File Naming Lint
|
||||
name: Godot File Naming Convention
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
naming_convention:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Run naming linter
|
||||
id: lint
|
||||
- name: Run file naming convention check
|
||||
id: naming
|
||||
run: |
|
||||
python3 .github/scripts/check_file_naming.py > lint_output.txt
|
||||
python3 .github/scripts/check_file_naming.py > naming_convention_output.txt
|
||||
continue-on-error: true
|
||||
- name: Comment on PR with linter output
|
||||
if: steps.lint.outcome != 'success'
|
||||
- name: Comment on PR with naming convention output
|
||||
if: steps.naming.outcome != 'success'
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
const body = fs.readFileSync('lint_output.txt', 'utf8');
|
||||
const body = fs.readFileSync('naming_convention_output.txt', 'utf8');
|
||||
await github.rest.issues.createComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
body,
|
||||
});
|
||||
- name: Fail if linter failed
|
||||
if: steps.lint.outcome != 'success'
|
||||
- name: Fail if naming convention check failed
|
||||
if: steps.naming.outcome != 'success'
|
||||
run: exit 1
|
||||
Reference in New Issue
Block a user