Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Github Actions available on forked repositories?

I forked watchman repository and I want to add some steps to its main.workflow (the goal is to publish artifacts to create a snap package).

But I'm not able to see the Actions tab in the repository.

Are there any additional steps to configure Github Actions available on a forked repository?

like image 310
Gonzalo Matheu Avatar asked Oct 03 '19 14:10

Gonzalo Matheu


People also ask

How do I enable actions on GitHub repository?

On GitHub.com, navigate to the main page of the repository. Under your repository name, click Settings. In the left sidebar, click Actions, then click General. Under "Actions permissions", select Allow OWNER, and select non-OWNER, actions and reusable workflows and add your required actions to the list.

Is it legal to fork in GitHub?

GitHub require you license public repos to allow others to fork it. Whether they can use it for a specific purpose is still questionable - but clicking the fork button on github is allowed.


2 Answers

I'm not able to see the Actions tab in the repository.

Update August 2020, 10 months later, see:

GitHub Actions improvements for fork and pull request workflows

written by Chris Patterson

New settings for private repository forks

[...] To enable these users to run workflows on fork pull requests, we’ve introduced three new settings at the enterprise, organization, and repository level for private repositories only.

https://i0.wp.com/user-images.githubusercontent.com/185122/88571581-de3d5300-d00b-11ea-8d8c-027e951d63e1.png?ssl=1

Improvements for public repository forks

[...] we’ve added a new pull_request_target event, which behaves in an almost identical way to the pull_request event with the same set of filters and payload.

However, instead of running against the workflow and code from the merge commit, the event runs against the workflow and code from the base of the pull request.
This means the workflow is running from a trusted source and is given access to a read/write token as well as secrets enabling the maintainer to safely comment on or label a pull request.
This event can be used in combination with the private repository settings as well.

like image 103
VonC Avatar answered Oct 19 '22 20:10

VonC


No further actions are required, as long you or your organization is signed into beta. You should see Actions running on next push to fork, or however workflows are set. It's also often suggested to commit changes to workflow file(s) in your fork (editing those coming from upstream or adding your own).

If it takes too long, you can always report it on Actions forum; i've seen a few threads about exactly same problem in last weeks, with GitHub staff fixing it manually.

like image 20
Samira Avatar answered Oct 19 '22 20:10

Samira