Skip to content

Commit 3ea17cd

Browse files
authored
Merge pull request #139 from jchw-forks/ghac-v2
Support for GitHub Actions Cache v2
2 parents d07da8a + 9123fc2 commit 3ea17cd

15 files changed

Lines changed: 693 additions & 171 deletions

File tree

.github/workflows/keygen.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ jobs:
2323
{
2424
"ACTIONS_CACHE_URL": "${ACTIONS_CACHE_URL}",
2525
"ACTIONS_RUNTIME_URL": "${ACTIONS_RUNTIME_URL}",
26-
"ACTIONS_RUNTIME_TOKEN": "${ACTIONS_RUNTIME_TOKEN}"
26+
"ACTIONS_RUNTIME_TOKEN": "${ACTIONS_RUNTIME_TOKEN}",
27+
"ACTIONS_RESULTS_URL": "${ACTIONS_RESULTS_URL}",
28+
"ACTIONS_CACHE_SERVICE_V2": "${ACTIONS_CACHE_SERVICE_V2}"
2729
}
2830
EOF
29-
encrypted=$(cat creds.json | nix develop .#keygen --command -- age -r "$AGE_PUBLIC_KEY" | base64 -w0)
31+
encrypted=$(cat creds.json | nix shell nixpkgs#age --command age -r "$AGE_PUBLIC_KEY" | base64 -w0)
3032
3133
echo 'Use the following command to decrypt:'
3234
echo "echo '$encrypted' | base64 -d | age --decrypt -i key.txt >creds.json"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.direnv
22

33
result*
4+
!results
45
/target
56

67
key.txt

Cargo.lock

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

flake.nix

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343

4444
nativeBuildInputs = with final; [
4545
pkg-config
46+
protobuf
4647
];
4748

4849
buildInputs = [
@@ -105,6 +106,7 @@
105106

106107
inputs.nix.packages.${stdenv.system}.default # for linking attic
107108
boost # for linking attic
109+
protobuf # for protoc/prost
108110
bashInteractive
109111
pkg-config
110112

gha-cache/Cargo.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,31 @@ name = "gha-cache"
33
version = "0.1.0"
44
edition = "2021"
55
license = "Apache-2.0"
6+
include = ["proto"]
67

78
[dependencies]
89
async-trait = "0.1.68"
910
bytes = { version = "1.4.0", default-features = false }
1011
derivative = { version = "2.2.0", default-features = false }
1112
futures = { version = "0.3.28", default-features = false, features = ["alloc"] }
1213
hex = "0.4.3"
14+
prost = "0.13.5"
1315
rand = { version = "0.8.5", default-features = false, features = ["std", "std_rng"] }
1416
reqwest = { version = "0.12.5", default-features = false, features = ["json", "rustls-tls-native-roots", "stream", "trust-dns"] }
1517
serde = { version = "1.0.162", default-features = false, features = ["derive"] }
1618
serde_json = { version = "1.0.96", default-features = false }
1719
sha2 = { version = "0.10.6", default-features = false }
1820
thiserror = "1.0.40"
1921
tokio = { version = "1.44.2", default-features = false, features = ["io-util"] }
22+
tokio-util = "0.7.15"
2023
tracing = { version = "0.1.37", default-features = false }
24+
twirp = "0.8.0"
2125
unicode-bom = "2.0.2"
26+
url = "2.5.4"
2227

2328
[dev-dependencies]
2429
anyhow = "1.0.71"
30+
31+
[build-dependencies]
32+
twirp-build = "0.8"
33+
prost-build = "0.13"

0 commit comments

Comments
 (0)