Closed SijmenHuizenga closed 4 years ago
This might be the problem:
When running the workflow in a pr, the repo is set to M0nica/httriri
. (Because somehow the branch that is being pulled in is somewhere in the origin repo already). In here: https://github.com/M0nica/httriri/runs/1217566900 it shows:
Run actions/checkout@v2
with:
ref: main
repository: M0nica/httriri
This is a workflow on a pr from my fork, so it should commit into my forked repo. But if the repo is set to M0nica original repo for sure it aint going to work. I guess?
Anyaway I will try setting the repo to the original or something like that.
This is a useful reference about the github env context: https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#github-context
The workflow ran on the current repo (and not in the forked repo) and thus the workflow cannot push to the forked repo. For example, the last commit in this pr (committed on my forked repo) is secretly also in the M0nica repo: the shadow commit https://github.com/M0nica/httriri/commit/bc478800cbdb47d868fd63f4d8b498e252eaab30. That shadow commit is used to run the workflow. And since pushing is only possible on the forked repo, it fails.
My conclusion: Automatically adding a commit on a forked branch during a pull-request workflow is not possible with out-of-the-box tooling.
It is just a test pr to investigate why the resize-workflow added in #74 is not working. It's not supposed to be merged.