#While rewriting a GHA workflow to pure

1 messages · Page 1 of 1 (latest)

tidal vine
#

Hey Mark!

Im having trouble fully understanding the problem, is there a run that I could look at and play around with?

knotty aspen
#

Hey Lev!

There are two issues actually.

I reproduced both in this PR: https://github.com/openmeterio/benthos-openmeter/pull/11

Isssue #1 is when you try to call a remote module using dagger call pointing to the temporary commit created for the PR.

(This commit: https://github.com/openmeterio/benthos-openmeter/commit/d3b31caf8713e8060da7cc6de24b745447b6167d)

Here is the failed run for that: https://github.com/openmeterio/benthos-openmeter/actions/runs/7458733839/job/20293283105?pr=11

The second issue exists for the same reason: when you try to grab a Git repo using dag.Git.

The root cause is due to how pull requests work: the commit that triggers the GHA workflow belongs to a ref (pull/ID/merge) that is not fetched by default.

For the second issue, this can be worked around by manually running pull for that ref.

For the first issue, I went for referencing the commit on the branch (instead of the merge commit of the PR), but I believe it might only work for PRs opened from branches in the same repo (ie. not from forks).

Hope that helps.

GitHub

Ingest events into OpenMeter from everywhere. Contribute to openmeterio/benthos-openmeter development by creating an account on GitHub.

knotty aspen