Skip to content

Change kernel build symlinks to use repo owner's path (not HC path) #2802

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

Closed
wants to merge 1 commit into from

Conversation

utajum
Copy link
Contributor

@utajum utajum commented Feb 13, 2025

The kernel compilation workflow currently fails in forked repositories due to hardcoded /ophub/ paths in the symlink creation.

This PR replaces them with ${GITHUB_REPOSITORY_OWNER} to make sure the kernel build and output directories are correctly linked in the GitHub Actions workspace, regardless of who owns the fork.

Tested in a forked repository to verify the workflow completes successfully.

@ophub
Copy link
Owner

ophub commented Feb 14, 2025

The repository address is related to the actions repository you introduced. If you change it to the runner’s repository, it will throw an error because the YAML file refers to my repository.

Snip20250214_1
Snip20250214_2

@ophub ophub closed this Feb 14, 2025
@utajum
Copy link
Contributor Author

utajum commented Feb 17, 2025

Im not sure I understand

${GITHUB_REPOSITORY_OWNER} will have the value ophub when run in this repo, so nothing will change

${GITHUB_REPOSITORY_OWNER} will have the value of repo owner name when forked so repo owner will have to change only the uses: as stated at https://github.com/ophub/amlogic-s9xxx-armbian/tree/main/compile-kernel

uses: YOUR-REPO/amlogic-s9xxx-armbian@main

since path /home/runner/work/_actions/ophub/amlogic-s9xxx-armbian/main/compile-kernel/kernel does not exist in forked repos runners

maybe worth a second look

btw, very cool project
thank you for all the hard work

@ophub
Copy link
Owner

ophub commented Feb 18, 2025

- name: Compile the kernel [ ${{ inputs.kernel_version }} ]
  uses: ophub/amlogic-s9xxx-armbian@main
  if: ${{ steps.mapped.outputs.status }} == 'success' && !cancelled()
  with:
    build_target: kernel
    kernel_source: ${{ inputs.kernel_source }}
    kernel_version: ${{ inputs.kernel_version }}
    kernel_auto: ${{ inputs.kernel_auto }}
    kernel_package: ${{ inputs.kernel_package }}
    kernel_sign: ${{ inputs.kernel_sign }}
    kernel_toolchain: ${{ inputs.kernel_toolchain }}
    compress_format: ${{ inputs.compress_format }}

The repository provides Actions, and most people directly use Actions for kernel compilation without forking the repository and modifying the USER to point to their own repository. So, if the user does not fork the repository and directly uses Actions, using ${GITHUB_REPOSITORY_OWNER} will result in an error because their own repository does not have this. According to the usage of Actions, users are not required to fork the repository; they can simply import and use it. Therefore, the default is ophub, and if custom scripts are needed, the user should fork the repository and modify it to their own.

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

Successfully merging this pull request may close these issues.

2 participants