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

Upload to another github repo Doesnt work: #113

Closed
Eliminater74 opened this issue Jul 1, 2021 · 5 comments
Closed

Upload to another github repo Doesnt work: #113

Eliminater74 opened this issue Jul 1, 2021 · 5 comments

Comments

@Eliminater74
Copy link

Testing the option to upload to another repo, doesnt seem to work, it still defaults to current repo only.

Example of use:

    - name: Upload firmware to release
      uses: softprops/action-gh-release@master
      if: steps.tag.outputs.status == 'success' && !cancelled()
      env:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        GITHUB_REPOSITORY: DevOpenWRT-Router/OpenWRT_LEDE_PureFusion_Releases
      with:
        tag_name: ${{ steps.tag.outputs.release_tag }}
        body_path: release.txt
        files: ${{ env.FIRMWARE }}/*
@lcapka
Copy link

lcapka commented Jul 23, 2021

I'm having the same issue. In the log, the action reports current repo URL it seems that GITHUB_REPOSITORY env is ignored for some reason.

@softprops
Copy link
Owner

I'm just speculating but could it be that the GITHUB_TOKEN value does not have permissions to create a release in the target repository? The default token provided to a workflow run tends to be scoped to just that repo.

@Eliminater74
Copy link
Author

I am pretty sure I gave the token full permissions for anything github related.. including to other repos..

@lcapka
Copy link

lcapka commented Jul 27, 2021

Me too. I tried to generated a new personal token (and other options) - the result is still the same. It simply doesn't work trying to push to the original repo where the workflow is running, not to the selected repository.

Sadly, I don't see an error in the code here either...

@softprops
Copy link
Owner

this should now be fixed in the latest release. fixes were pushed to v1.

the underlying issue was the resolution of where the token was source from. this was fixed in this pull which makes the previous update backwards compatible

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

3 participants