2 years ago
#15960

GuiFalourd
"No assets to download" on Github Actions using Github CLI
Context
I'm trying to download a release from a private repository in my Github Actions workflow using Github CLI gh release download command.
Here is my workflow:
name: Download Release Private Repo
on: [push, workflow_dispatch]
jobs:
get-asset:
runs-on: ubuntu-latest
steps:
- name: List Releases
run: gh release list --repo GuillaumeFalourd/formulas-training # private repo
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Check release
run: gh release view 2.13.3 --repo GuillaumeFalourd/formulas-training
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Fetch latest release
run: gh release download 2.13.3 --repo GuillaumeFalourd/formulas-training
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
Issue
I'm getting a no assets to download
message error when I use the Github CLI command gh release download
in my Github Actions workflow as shown above.
What I tried
I checked in previous steps that the release is present and it actually returns me the following data:
List releases STEP
Run gh release list --repo GuillaumeFalourd/formulas-training
2.13.3 Latest 2.13.3 2021-04-05T17:17:17Z
2.13.2 2.13.2 2021-04-05T17:15:10Z
2.13.1 2.13.1 2021-04-05T17:11:37Z
2.13.0 2.13.0 2021-04-04T22:57:09Z
2.12.2 2.12.2 2021-04-01T21:35:37Z
1.13.0 1.13.0 2021-02-24T16:26:33Z
...
Check release STEP
Run gh release view 2.13.3 --repo GuillaumeFalourd/formulas-training
title: 2.13.3
tag: 2.13.3
draft: false
prerelease: false
author: GuillaumeFalourd
created: 2021-04-05T17:16:56Z
published: 2021-04-05T17:17:17Z
url: https://github.com/GuillaumeFalourd/formulas-training/releases/tag/2.13.3
Moreover, I followed what has been explained in that thread on the github cli repository and got the same error.
Notes
- The full workflow run with the error can be found here
- The secret I use as GITHUB_TOKEN environment variable is a
Personal Access Token
with all permissions enabled. - The release 2.13.3 from this private repository seems ok as it has been downloaded using the Github API in the past successfully.
- I used this workflow as reference which seems to work fine.
Question
What is wrong with my implementation? Did I miss something?
github
github-actions
github-cli
0 Answers
Your Answer