-
Notifications
You must be signed in to change notification settings - Fork 70
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
Scheduled run fails #84
Comments
Here is an example from flutter failing because of the same reason. |
We fixed this in v1.0.3 https://github.com/ossf/scorecard-action/releases/tag/v1.0.3 In the meanwhile, can you please use Please confirm this works. Let me update the documentation now. |
In my case I did use
|
correct. I was checking your hash and you have the right one. Flutter has the old one. |
I think I've found the issue: your run logs has |
I created a new token using the same permissions you have in the readme, then ran it: curl -s -H "Authorization: Bearer $GITHUB_AUTH_TOKEN" https://api.github.com/repos/ben-manes/caffeine > repo_info.json
ben: caffeine $ echo $SCORECARD_PRIVATE_REPOSITORY
false
ben: caffeine $ echo $SCORECARD_DEFAULT_BRANCH
refs/heads/master |
We used to take this variable from the json payload https://github.com/ossf/scorecard-action/pull/83/files, but it turns out schedule events don't have one, so I switched to the env variable |
no worries, thank you! |
cc @ChrisCarini |
Found this issue via a similar failure in https://github.com/ScottBrenner/cfn-lint-action/runs/5074749835?check_suite_focus=true#step:4:15.
From https://github.community/t/repository-name-in-environment-variable/16856/7:
Reference https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#schedule |
Thank you. I expected the env variable to be set even though there's no event payload.. after all The Thank you all for your help! |
cc @GuillaumeRoss who reported the same on the scorecard repo ossf/scorecard#1610 |
The repository info is available from the git checkout. Bash code I have running elsewhere (but should work on a GH runner after the remote=$(git for-each-ref --format='%(upstream:remotename)' "$(git symbolic-ref -q HEAD)")
remote_url=$(git remote get-url "${remote}") This retrieves the remote name for the current HEAD, then gets the URL for that remote. On any
and the above bash code will set |
Other alternatives:
However, since scheduled runs don't have a webhook payload, these paths probably will be dead ends too. I suspect that the |
Ah, found it; the So, that provides you with another alternative: add a |
They are investing atm. The variable should be set, should it not? |
The schedule does run on repo head, and failed. This failed, scheduled run was executed against the main branch of the repository. The
checked out revision c3faf844845191f9a19cf68f1082fb4632e45a9b, which was the head at the time of the run:
The
|
Side note: I strongly recommend you run
Since the runners are using Ubuntu Focal (20.04LTS) I think their curl version isn't new enough yet to use |
@laurentsimon meant that he thinks this issue was fixed in an unreleased version (probably 6cc0399), so changing the action's hash from |
Ah! Check! That's the part I missed then. |
Thanks @ben-manes for the clarification, that's indeed what I meant. |
I set up this action and the scheduled run failed with,
Since I followed your guide and did not modify this action, I think there is a missing step somewhere?
The text was updated successfully, but these errors were encountered: