mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-22 07:53:55 -05:00
github: update flake.lock weekly with pull request
github: use DeterminateSystems nix installer github: run cicid on prs github/flake-update-inputs: use PAT to trigger subsequent workflows github: simplify workflow runs github: setup git after checkout github/flake-update-inputs: don't self assign reviews github/git-sync-mirrors: only run on master github: don't sync to codeberg github: only run nix checks on .nix updates github: only run nix checks on .nix and .lock updates github: ignore .github and _img paths
This commit is contained in:
parent
240ec1ac8e
commit
1413801e6d
13
.github/workflows/flake-checks.yml
vendored
13
.github/workflows/flake-checks.yml
vendored
|
@ -1,5 +1,10 @@
|
||||||
name: "nix"
|
name: "nix"
|
||||||
on: [push]
|
on:
|
||||||
|
push:
|
||||||
|
paths-ignore:
|
||||||
|
- '.github/**'
|
||||||
|
- '_img/**'
|
||||||
|
workflow_dispatch:
|
||||||
jobs:
|
jobs:
|
||||||
check-format:
|
check-format:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -7,7 +12,8 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
- uses: cachix/install-nix-action@v27
|
- name: Install Nix
|
||||||
|
uses: DeterminateSystems/nix-installer-action@main
|
||||||
- name: check if flake complies with default style
|
- name: check if flake complies with default style
|
||||||
run: nix fmt -- -c .
|
run: nix fmt -- -c .
|
||||||
check-eval:
|
check-eval:
|
||||||
|
@ -16,6 +22,7 @@ jobs:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
- uses: cachix/install-nix-action@v27
|
- name: Install Nix
|
||||||
|
uses: DeterminateSystems/nix-installer-action@main
|
||||||
- name: check if flake evaluates
|
- name: check if flake evaluates
|
||||||
run: nix flake check
|
run: nix flake check
|
||||||
|
|
27
.github/workflows/flake-update-inputs.yml
vendored
27
.github/workflows/flake-update-inputs.yml
vendored
|
@ -1,7 +1,7 @@
|
||||||
name: "flake: update inputs"
|
name: "update-flake-inputs"
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 6 * * *"
|
- cron: "0 0 * * 0"
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
jobs:
|
jobs:
|
||||||
update-inputs:
|
update-inputs:
|
||||||
|
@ -11,17 +11,18 @@ jobs:
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.head_ref }}
|
ref: ${{ github.head_ref }}
|
||||||
fetch-depth: 1
|
fetch-depth: 1
|
||||||
- name: "git: setup"
|
- name: Setup Git
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
|
||||||
git config --local user.name "github-actions[bot]"
|
git config --local user.name "github-actions[bot]"
|
||||||
- uses: cachix/install-nix-action@v27
|
git config --local user.email "github-actions[bot]@users.noreply.github.com"
|
||||||
- name: "flake: update inputs"
|
- name: Install Nix
|
||||||
run: nix flake update --commit-lock-file
|
uses: DeterminateSystems/nix-installer-action@main
|
||||||
- name: "flake: check eval"
|
- name: Update flake.lock
|
||||||
run: nix flake check
|
uses: DeterminateSystems/update-flake-lock@main
|
||||||
- name: "git: push changes"
|
|
||||||
uses: ad-m/github-push-action@master
|
|
||||||
with:
|
with:
|
||||||
branch: ${{ github.head_ref }}
|
token: ${{ secrets.FLAKE_UPDATE_PAT }}
|
||||||
|
pr-title: "flake: update inputs"
|
||||||
|
pr-assignees: alyraffauf
|
||||||
|
pr-labels: |
|
||||||
|
dependencies
|
||||||
|
automated
|
19
.github/workflows/git-sync-mirrors.yml
vendored
19
.github/workflows/git-sync-mirrors.yml
vendored
|
@ -1,25 +1,10 @@
|
||||||
name: "git"
|
name: "git"
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
workflow_run:
|
branches:
|
||||||
workflows: ["flake: update inputs"]
|
- master
|
||||||
types:
|
|
||||||
- completed
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
jobs:
|
jobs:
|
||||||
sync-codeberg:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: check out repository
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: "sync codeberg mirror"
|
|
||||||
uses: yesolutions/mirror-action@v0.7.0
|
|
||||||
with:
|
|
||||||
REMOTE: 'https://codeberg.org/alyraffauf/nixcfg.git'
|
|
||||||
GIT_USERNAME: alyraffauf
|
|
||||||
GIT_PASSWORD: ${{ secrets.CODEBERG_PASSWORD }}
|
|
||||||
sync-gitlab:
|
sync-gitlab:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|
Loading…
Reference in a new issue