Repository: argoproj-labs/argocd-image-updater

Issue:
Github webhook fails to parse response, unsupported package type: CONTAINER
**Describe the bug**
We just did a fresh setup of Argocd Image Updater and noticed that the webhook payload of Github seems to have changed, the value of the `"package_type"` property is now uppercase  `"CONTAINER"` which breaks the parser in https://github.com/argoproj-labs/argocd-image-updater/blob/master/pkg/webhook/ghcr.go#L111-L113 and results in an `unsupported package type: CONTAINER` error message.

If I change it manually to lowercase and execute the command via curl, all works as expected: `Webhook received and processing`

I don't know if Github changed this from lower to upper case, maybe we should make it an equals ignore case check.

**To Reproduce**
Setup webhook with Github

**Expected behavior**
Webhook requests are successfully evaluated

**Additional context**
```
{
  "action": "published",
  "package": {
    "id": xxx,
    "name": "xxx",
    "namespace": "xxx",
    "description": "",
    "ecosystem": "CONTAINER",
    "package_type": "CONTAINER",
    "html_url": "https://github.com/xxx/packages/yyy",
    "created_at": "2025-09-04T11:38:53Z",
    "updated_at": "2025-10-10T13:42:54Z",
 ...
 ```

**Version**
0.17.0

**Logs**
│ time="2025-10-10T14:36:38Z" level=error msg="Failed to process webhook: unsupported package type: CONTAINER" remote="xxx"   

Discussion:
@SailReal: If you want, I can create an PR and fix it...@chengfang: PR is welcome to fix it.@SailReal: @chengfang do you know when the next release containing this fix will be published?

Solution patch:
diff --git a/pkg/webhook/ghcr.go b/pkg/webhook/ghcr.go
index fc78f59..f27bbec 100644
--- a/pkg/webhook/ghcr.go
+++ b/pkg/webhook/ghcr.go
@@ -108,7 +108,7 @@ func (g *GHCRWebhook) Parse(r *http.Request) (*WebhookEvent, error) {
 	}
 
 	// Only process container packages
-	if payload.Package.PackageType != "container" {
+	if strings.ToLower(payload.Package.PackageType) != "container" {
 		return nil, fmt.Errorf("unsupported package type: %s", payload.Package.PackageType)
 	}
 



Test patch:
diff --git a/pkg/webhook/ghcr_test.go b/pkg/webhook/ghcr_test.go
index f2d0bb4..c046976 100644
--- a/pkg/webhook/ghcr_test.go
+++ b/pkg/webhook/ghcr_test.go
@@ -148,7 +148,7 @@ func TestGHCRWebhook_Parse(t *testing.T) {
 		expectError  bool
 	}{
 		{
-			name: "valid registry package published event",
+			name: "valid registry package published event with lower case package_type",
 			payload: `{
 				"action": "published",
 				"package": {
@@ -171,6 +171,54 @@ func TestGHCRWebhook_Parse(t *testing.T) {
 			expectedTag:  "v1.0.0",
 			expectError:  false,
 		},
+		{
+			name: "another valid registry package published event with upper case package_type",
+			payload: `{
+				"action": "published",
+				"package": {
+					"name": "myapp",
+					"package_type": "CONTAINER",
+					"owner": {
+						"login": "myuser"
+					},
+					"package_version": {
+						"name": "v1.0.0",
+						"container_metadata": {
+							"tag": {
+								"name": "v1.0.0"
+							}
+						}
+					}
+				}
+			}`,
+			expectedRepo: "myuser/myapp",
+			expectedTag:  "v1.0.0",
+			expectError:  false,
+		},
+		{
+			name: "another valid registry package published event with camel case package_type",
+			payload: `{
+				"action": "published",
+				"package": {
+					"name": "myapp",
+					"package_type": "Container",
+					"owner": {
+						"login": "myuser"
+					},
+					"package_version": {
+						"name": "v1.0.0",
+						"container_metadata": {
+							"tag": {
+								"name": "v1.0.0"
+							}
+						}
+					}
+				}
+			}`,
+			expectedRepo: "myuser/myapp",
+			expectedTag:  "v1.0.0",
+			expectError:  false,
+		},
 		{
 			name: "valid registry package published event with latest tag",
 			payload: `{