-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (42 loc) · 1.51 KB
/
cache-deps.yaml
File metadata and controls
42 lines (42 loc) · 1.51 KB
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
#################################################################################
# Child pipeline to cache Gnosis VPN-Server dependencies
#################################################################################
name: Cache dependencies
env:
RUST_BACKTRACE: "1"
on:
workflow_call:
inputs:
branch:
required: true
type: string
concurrency:
group: ${{ github.ref }}-cache-deps
cancel-in-progress: true
jobs:
cargo:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
persist-credentials: false
- name: Replace the crates.io registry with a private proxy registry
env:
PRIVATE_CARGO_REGISTRY_PROXY_URL: ${{ secrets.PRIVATE_CARGO_REGISTRY_PROXY_URL }}
run: "cat >> .cargo/config.toml<< EOF \n[source.hopr-cargo-registry-cache]\nregistry = \"sparse+${PRIVATE_CARGO_REGISTRY_PROXY_URL}\"\n #magic___^_^___line\n[source.crates-io]\nreplace-with = \"hopr-cargo-registry-cache\"\nEOF\n #magic___^_^___line\n"
- name: Install Nix
uses: cachix/install-nix-action@v31
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- name: Use Nix Cache
uses: cachix/cachix-action@v16
with:
name: gnosis-vpn-server
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
env:
USER: runner
- name: Cache dependencies
run: nix develop -c cargo fetch