Skip to content

Commit

Permalink
Ensure we upload via the digest too
Browse files Browse the repository at this point in the history
  • Loading branch information
ianoc committed May 18, 2022
1 parent 1b31a3e commit 1c26e92
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/pusher_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,14 @@ async fn main() -> Result<(), anyhow::Error> {
.upload_blob(&config_path, &config_sha_printed, config_sha_len.0 as u64)
.await?;
}

// First lets upload the manifest keyed by the digest.
let (manifest_sha, _) = Sha256Value::from_path(&manifest_path).await?;
let mut final_tags = tags.clone();
final_tags.push(format!("sha256:{}", manifest_sha));

destination_registry
.upload_manifest(&manifest, &manifest_bytes, &tags)
.upload_manifest(&manifest, &manifest_bytes, &final_tags)
.await?;

Ok(())
Expand Down

0 comments on commit 1c26e92

Please sign in to comment.