# Gitea actions building and pushing images to Harbor

**URL:** <https://forum.gitea.com/t/gitea-actions-building-and-pushing-images-to-harbor/11311>\
**Category:** Actions\
**Created:** [May 25, 2025, 3:29am UTC](https://forum.gitea.com/t/gitea-actions-building-and-pushing-images-to-harbor/11311 "2025-05-25T03:29:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CJLove](https://avatars.discourse-cdn.com/v4/letter/c/e56c9b/32.png) [@CJLove](https://forum.gitea.com/u/CJLove)\
**Post date:** [May 25, 2025, 3:29am UTC](https://forum.gitea.com/t/gitea-actions-building-and-pushing-images-to-harbor/11311/1 "2025-05-25T03:29:15Z")

</div>

I’m running self-hosted Gitea with 4 runners in containers. For the longest time I’ve run a vanilla Docker registry with a self-signed cert and CA. I’ve been able to use the docker actions (e.g. `setup-buildx-action`, `login-action`, `build-push-action`) to build container images and push to my registry without any issues. The CA is pushed into the runner containers and is available for `setup-buildx-action`.

Recently I stood up a self-hosted instance of Harbor, again with a self-signed cert under the same CA. I thought it would be seamless to push to Harbor instead of my existing registry, but alas the build-push-action is consistently failing and complaining about the Harbor registry’s cert:

```auto
#8 exporting to image
#8 exporting layers
#8 exporting layers 3.1s done
#8 exporting manifest sha256:6cabbf5a6f392b27cca7ac6aab7fb71f83088911464607858ab9ea1b3e392296 done
#8 exporting config sha256:96e83991f20e6a1b719869ac5f8de08a16077701cfb7c5bd1e5f04b6680229bb done
#8 exporting attestation manifest sha256:60677a1c42ce0239825d4c30480f300bef14b7c93a89dbf694a4ddc4c527429a 0.0s done
#8 exporting manifest list sha256:e0c532dcd340bcce19fc20c466a81d9309b186269be78a2dbfe5bef44db6c68f 0.0s done
#8 pushing layers
#8 pushing layers 0.1s done
#8 ERROR: failed to push harbor. ***.io/test/threadtest:latest: failed to authorize: failed to fetch oauth token: Post "https://harbor.***.io/service/token": tls: failed to verify certificate: x509: certificate signed by unknown authority
#9 [auth] test/threadtest:pull,push token for harbor.***.io
#9 DONE 0.0s
#10 [auth] test/threadtest:pull,push token for harbor.***.io
#10 DONE 0.0s

```

I can manually do the equivalent steps with docker buildx to create the image and push to Harbor, so I think it’s something with the docker actions. That being said there are a lot of moving parts 🙂 and a lot of chances for pilot error.

Has anyone done this successfully?

---

<div class="post-metadata">

**Author:** ![lmtr0](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/lmtr0/32/6875_2.png) [@lmtr0](https://forum.gitea.com/u/lmtr0)\
**Post date:** [May 26, 2025, 1:13pm UTC](https://forum.gitea.com/t/gitea-actions-building-and-pushing-images-to-harbor/11311/2 "2025-05-26T13:13:04Z")

</div>

You can try [kaniko](https://github.com/GoogleContainerTools/kaniko) and see what happens
