Skip to content

Add precious workflow #1

Add precious workflow

Add precious workflow #1

Workflow file for this run

name: Precious
on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch:
jobs:
code-formatting:
runs-on: ubuntu-latest
name: Code Formatting
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install precious
run: ./bin/install-precious /usr/local/bin
- name: Select files
id: select-files
run: |
if [[ -n "${{ github.event.pull_request.number }}" ]]; then
echo 'precious-args=--git-diff-from upstream' >> "$GITHUB_OUTPUT"
else
echo 'precious-args=--all' >> "$GITHUB_OUTPUT"
fi
- name: Lint files
run: precious lint ${{ steps.select-files.outputs.precious-args }}