Skip to content

Merge pull request #4 from rocky-linux/fix/automation-ids-navigation #9

Merge pull request #4 from rocky-linux/fix/automation-ids-navigation

Merge pull request #4 from rocky-linux/fix/automation-ids-navigation #9

Workflow file for this run

name: Format
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
format:
name: Prettier
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Check formatting
id: format
run: npm run format:check
continue-on-error: true
- name: Create Status Comment
if: github.event_name == 'pull_request' && steps.format.outcome == 'failure'
uses: actions/github-script@v7
with:
script: |
const message = `## Format Check Results\n\n❌ Prettier format check failed. Please run \`npm run format\` to fix formatting issues.`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: message
});
- name: Check for failures
if: steps.format.outcome == 'failure'
run: exit 1