[CI] Forgejo actions
All checks were successful
/ test (push) Successful in 26s

This commit is contained in:
Andrea Ciceri 2024-03-14 19:13:37 +01:00
parent 7a72e488b5
commit c83e41c6ee
Signed by: aciceri
SSH key fingerprint: SHA256:/AagBweyV4Hlfg9u092n8hbHwD5fcB6A3qhDiDA65Rg
2 changed files with 46 additions and 0 deletions

View file

@ -0,0 +1,11 @@
on:
push:
branches: ["*"]
jobs:
test:
runs-on: nix
steps:
- uses: actions/checkout@v4
name: Checkout repository
- name: Build with nix
run: nix-fast-build --no-nom

View file

@ -0,0 +1,35 @@
name: update-flake-lock
on:
schedule:
- cron: '40 20 * * *' # daily at 14:30
jobs:
lockfile:
runs-on: nix
steps:
- uses: actions/checkout@v4
name: Checkout repository
with:
token: ${{secrets.SEVENOFNINE_TOKEN}}
- name: Create new branch from the checked out one
run: git switch -c update-flake-lock
- name: Configure git as `Seven of Nix`
run: |
git config --global user.email "sevenofnine@stronzi.org"
git config --global user.name "Seven of Nine"
- name: Update flake's lockfile and create commit
run: nix flake update --commit-lock-file
- name: Push commit to the `update-flake-lock` remote branch
run: git push origin --force update-flake-lock # sevenOfNix needs write access to the repository
- name: Login as `Seven of Nix`
run: |
tea logins add --token ${{secrets.SEVENOFNINE_TOKEN}} --url https://git.aciceri.dev
tea logins default git.aciceri.dev
- name: Create the pull request
run: |
tea pulls create \
--repo "$GITHUB_REPOSITORY" \
--title "Update flake's lockfile" \
--description "Check the commit description for inputs deltas" \
--assignees aciceri \
|| echo "PR already existing"