Skip to content

Bump 20240916-1

Bump 20240916-1 #1332

Workflow file for this run

name: Organize pull requests
on:
pull_request_target:
types: [opened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
jobs:
lint:
# Never ever ever run this on self-hosted runners
runs-on: ubuntu-latest # Did you read the disclaimer?
outputs:
fmt: ${{ steps.linter.outcome }}
steps:
- name: Install Nix
uses: cachix/install-nix-action@v27
with:
extra_nix_config: |
accept-flake-config = true
system-features = big-parallel gccarch-x86-64-v3
nix_path: "nixpkgs=channel:nixpkgs-unstable"
install_url: https://releases.nixos.org/nix/nix-2.22.3/install
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Run linter
run: nix develop ./maintenance#linter -c 'chaotic-nyx-lint'
id: linter
working-directory: ${{ github.workspace }}
organize:
# Never ever ever run this on self-hosted runners
runs-on: ubuntu-latest # Did you read the disclaimer?
permissions:
pull-requests: write
needs: lint
if: (!cancelled() && (contains(github.event.pull_request.labels.*.name, 'cached') || (needs.lint.outputs.fmt == 'failure' && github.event.action == 'opened')))
steps:
- name: Add comment
if: needs.lint.outputs.fmt == 'failure' && github.event.action == 'opened'
uses: actions/github-script@v7
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Thank you for contributing to nyx! Please run `nix fmt` on your code before submitting a pull request. Afterwards, please force push your changes."
})
- name: Remove cached label
if: contains(github.event.pull_request.labels.*.name, 'cached')
uses: actions/github-script@v7
with:
script: |
github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: "cached"
})