Skip to content

Commit 48c0824

Browse files
committed
fix: ssh auth for flakehub workflow
1 parent 72d332d commit 48c0824

File tree

5 files changed

+111
-100
lines changed

5 files changed

+111
-100
lines changed

.github/workflows/darwin-build.yml

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,35 @@ jobs:
66
contents: write
77
runs-on: macos-latest
88
steps:
9-
- name: Checkout repo
10-
uses: actions/checkout@main
11-
with:
12-
fetch-depth: 1
13-
- name: Set env var
14-
run: echo "OS_NIXCFG=$(pwd)" >> "$GITHUB_ENV"
15-
- uses: DeterminateSystems/nix-installer-action@v17
16-
- name: Configure to use personal binary cache @ Cachix
17-
uses: cachix/cachix-action@master
18-
with:
19-
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
20-
name: divitmittal
21-
- name: SSH-agent with auth for private repos
22-
uses: webfactory/ssh-agent@master
23-
with:
24-
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
25-
- name: Builds a nix-darwin configuration
26-
run: nix build --accept-flake-config .#darwinConfigurations.L1.config.system.build.toplevel
27-
--impure --show-trace
9+
- name: Checkout repo
10+
uses: actions/checkout@main
11+
with:
12+
fetch-depth: 1
13+
- name: Set env var
14+
run: echo "OS_NIXCFG=$(pwd)" >> "$GITHUB_ENV"
15+
- uses: DeterminateSystems/nix-installer-action@v17
16+
- name: Configure to use personal binary cache @ Cachix
17+
uses: cachix/cachix-action@master
18+
with:
19+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
20+
name: divitmittal
21+
- name: SSH-agent with auth for private repos
22+
uses: webfactory/ssh-agent@master
23+
with:
24+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
25+
- name: Builds a nix-darwin configuration
26+
run:
27+
nix build --accept-flake-config .#darwinConfigurations.L1.config.system.build.toplevel
28+
--impure --show-trace
2829
timeout-minutes: 30
29-
'on':
30+
"on":
3031
pull_request:
3132
branches:
32-
- master
33+
- master
3334
push:
3435
branches:
35-
- master
36+
- master
3637
paths-ignore:
37-
- '**/*.md'
38-
- .github/**
39-
workflow_dispatch: {}
38+
- "**/*.md"
39+
- .github/**
40+
workflow_dispatch: {}

.github/workflows/flake-check.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,33 +6,33 @@ jobs:
66
contents: write
77
runs-on: ubuntu-latest
88
steps:
9-
- name: Checkout repo
10-
uses: actions/checkout@main
11-
with:
12-
fetch-depth: 1
13-
- name: Set env var
14-
run: echo "OS_NIXCFG=$(pwd)" >> "$GITHUB_ENV"
15-
- uses: DeterminateSystems/nix-installer-action@v17
16-
- name: Configure to use personal binary cache @ Cachix
17-
uses: cachix/cachix-action@master
18-
with:
19-
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
20-
name: divitmittal
21-
- name: SSH-agent with auth for private repos
22-
uses: webfactory/ssh-agent@master
23-
with:
24-
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
25-
- name: Run nix flake check
26-
run: nix flake check --impure --all-systems --no-build
9+
- name: Checkout repo
10+
uses: actions/checkout@main
11+
with:
12+
fetch-depth: 1
13+
- name: Set env var
14+
run: echo "OS_NIXCFG=$(pwd)" >> "$GITHUB_ENV"
15+
- uses: DeterminateSystems/nix-installer-action@v17
16+
- name: Configure to use personal binary cache @ Cachix
17+
uses: cachix/cachix-action@master
18+
with:
19+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
20+
name: divitmittal
21+
- name: SSH-agent with auth for private repos
22+
uses: webfactory/ssh-agent@master
23+
with:
24+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
25+
- name: Run nix flake check
26+
run: nix flake check --impure --all-systems --no-build
2727
timeout-minutes: 30
28-
'on':
28+
"on":
2929
pull_request:
3030
branches:
31-
- master
31+
- master
3232
push:
3333
branches:
34-
- master
34+
- master
3535
paths-ignore:
36-
- '**/*.md'
37-
- .github/**
36+
- "**/*.md"
37+
- .github/**
3838
workflow_dispatch: {}

.github/workflows/flakehub-publish-tagged.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,27 @@ on:
1212
jobs:
1313
flakehub-publish:
1414
runs-on: "ubuntu-latest"
15+
environment:
16+
name: dev
1517
permissions:
1618
id-token: "write"
1719
contents: "read"
1820
steps:
19-
- uses: "actions/checkout@v4"
21+
- uses: "actions/checkout@main"
2022
with:
2123
ref: "${{ (inputs.tag != null) && format('refs/tags/{0}', inputs.tag) || '' }}"
24+
- name: Set env var
25+
run: echo "OS_NIXCFG=$(pwd)" >> "$GITHUB_ENV"
2226
- uses: "DeterminateSystems/nix-installer-action@main"
2327
with:
2428
determinate: true
29+
- name: SSH-agent with auth for private repos
30+
uses: webfactory/ssh-agent@master
31+
with:
32+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
2533
- uses: "DeterminateSystems/flakehub-push@main"
2634
with:
2735
visibility: "public"
2836
name: "DivitMittal/OS-nixCfg"
2937
tag: "${{ inputs.tag }}"
30-
include-output-paths: true
38+
include-output-paths: true

.github/workflows/home-build.yml

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,35 @@ jobs:
66
contents: write
77
runs-on: macos-latest
88
steps:
9-
- name: Checkout repo
10-
uses: actions/checkout@main
11-
with:
12-
fetch-depth: 1
13-
- name: Set env var
14-
run: echo "OS_NIXCFG=$(pwd)" >> "$GITHUB_ENV"
15-
- uses: DeterminateSystems/nix-installer-action@v17
16-
- name: Configure to use personal binary cache @ Cachix
17-
uses: cachix/cachix-action@master
18-
with:
19-
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
20-
name: divitmittal
21-
- name: SSH-agent with auth for private repos
22-
uses: webfactory/ssh-agent@master
23-
with:
24-
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
25-
- name: Builds a home-manager configuration
26-
run: nix build --accept-flake-config .#homeConfigurations.L1.activationPackage
27-
--impure --show-trace
9+
- name: Checkout repo
10+
uses: actions/checkout@main
11+
with:
12+
fetch-depth: 1
13+
- name: Set env var
14+
run: echo "OS_NIXCFG=$(pwd)" >> "$GITHUB_ENV"
15+
- uses: DeterminateSystems/nix-installer-action@v17
16+
- name: Configure to use personal binary cache @ Cachix
17+
uses: cachix/cachix-action@master
18+
with:
19+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
20+
name: divitmittal
21+
- name: SSH-agent with auth for private repos
22+
uses: webfactory/ssh-agent@master
23+
with:
24+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
25+
- name: Builds a home-manager configuration
26+
run:
27+
nix build --accept-flake-config .#homeConfigurations.L1.activationPackage
28+
--impure --show-trace
2829
timeout-minutes: 30
29-
'on':
30+
"on":
3031
pull_request:
3132
branches:
32-
- master
33+
- master
3334
push:
3435
branches:
35-
- master
36+
- master
3637
paths-ignore:
37-
- '**/*.md'
38-
- .github/**
39-
workflow_dispatch: {}
38+
- "**/*.md"
39+
- .github/**
40+
workflow_dispatch: {}

.github/workflows/nixos-build.yml

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,35 @@ jobs:
66
contents: write
77
runs-on: ubuntu-latest
88
steps:
9-
- name: Checkout repo
10-
uses: actions/checkout@main
11-
with:
12-
fetch-depth: 1
13-
- name: Set env var
14-
run: echo "OS_NIXCFG=$(pwd)" >> "$GITHUB_ENV"
15-
- uses: DeterminateSystems/nix-installer-action@v17
16-
- name: Configure to use personal binary cache @ Cachix
17-
uses: cachix/cachix-action@master
18-
with:
19-
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
20-
name: divitmittal
21-
- name: SSH-agent with auth for private repos
22-
uses: webfactory/ssh-agent@master
23-
with:
24-
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
25-
- name: Builds a nixos configuration
26-
run: nix build --accept-flake-config .#nixosConfigurations.WSL.config.system.build.toplevel
27-
--impure --show-trace
9+
- name: Checkout repo
10+
uses: actions/checkout@main
11+
with:
12+
fetch-depth: 1
13+
- name: Set env var
14+
run: echo "OS_NIXCFG=$(pwd)" >> "$GITHUB_ENV"
15+
- uses: DeterminateSystems/nix-installer-action@v17
16+
- name: Configure to use personal binary cache @ Cachix
17+
uses: cachix/cachix-action@master
18+
with:
19+
authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
20+
name: divitmittal
21+
- name: SSH-agent with auth for private repos
22+
uses: webfactory/ssh-agent@master
23+
with:
24+
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
25+
- name: Builds a nixos configuration
26+
run:
27+
nix build --accept-flake-config .#nixosConfigurations.WSL.config.system.build.toplevel
28+
--impure --show-trace
2829
timeout-minutes: 30
29-
'on':
30+
"on":
3031
pull_request:
3132
branches:
32-
- master
33+
- master
3334
push:
3435
branches:
35-
- master
36+
- master
3637
paths-ignore:
37-
- '**/*.md'
38-
- .github/**
39-
workflow_dispatch: {}
38+
- "**/*.md"
39+
- .github/**
40+
workflow_dispatch: {}

0 commit comments

Comments
 (0)