Skip to content

CI test

CI test #4

Workflow file for this run

# © 2019-2023 Serokell <[email protected]>
# © 2019-2023 Lars Jellema <[email protected]>
#
# SPDX-License-Identifier: MPL-2.0
name: CI
on:
pull_request:
push:
branches:
- master
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v26
- name: reuse lint
run: nix shell .#packages.x86_64-linux.reuse -c reuse lint
- name: build nixfmt
run: nix build -L .#nixfmt-static
if: success() || failure()
auto-format:
needs: check
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
# required
app-id: ${{ vars.app_id }}
private-key: ${{ secrets.app_private_key }}
- uses: cachix/install-nix-action@v20
- uses: actions/checkout@v4
- run: |
./sync-pr.sh \
https://github.com/${{ github.repository }} \
${{ github.event.pull_request.number }} \
https://${{ steps.app-token.outputs.token }}@github.com/${{ github.repository_owner }}/nixpkgs \