Skip to content

chore(garnix): remove garbage #170

chore(garnix): remove garbage

chore(garnix): remove garbage #170

Workflow file for this run

name: Format Code
on:
push:
workflow_dispatch:
jobs:
format:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: ahmadnassri/action-workflow-queue@v1
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/flakehub-cache-action@main
- name: Install formatting tools
run: nix-env -f "<nixpkgs>" -iA nixfmt-rfc-style treefmt yamlfmt jsonfmt markdownlint-cli
- name: Add new branch
run: git checkout -b treefmt-code
- name: Run treefmt
uses: isbecker/treefmt-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
version: "latest"
fail_on_change: "false"
- name: Commit changes
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
if ! git diff --quiet; then
git pull
git add .
git commit -m "refactor(*): automated formatting"
fi
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref_name }}