Actions in this workflow must be: within a repository owned by ORGANIZATION.
philjn opened this issue · 0 comments
Describe the bug
The recent addition of #536, resulted in the GitHub Action workflow Sync workflow: https://github.com/philosowaffle/peloton-to-garmin/blob/8321bdecf99589bd47e1594f8f48cb72ecc35a5c/.github/workflows/sync_peloton_to_garmin.yml to fail with an error like:
actions/upload-artifact@v3 is not allowed to be used in philjn/peloton-to-garmin. Actions in this workflow must be: within a repository owned by philjn.
To Reproduce
Steps to reproduce the behavior:
- Follow steps in Wiki to create your own GitHub action: https://philosowaffle.github.io/peloton-to-garmin/install/github-action.html
- Run "Sync workflow" action in your GitHub actions section
- Observe above failure output
Expected behavior
Sync workflow runs without issues as per the Wiki documentation: https://philosowaffle.github.io/peloton-to-garmin/install/github-action.html
Root cause
The cause of the failure is because the "actions/upload-artifact@v3" action is from the GitHub organization and if you have not allowed actions from the GitHub organization the call to the action will fail.
This was determined by looking at other similar issues:
- Actions in this workflow must be: within a repository owned by #26609
- Checkout@v2 error: Actions in this workflow must within a repository owned by ORGANIZATION #25488
Solution:
Enable Actions authored by GitHub (This setting is also where you can allow other ORGANIZATION actions as well)
- Goto your forked repro of peloton-to-garmin
- Goto Settings->Actions->General
- Under Action Permissions choose the 4th option titled: "Allow ", and select non-, actions and reusable workflows.
- Check the checkbox to "Allow actions created by GitHub"
Suggestion:
- Update Wiki documentation https://philosowaffle.github.io/peloton-to-garmin/install/github-action.html with steps to allow GitHub authored Actions to execute.