kbss-cvut / s-forms

SForms - Semantic form generator and processor. For ontology-based smart forms.
GNU Lesser General Public License v3.0
4 stars 7 forks source link

Publish-npm-beta github action fails from fork and dependabot PR #292

Closed blcham closed 4 months ago

blcham commented 5 months ago

PRs created from a fork or dependabot are causing failure in GH action publish-npm-beta step.

1) PR created from fork https://github.com/kbss-cvut/s-forms/pull/288 resulted in GH action failure https://github.com/kbss-cvut/s-forms/actions/runs/8362521150:

Run phips28/gh-action-bump-version@master.
...
...
runInWorkspace | command: git args: [ 'checkout', 'fix/imports' ]
✖  fatal     error: pathspec 'fix/imports' did not match any file(s) known to git

git exited with code 1
✖  fatal     Failed to bump version

2) Same failure occurred due to dependabot PR https://github.com/kbss-cvut/s-forms/pull/290, which resulted in GH action https://github.com/kbss-cvut/s-forms/actions/runs/8386115851/job/22965992150 containing failure:

Run phips28/gh-action-bump-version@master.
...
...
runInWorkspace | command: git args: [ 'checkout', 'dependabot/npm_and_yarn/webpack-dev-middleware-6.1.2' ]
✖  fatal     error: pathspec 'dependabot/npm_and_yarn/webpack-dev-middleware-6.1.2' did not match any file(s) known to git

git exited with code 1
✖  fatal     Failed to bump version

Moreover, note we have some deprecations in build which most-likely does not cause the issue, but worth mention it here / can be solved as part of solution. See https://github.com/kbss-cvut/s-forms/actions/runs/8362521150 image

LaChope commented 5 months ago

Re-opening as it needs to be tested.

blcham commented 5 months ago

I checked all GH actions and i can confirm that workflow Publish NPM Beta Package never worked from fork.

LaChope commented 5 months ago

I am reopening and reverting commits, except for deprecation notes (https://github.com/kbss-cvut/s-forms/commit/0283499f22529761efe7ed690806f1a7789d5fe1) as none of the fixes worked. We might have to change the workflow in the future. The issue comes from - uses: "phips28/gh-action-bump-version@master" in npm-publish-beta.yml. It is trying to checkout a unknown branch (from fork or from dependabot), and fails to do so.

blcham commented 5 months ago

I would try to run the following:

Consider trying it on two new forks instead of in s-forms repo as it is easy to do (no need to set up secret or something like that for problematic steps)

LaChope commented 4 months ago

@blcham I am closing ticket, https://github.com/kbss-cvut/s-forms/pull/338 shows that action is working (see https://github.com/kbss-cvut/s-forms/actions/runs/8786566046/job/24109717845).