All checks were successful
Check flake syntax / flake-check (push) Successful in 11m53s
63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
name: Hydra callback
|
|
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- synchronize
|
|
paths:
|
|
- '**.nix'
|
|
- flake.lock
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- '**.nix'
|
|
- flake.lock
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
on_pr:
|
|
if: github.event.pull_request
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
NIXPKGS_ALLOW_UNFREE: 1
|
|
steps:
|
|
- name: Install sudo
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y sudo
|
|
- name: Set up Nix
|
|
uses: https://github.com/cachix/install-nix-action@v31
|
|
with:
|
|
github_access_token: ${{ secrets.AHTLONS_GITHUB_TOKEN }}
|
|
- name: Find pr number
|
|
run: |
|
|
echo PR=$(echo "${{ github.ref }}" | cut -d / -f 3) >> "$GITHUB_ENV"
|
|
- name: run hydra wait
|
|
timeout-minutes: 200
|
|
run: |
|
|
echo "Running now @ pr no $PR"
|
|
nix run nixpkgs#hydra-cli -- -H https://hydra.dynamicdiscord.de jobset-wait malobeo2 "$PR"
|
|
|
|
on_push:
|
|
if: github.event.push
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
NIXPKGS_ALLOW_UNFREE: 1
|
|
steps:
|
|
- name: Install sudo
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y sudo
|
|
- name: Set up Nix
|
|
uses: https://github.com/cachix/install-nix-action@v31
|
|
with:
|
|
github_access_token: ${{ secrets.AHTLONS_GITHUB_TOKEN }}
|
|
- name: run hydra wait
|
|
timeout-minutes: 200
|
|
run: |
|
|
echo "Running now @ master"
|
|
nix run nixpkgs#hydra-cli -- -H https://hydra.dynamicdiscord.de jobset-wait malobeo2 master |