Skip to content

setup formatting ci with label #1

setup formatting ci with label

setup formatting ci with label #1

Workflow file for this run

name: Fix formatting
on:
pull_request:
types: [labeled]
permissions: {}
jobs:
format:
runs-on: ubuntu-latest
if: ${{ github.event.label.name == 'ci:format' }}
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Install dependencies
run: npm install
- name: Lint with expo
run: npx expo lint --fix
- name: Commit and push
uses: EndBug/add-and-commit
with:
default_author: github_actions
message: 'chore: fix formatting'
- name: Remove label
uses: actions/github-script
if: always()
with:
script: |
github.rest.issues.removeLabel({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: 'ci:format'
})