meta: add workflow perms; fix broken workflows

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I6a6a6964ea7f970a8a9040ca994bfe6aabecb408
This commit is contained in:
raf 2025-08-20 10:21:28 +03:00
commit 4aa6ef94d8
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
4 changed files with 38 additions and 17 deletions

View file

@ -1,6 +1,13 @@
version: 2
updates:
- package-ecosystem: "cargo"
# Update Cargo deps
- package-ecosystem: cargo
directory: "/"
schedule:
interval: "weekly"
# Update used workflows
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily

View file

@ -1,19 +1,28 @@
name: "Populate cachix cache"
on:
workflow_dispatch:
push:
branches: [ master ]
branches: [ "main" ]
paths: [ 'src/**.rs', 'Cargo.toml', 'Cargo.lock', 'nix/package.nix' ]
permissions:
contents: read
jobs:
populate-cache:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v14
with:
name: nyx
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build
- name: "CHeckout"
uses: actions/checkout@v4
- uses: cachix/install-nix-action@v25
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v14
with:
name: nyx
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build

View file

@ -39,7 +39,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable

View file

@ -1,10 +1,13 @@
name: Build with Cargo
permissions:
contents: read
on:
workflow_dispatch:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
paths: [ "src/**.rs", "Cargo.toml", "Cargo.lock"]
env:
CARGO_TERM_COLOR: always
@ -13,6 +16,8 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Checkout
uses: actions/checkout@v5
- name: Build
run: cargo build --verbose