Skip to content

Commit e329450

Browse files
committed
ci: update GitHub action steps and node versions
Signed-off-by: Thomas Kosiewski <thoma471@googlemail.com>
1 parent beafa30 commit e329450

File tree

5 files changed

+122
-13
lines changed

5 files changed

+122
-13
lines changed

.envrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env bash
2+
3+
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then
4+
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc" "sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM="
5+
fi
6+
7+
nix_direnv_manual_reload
8+
use flake

.github/workflows/node.js.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,28 @@ on:
1212
branches: [master]
1313

1414
env:
15-
DEFAULT_NODE_VERSION: "14.x"
15+
DEFAULT_NODE_VERSION: "22.x"
1616

1717
jobs:
1818
build:
1919
runs-on: ubuntu-latest
2020

2121
strategy:
2222
matrix:
23-
node-version: [10.x, 12.x, 14.x]
23+
node-version: [20.x, 22.x, 23.x]
2424

2525
steps:
26-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2727
- name: Use Node.js ${{ matrix.node-version }}
28-
uses: actions/setup-node@v3
28+
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
2929
with:
3030
node-version: ${{ matrix.node-version }}
3131
- run: npm ci
3232
- run: npm run build --if-present
3333
- run: npm run test:prod
3434

3535
- if: matrix.node-version == env.DEFAULT_NODE_VERSION
36-
uses: actions/upload-artifact@v3
36+
uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
3737
with:
3838
name: build
3939
path: |
@@ -45,11 +45,11 @@ jobs:
4545
needs: build
4646

4747
steps:
48-
- uses: actions/download-artifact@v3
48+
- uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
4949
with:
5050
name: build
5151
- name: Coveralls
52-
uses: coverallsapp/github-action@master
52+
uses: coverallsapp/github-action@648a8eb78e6d50909eff900e4ec85cab4524a45b # v2.3.6
5353
with:
5454
github-token: ${{ secrets.GITHUB_TOKEN }}
5555

@@ -59,11 +59,11 @@ jobs:
5959
needs: build
6060

6161
steps:
62-
- uses: actions/download-artifact@v3
62+
- uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
6363
with:
6464
name: build
6565
- name: Deploy Docs
66-
uses: peaceiris/actions-gh-pages@v3
66+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
6767
with:
6868
github_token: ${{ secrets.GITHUB_TOKEN }}
6969
publish_dir: ./docs
@@ -74,11 +74,11 @@ jobs:
7474
needs: build
7575

7676
steps:
77-
- uses: actions/download-artifact@v3
77+
- uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
7878
with:
7979
name: build
8080
- name: Use Node.js ${{ env.DEFAULT_NODE_VERSION }} with NPM registry
81-
uses: actions/setup-node@v3
81+
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
8282
with:
8383
node-version: ${{ env.DEFAULT_NODE_VERSION }}
8484
registry-url: "https://registry.npmjs.org"
@@ -93,11 +93,11 @@ jobs:
9393
needs: build
9494

9595
steps:
96-
- uses: actions/download-artifact@v3
96+
- uses: actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
9797
with:
9898
name: build
9999
- name: Use Node.js ${{ env.DEFAULT_NODE_VERSION }} with GPR registry
100-
uses: actions/setup-node@v3
100+
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
101101
with:
102102
node-version: ${{ env.DEFAULT_NODE_VERSION }}
103103
registry-url: "https://npm.pkg.github.com"

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,5 @@ dist
155155
compiled
156156
.awcache
157157
docs
158+
159+
.direnv

flake.lock

Lines changed: 61 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
description = "A very basic flake";
3+
4+
inputs = {
5+
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
6+
flake-utils.url = "github:numtide/flake-utils";
7+
};
8+
9+
outputs =
10+
{
11+
self,
12+
nixpkgs,
13+
flake-utils,
14+
}:
15+
flake-utils.lib.eachDefaultSystem (
16+
system:
17+
let
18+
pkgs = import nixpkgs { inherit system; };
19+
formatter = pkgs.nixfmt-rfc-style;
20+
in
21+
{
22+
inherit formatter;
23+
24+
devShells = {
25+
default = pkgs.mkShell {
26+
buildInputs = with pkgs; [
27+
formatter
28+
29+
nodejs_23
30+
31+
zizmor
32+
actionlint
33+
];
34+
};
35+
};
36+
}
37+
);
38+
}

0 commit comments

Comments
 (0)