Skip to content

Commit

Permalink
Merge pull request #105 from cfsnyder/main
Browse files Browse the repository at this point in the history
Fix compatibility issues with alternative GHA cache implementation
  • Loading branch information
grahamc authored Sep 25, 2024
2 parents 24af143 + 4f25f7b commit 6a5abbf
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions gha-cache/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ pub struct FileAllocation(CacheId);
/// The ID of a cache.
#[derive(Debug, Clone, Copy, Serialize, Deserialize)]
#[serde(transparent)]
struct CacheId(pub i32);
struct CacheId(pub i64);

/// An API error.
#[derive(Debug, Clone)]
Expand Down Expand Up @@ -543,10 +543,13 @@ impl Api {
}

fn construct_url(&self, resource: &str) -> String {
format!(
"{}/_apis/artifactcache/{}",
self.credentials.cache_url, resource
)
let mut url = self.credentials.cache_url.clone();
if !url.ends_with('/') {
url.push('/');
}
url.push_str("_apis/artifactcache/");
url.push_str(resource);
url
}
}

Expand Down

0 comments on commit 6a5abbf

Please sign in to comment.