Skip to content

chore: update features line to be compact and apt #1

chore: update features line to be compact and apt

chore: update features line to be compact and apt #1

Workflow file for this run

name: Format Nixopus
on:
pull_request:
paths:
- 'api/**'
- 'view/**'
push:
branches:
- '*'
paths:
- 'api/**'
- 'view/**'
permissions:
contents: write
pull-requests: write
jobs:
format-api:
name: Format API
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-go@v5
with:
go-version: '1.22'
check-latest: true
cache: true
cache-dependency-path: api/go.sum
- name: Run gofmt
working-directory: api
run: |
echo "Running gofmt..."
gofmt -l -w .
git status
- name: Commit API changes
id: api-commit
if: github.event_name == 'pull_request'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'style(api): format Go code'
branch: ${{ github.head_ref }}
file_pattern: 'api/**/*.go'
commit_user_name: 'github-actions[bot]'
commit_user_email: 'github-actions[bot]@users.noreply.github.com'
skip_dirty_check: false
skip_fetch: true
skip_checkout: true
disable_globbing: false
format-view:
name: Format View
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
cache-dependency-path: view/yarn.lock
- name: Install Yarn
run: npm install -g yarn
- name: Install dependencies
working-directory: view
run: yarn install --frozen-lockfile
- name: Run Prettier
working-directory: view
run: yarn format
- name: Commit View changes
id: view-commit
if: github.event_name == 'pull_request'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: 'style(view): format frontend code'
branch: ${{ github.head_ref }}
file_pattern: 'view/**'
commit_user_name: 'github-actions[bot]'
commit_user_email: 'github-actions[bot]@users.noreply.github.com'
skip_dirty_check: false
skip_fetch: true
skip_checkout: true
disable_globbing: false