Skip to content

Format code in the repo #1

Format code in the repo

Format code in the repo #1

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Format code in the repo
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
workflow_dispatch:
concurrency:
group: prebuild
cancel-in-progress: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
name: Format code in the repo
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Install nix
uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
build-dir = /nix/build
- name: Format
run: nix fmt
- name: Send PR
uses: peter-evans/create-pull-request@v4
with:
title: "Format repo code"
body: |
I ran the formatters and this is the result
branch: fmt
commit-message: fmt
author: "A helpful machine <[email protected]>"
committer: "A helpful machine <[email protected]>"
delete-branch: true
reviewers: |
lucasew