Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using fork of ci-action fails #267

Closed
axel-h opened this issue Apr 5, 2023 · 2 comments
Closed

Using fork of ci-action fails #267

axel-h opened this issue Apr 5, 2023 · 2 comments
Assignees

Comments

@axel-h
Copy link
Member

axel-h commented Apr 5, 2023

In Hensoldt-Cyber/camkes-vm-examples#5 I want to test with a custom ci-action and use "Test with: Hensoldt-Cyber#3" but this fails. In https://github.com/Hensoldt-Cyber/camkes-vm-examples/actions/runs/4617639833/jobs/8164126406 is says

Setting up
  Starting repo checkout on branch master with manifest master.xml:
  
  repo has been initialized in /github/workspace
  repo sync has finished successfully.
  Fetching 74b432ec7cf8f8b0773faf29be7049407243d452 from github.com/Hensoldt-Cyber/camkes-vm-examples.git
  extra PRs: Hensoldt-Cyber/ci-actions#3
  unknown
  Fetching refs/pull/3/head from github.com/Hensoldt-Cyber/ci-actions.git
  fatal: not a git repository (or any parent up to mount point /github)
  Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
  fatal: not a git repository (or any parent up to mount point /github)
  Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
...

Why can't it fetch this PR, it is really GIT_DISCOVERY_ACROSS_FILESYSTEMthat must be set?

@axel-h
Copy link
Member Author

axel-h commented Apr 5, 2023

Sam issue if it's a PR in the seL4 organization, see https://github.com/Hensoldt-Cyber/camkes-vm-examples/actions/runs/4617763392/jobs/8164399372?pr=5

Setting up
  Starting repo checkout on branch master with manifest master.xml:
  repo has been initialized in /github/workspace
  repo sync has finished successfully.
  Fetching 0f9fd9cce918a25f8f0e0227fea4f1585ec04fe9 from github.com/Hensoldt-Cyber/camkes-vm-examples.git
  extra PRs: seL4/ci-actions#268
  unknown
  Fetching refs/pull/268/head from github.com/seL4/ci-actions.git
  fatal: not a git repository (or any parent up to mount point /github)
  Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
  fatal: not a git repository (or any parent up to mount point /github)
  Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
...

@axel-h axel-h changed the title Using fork of ci-action from other github organization fails Using fork of ci-action fails Apr 5, 2023
@lsf37
Copy link
Member

lsf37 commented Apr 5, 2023

Test with only refers to repositories that are mentioned in the manifest the test is running on (e.g. camkes-vm-examples-manifest). Saying Test with: org/ci-actions#n doesn't make sense in that context.

We could try to make ci-actions a special case, but that also doesn't make any sense, because at the time the action runs it is much too late -- it is already running the old version of the action (the action reads the PR text). It'd have to somehow reset and restart itself in a different version which is not supported by any of the underlying GitHub infrastructure (and probably shouldn't be for security). It'd also need to be able to automatically build and deploy test docker containers etc.

Testing action code works differently and depends on what kind of action it is. If it is a docker action you need to build and deploy that container manually somewhere and modify the workflow file in the repo you are testing to point to that new container. You'll usually want to change the test trigger to push: <testing-branch> where <testing-branch> is the PR branch in your repo that you want to test the action with. After all this, when you push to the branch it should be executing the new action code.

This is not anything to do with the action setup in ci-actions, it's just how GitHub actions work. I don't think there is anything to implement or fix here, even if it is annoying to do.

What I could try to do is write up a small doc that has instructions on how to do this, because it is absolutely true that this all a bit complex.

@axel-h axel-h closed this as completed Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants