8000 Fix len by ianoc · Pull Request #415 · bazeltools/rules_minidock_tools · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Install Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/toolchain@v1
Expand Down
13 changes: 4 additions & 9 deletions app/pusher_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ async fn main() -> Result<(), anyhow::Error> {
let tmp_config = tempfile::NamedTempFile::new()?;
config.write_file(tmp_config.path())?;
let config_path: PathBuf = tmp_config.path().to_path_buf();
let (config_sha, config_sha_len) = Sha256Value::from_path(&config_path).await?;
let config_sha_printed = format!("sha256:{}", config_sha);
manifest.config.digest = config_sha_printed.clone();
let (config_sha, config_len) = Sha256Value::from_path(&config_path).await?;
manifest.update_config(config_sha, config_len);
let config_sha_printed = manifest.config.digest.clone();

let mut local_digests: HashMap<String, PathBuf> = HashMap::default();
for local_data in upload_metadata.layer_configs.iter() {
Expand Down Expand Up @@ -247,12 +247,7 @@ async fn main() -> Result<(), anyhow::Error> {
Ok(true) => Ok(ActionsTaken::default()),
Err(e) => Err(e),
Ok(false) => destination_registry
.upload_blob(
&config_path,
&config_sha_printed,
config_sha_len.0 as u64,
None,
)
.upload_blob(&config_path, &config_sha_printed, config_len.0 as u64, None)
.await
.map(|_| ActionsTaken::default()),
}
Expand Down
0