-
Notifications
You must be signed in to change notification settings - Fork 11
54 lines (47 loc) · 1.52 KB
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Deploy Main
on:
push:
branches:
- main
jobs:
deploy-main:
strategy:
matrix:
os: [ubuntu-22.04, macos-14]
runs-on: ${{ matrix.os }}
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
extra-conf: |
substituters = https://cache.nixos.org https://cosmosnix-store.s3.us-east-2.amazonaws.com
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cosmosnix.store-1:O28HneR1MPtgY3WYruWFuXCimRPwY7em5s0iynkQxdk=
- name: Check 🔎
run: |
nix flake check
- name: Run Shell 🐚
run: |
nix develop
- name: Authenticate 🔒
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-2
retry-max-attempts: 3
role-to-assume: arn:aws:iam::762411426253:role/push-cosmosnix-store
role-session-name: InformalSystemsGithubAction
- name: Push Cache 🫸📦💨
env:
SIGNING_KEY: ${{ secrets.SECRET_STORE_SIGNING_KEY }}
run: |
echo "$SIGNING_KEY" >> key
nix store sign -k key --all
nix copy --to "s3://cosmosnix-store?region=us-east-2" --all
- name: Push to FlakeHub ❄️
uses: determinatesystems/flakehub-push@main
if: matrix.os == 'ubuntu-22.04'
with:
rolling: true
visibility: "public"