teslamate-org / teslamate

A self-hosted data logger for your Tesla 🚘
https://docs.teslamate.org
MIT License
5.86k stars 733 forks source link

`ghcr_build` workflows fail when running from a fork #4266

Open scottbot95 opened 5 hours ago

scottbot95 commented 5 hours ago

Is there an existing issue for this?

What happened?

When submitting a pull request from a fork the various ghcr_build workflows will fail with 403 errors (presumably because the workflow is trying to push to the main repository from the PR fork)

(example)

Expected Behavior

We either just build, but don't publish the various images, or we push images to the fork the PR originates from.

Steps To Reproduce

  1. Create fork
  2. Submit PR

Relevant log output

N/A

Screenshots

No response

Additional data

No response

Type of installation

Manual

Version

N/A

scottbot95 commented 4 hours ago

According to this post it sounds like we could probably use github.event.pull_request.head.repo.full_name instead of github.repository