philosowaffle/peloton-to-garmin

Actions in this workflow must be: within a repository owned by ORGANIZATION.

philjn opened this issue · 0 comments

philjn commented

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:

  1. Follow steps in Wiki to create your own GitHub action: https://philosowaffle.github.io/peloton-to-garmin/install/github-action.html
  2. Run "Sync workflow" action in your GitHub actions section
  3. 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:

Solution:
Enable Actions authored by GitHub (This setting is also where you can allow other ORGANIZATION actions as well)

  1. Goto your forked repro of peloton-to-garmin
  2. Goto Settings->Actions->General
  3. Under Action Permissions choose the 4th option titled: "Allow ", and select non-, actions and reusable workflows.
  4. Check the checkbox to "Allow actions created by GitHub"

Image of setting:
image

Suggestion:

  1. Update Wiki documentation https://philosowaffle.github.io/peloton-to-garmin/install/github-action.html with steps to allow GitHub authored Actions to execute.