Add config for gitea actions
ci / deploy (push) Has been cancelled Details
ci / test (push) Has been cancelled Details

This commit is contained in:
Hayajiro 2023-11-19 19:48:48 +01:00
parent 0161ac2d68
commit f54c1c2a07
2 changed files with 66 additions and 0 deletions

42
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,42 @@
name: ci
on:
push:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Flake check
run: nix flake check
deploy:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v23
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: Load ssh key
uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Deploy
run: nix develop --command deploy

24
.github/workflows/update.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: update-flake-inputs
on:
schedule:
- cron: '0 0 * * 0' # runs weekly on Sunday at 00:00
jobs:
update-lockfile:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v23
with:
extra_nix_config: |
access-tokens = github.com=${{ secrets.AUTOUPDATE_TOKEN }}
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@v20
with:
pr-title: "update flake inputs"
pr-labels: |
update
automated