dsaltares / fetch-gh-release-asset

Github Action to download an asset from a Github release
MIT License
114 stars 70 forks source link

Example from README does not work #5

Closed priya2811-khatri closed 4 years ago

priya2811-khatri commented 4 years ago

I tried to fetch an assets from another repo by using the Readme Example.

uses: dsaltares/fetch-gh-release-asset@master
with:
  repo: “Organisation/Repo”
  version: "latest"
  file: "asset_01.zip"
  token: ${{ secrets.MY_TOKEN }}

Job failed with an error of Missing GITHUB_TOKEN env variable.

Then I tried with following method:

uses: dsaltares/fetch-gh-release-asset@master
       env:
        GITHUB_TOKEN: ${{ secrets.MY_TOKEN }}
       with:
        repo: "Organisation/Repo"
        version: "latest"
        file: "asset_01.zip"
        token: ${{ env.GITHUB_TOKEN }}

And it worked.

dsaltares commented 4 years ago

The GITHUB_TOKEN env variable is no longer required as of https://github.com/dsaltares/fetch-gh-release-asset/pull/8. However, one does need to specify it via command line or via action options. I will update the README.md example.

dsaltares commented 4 years ago

Fixed by https://github.com/dsaltares/fetch-gh-release-asset/commit/1b96af4179c7d64fde543758dff8ca6f6df4cd77

dsaltares commented 4 years ago

Thanks for reporting!