From 93c2482df2436ac89fd9ce9a30e36531e50db01f Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Fri, 2 Apr 2021 15:37:42 +0100 Subject: [PATCH] github_packages: set github package type annotation. This is an alternative to #11002. --- Library/Homebrew/github_packages.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Library/Homebrew/github_packages.rb b/Library/Homebrew/github_packages.rb index 886734bda3..7b6014a108 100644 --- a/Library/Homebrew/github_packages.rb +++ b/Library/Homebrew/github_packages.rb @@ -16,6 +16,7 @@ class GitHubPackages URL_PREFIX = "https://#{URL_DOMAIN}/v2/" DOCKER_PREFIX = "docker://#{URL_DOMAIN}/" URL_REGEX = %r{(?:#{Regexp.escape(URL_PREFIX)}|#{Regexp.escape(DOCKER_PREFIX)})([\w-]+)/([\w-]+)}.freeze + GITHUB_PACKAGE_TYPE = "homebrew_bottle" # Translate Homebrew tab.arch to OCI platform.architecture TAB_ARCH_TO_PLATFORM_ARCHITECTURE = { @@ -255,6 +256,7 @@ class GitHubPackages "org.opencontainers.image.documentation" => documentation, "org.opencontainers.image.ref.name" => tag, "org.opencontainers.image.title" => "#{formula_full_name} #{tag}", + "com.github.package.type" => GITHUB_PACKAGE_TYPE, }).sort.to_h annotations_hash.each do |key, value| annotations_hash.delete(key) if value.blank?