fix: updated forgejo ci workflow to have working caching
All checks were successful
ci / nix-fmt (push) Successful in 11m26s
All checks were successful
ci / nix-fmt (push) Successful in 11m26s
This commit is contained in:
parent
b7c01c8f3d
commit
8208e847c0
4 changed files with 17 additions and 17 deletions
|
|
@ -5,28 +5,28 @@ on:
|
|||
branches: ["main"]
|
||||
workflow_dispatch:
|
||||
|
||||
env:
|
||||
USER: runner
|
||||
|
||||
jobs:
|
||||
nix-fmt:
|
||||
runs-on: nixos-latest
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: install nix
|
||||
uses: https://github.com/cachix/install-nix-action@v31.8.4
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- name: set up nix
|
||||
run: |
|
||||
mkdir -p ~/.config/nix
|
||||
echo "experimental-features = nix-command flakes pipe-operators" >> ~/.config/nix/nix.conf
|
||||
nix-env -iA nixpkgs.nodejs
|
||||
- name: restore and save nix store
|
||||
uses: https://github.com/nix-community/cache-nix-action@v6.1.3
|
||||
with:
|
||||
primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }}
|
||||
restore-prefixes-first-match: nix-${{ runner.os }}-
|
||||
gc-max-store-size: 1G
|
||||
nix-channel --add https://nixos.org/channels/nixos-unstable nixpkgs
|
||||
nix-channel --update
|
||||
- name: set up nix-community cachix
|
||||
uses: https://github.com/cachix/cachix-action@v16
|
||||
with:
|
||||
name: nix-community
|
||||
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v5.0.0
|
||||
- name: setup git identity
|
||||
run: |
|
||||
git config --global user.name "forgejo-actions-bot"
|
||||
|
|
@ -35,14 +35,14 @@ jobs:
|
|||
env:
|
||||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
run: |
|
||||
nix-env -iA nixpkgs.gawk nixpkgs.gnupg
|
||||
|
||||
echo "$GPG_PRIVATE_KEY" | gpg --batch --import || true
|
||||
KEYID=$(gpg --list-secret-keys --with-colons | awk -F: '/^sec/{print $5;exit}')
|
||||
git config --global user.signingkey "$KEYID"
|
||||
git config --global commit.gpgsign true
|
||||
echo "default-cache-ttl 3600" >> ~/.gnupg/gpg-agent.conf
|
||||
echo RELOADAGENT | gpg-connect-agent
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v5.0.0
|
||||
- name: run nix fmt
|
||||
run: nix fmt
|
||||
- name: check for changes
|
||||
|
|
|
|||
6
flake.lock
generated
6
flake.lock
generated
|
|
@ -1656,11 +1656,11 @@
|
|||
"treefmt-nix": "treefmt-nix_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1762354760,
|
||||
"narHash": "sha256-uSBSZwOnpt2zq4+KMEFjsW65nH4LLCDQjthHbBNOlDg=",
|
||||
"lastModified": 1763277477,
|
||||
"narHash": "sha256-fuy2JnMoqon33Q099qpeQAA43e+y6nvu3H3NgcIlEtM=",
|
||||
"owner": "c4patino",
|
||||
"repo": "yumevim-nix",
|
||||
"rev": "a85a5670b1e16ba3808ce8620b6031a36f7befa5",
|
||||
"rev": "72b0111237cd95deabfd2c73a4234920d64b2459",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 38adbb499aae415691fa1b31e1519449d96a7687
|
||||
Subproject commit 03b4acbc8b1bc8968095f553ed939c7a266e3fae
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit a85a5670b1e16ba3808ce8620b6031a36f7befa5
|
||||
Subproject commit 72b0111237cd95deabfd2c73a4234920d64b2459
|
||||
Loading…
Add table
Add a link
Reference in a new issue