datalad / git-annex

A non-official clone of git-annex established for DataLad purposes. No PRs will be merged, but could be used to test perspective git-annex patches. Official git-annex repository: https://git.kitenet.net/index.cgi/git-annex.git/
16 stars 3 forks source link

workflows do not work in a fork #86

Closed joeyh closed 2 years ago

joeyh commented 2 years ago

I forked this repo intending to use the windows build workflow, with the goal of building with profiling enabled. But that workflow hardcodes datalad/git-annex when downloading libmagic, which fails with an access denied error, so it needs to be edited in order to work in a fork.

It would be nice if this workflow worked unmodified in a fork. Perhaps that hard coding could be avoided, although I don't know how. After deleting the libmagic stanzas from the workflow, it seems to mostly work, at least through building git-annex.

yarikoptic commented 2 years ago

I guess we should just use GITHUB_REPOSITORY (https://docs.github.com/en/actions/learn-github-actions/environment-variables) env var to avoid hardcoding datalad/git-annex but I have not analyzed on what other ramifications would be as what else needs to be tuned up etc.

@joeyh should we may be enable a build here with profiling enabled or is that a rare need (I guess you need it only for windows?)?

jwodder commented 2 years ago

@joeyh I assume you're referring to this step? The problem isn't that it "hardcodes datalad/git-annex"; the problem is that it downloads a build artifact from a GitHub Action, which requires a GitHub token with admin(?) permission for the datalad/file-windows repository.

@yarikoptic One way around this would be to create a GitHub release of datalad/file-windows and upload a recent build artifact as a release asset (which can be done once manually, as it's unlikely the artifact will change much going forwards) and have the build step download that release asset.

yarikoptic commented 2 years ago

@yarikoptic One way around this would be to create a GitHub release of datalad/file-windows and upload a recent build artifact as a release asset (which can be done once manually, as it's unlikely the artifact will change much going forwards) and have the build step download that release asset.

Sounds good. Please create a release -- we seems only inherited a tag from the original repo we "forked" and never created our own releases there. Indeed, probably not worth automating since we aren't rebuilding it on a regular basis

jwodder commented 2 years ago

@yarikoptic Release created.