I had a repository for a long time with actions set up to automate the build of a Docker container on merge of pull requests.
The issue I am facing is that the code now gets merged, but the build of the container fails with the following error:
<code>#0 building with "builder-d99a4367-77ea-4ed0-93ed-c4feadc1693d" instance using docker-container driver
#1 [internal] load git source https://github.com/***/repo.git#refs/pull/9/merge
#1 0.121 Initialized empty Git repository in /var/lib/buildkit/runc-overlayfs/snapshots/snapshots/1/fs/
#1 ERROR: repository does not contain ref refs/pull/9/merge, output: ""
------
> [internal] load git source https://github.com/***/repo.git#refs/pull/9/merge:
0.121 Initialized empty Git repository in /var/lib/buildkit/runc-overlayfs/snapshots/snapshots/1/fs/
------
ERROR: failed to solve: failed to read dockerfile: failed to load cache key: repository does not contain ref refs/pull/9/merge, output: ""
Error: buildx failed with: ERROR: failed to solve: failed to read dockerfile: failed to load cache key: repository does not contain ref refs/pull/9/merge, output: ""
</code>
<code>#0 building with "builder-d99a4367-77ea-4ed0-93ed-c4feadc1693d" instance using docker-container driver
#1 [internal] load git source https://github.com/***/repo.git#refs/pull/9/merge
#1 0.121 Initialized empty Git repository in /var/lib/buildkit/runc-overlayfs/snapshots/snapshots/1/fs/
#1 ERROR: repository does not contain ref refs/pull/9/merge, output: ""
------
> [internal] load git source https://github.com/***/repo.git#refs/pull/9/merge:
0.121 Initialized empty Git repository in /var/lib/buildkit/runc-overlayfs/snapshots/snapshots/1/fs/
------
ERROR: failed to solve: failed to read dockerfile: failed to load cache key: repository does not contain ref refs/pull/9/merge, output: ""
Error: buildx failed with: ERROR: failed to solve: failed to read dockerfile: failed to load cache key: repository does not contain ref refs/pull/9/merge, output: ""
</code>
#0 building with "builder-d99a4367-77ea-4ed0-93ed-c4feadc1693d" instance using docker-container driver
#1 [internal] load git source https://github.com/***/repo.git#refs/pull/9/merge
#1 0.121 Initialized empty Git repository in /var/lib/buildkit/runc-overlayfs/snapshots/snapshots/1/fs/
#1 ERROR: repository does not contain ref refs/pull/9/merge, output: ""
------
> [internal] load git source https://github.com/***/repo.git#refs/pull/9/merge:
0.121 Initialized empty Git repository in /var/lib/buildkit/runc-overlayfs/snapshots/snapshots/1/fs/
------
ERROR: failed to solve: failed to read dockerfile: failed to load cache key: repository does not contain ref refs/pull/9/merge, output: ""
Error: buildx failed with: ERROR: failed to solve: failed to read dockerfile: failed to load cache key: repository does not contain ref refs/pull/9/merge, output: ""
I cannot figure out what is causing it.
Any help would be greatly appreciated as this is driving me insane.