Initial stabilization #1
1 changed files with 2 additions and 9 deletions
commit
39dae4365d
11
src/main.rs
11
src/main.rs
|
|
@ -65,9 +65,6 @@ struct Input {
|
||||||
/// Must be in UTF-8
|
/// Must be in UTF-8
|
||||||
#[parser(key_parser)]
|
#[parser(key_parser)]
|
||||||
key: CacheKey,
|
key: CacheKey,
|
||||||
/// A server url to upload the cache to
|
|
||||||
#[default_str("${{ forgejo.api_url }}")]
|
|
||||||
base_url: String,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, thiserror::Error)]
|
#[derive(Debug, thiserror::Error)]
|
||||||
|
|
@ -127,11 +124,7 @@ impl Client {
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// parse inputs
|
// parse inputs
|
||||||
let Input {
|
let Input { path, key } = Input::get();
|
||||||
path,
|
|
||||||
key,
|
|
||||||
base_url,
|
|
||||||
} = Input::get();
|
|
||||||
let actions_token = actions_token().unwrap();
|
let actions_token = actions_token().unwrap();
|
||||||
|
|
||||||
// set up http client
|
// set up http client
|
||||||
|
|
@ -142,7 +135,7 @@ fn main() {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let client = Client {
|
let client = Client {
|
||||||
http_client,
|
http_client,
|
||||||
base_url,
|
base_url: std::env::var("ACTIONS_CACHE_URL").unwrap(),
|
||||||
};
|
};
|
||||||
|
|
||||||
// collect and compress the cached files
|
// collect and compress the cached files
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue