Skip to content
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

Update Actions format to new workflow declaration #147

Merged
merged 2 commits into from Aug 19, 2019

Conversation

max
Copy link
Contributor

@max max commented Aug 19, 2019

No description provided.

@gep13
Copy link
Collaborator

gep13 commented Aug 19, 2019

@max thanks for doing this!

Just so I am clear...

Is the check that I am seeing here as a result of the change that you just made? I wouldn't have expected to see this until after the change was merged?

@gep13
Copy link
Collaborator

gep13 commented Aug 19, 2019

@max also, any ideas on "why" the check failed? Last time it ran on the master branch, the linting all passed.

@max max marked this pull request as ready for review August 19, 2019 18:16
@max
Copy link
Contributor Author

max commented Aug 19, 2019

@gep13 The check failed because I forgot to explicitly actions/checkout the workspace. I will reply to your other comment in a bit.

@max
Copy link
Contributor Author

max commented Aug 19, 2019

@gep13 OK, I had to do a double take to make sure everything worked as intended. Here is how the events for push and pull_request work:

  • The push is triggered when you push to the repo (not including forks).
  • The pull_request is triggered when a pull request is opened. If the PR comes from a fork we do not send any secrets to the workflow other than a read only GITHUB_TOKEN. If the pull request comes from within the house repo it has access to all secrets.

@gep13
Copy link
Collaborator

gep13 commented Aug 19, 2019

@max this is great! This will be really useful to have on this repository!

And just to be "super" (:smile:) clear, the fact that this is working on this repository, and by that I mean PR's from forks triggering the check, this is something that you had to enable, correct? Or will this work for all public, open source projects that have switched to the new format for workflows?

Copy link
Collaborator

@gep13 gep13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gep13 gep13 merged commit 4b9bbb6 into sdras:master Aug 19, 2019
@max
Copy link
Contributor Author

max commented Aug 19, 2019

It’s currently a beta but I’m happy to enable it for your other repositories if you’d like.

It will be available to everyone November 13th.

@jletey
Copy link

jletey commented Aug 19, 2019

@max Would love access to the GitHub Actions beta for @learn-anything!

We're currently getting ready for a new release and would love to use the new CI/CD capabilities of GitHub Actions!

Also having it enabled for @starship would be nice so that we can transfer from Azure Pipelines 😄

@gep13
Copy link
Collaborator

gep13 commented Aug 19, 2019

@max thank you very much for the offer, I may well take you up on that. Currently this repository is the only one where I am "actively" using GitHub Actions, but there are plans afoot for some others to start using them as well, specifically the repositories under the Cake organisation. If you could work your magic there I would really appreciate it!

@cryptiklemur
Copy link

pull_request doesn’t trigger on pushes to the pr fork?

@cryptiklemur
Copy link

I’m trying this same workflow on an org that has actions and I’m not seeing actions being ran...

@xt0rted
Copy link
Contributor

xt0rted commented Aug 19, 2019

@max in v1 the pull_request event would also fire for things like adding/removing labels. Is this still the case with v2? Most CI workflows don't need to run on these event actions so I was adding extra filtering so builds wouldn't run each time labels were updated.

@cryptiklemur
Copy link

If the PR comes from a fork we do not send any secrets to the workflow other than a read only GITHUB_TOKEN

It would also be nice if this could only be the case for public repos, or configurable for private repos.

@max
Copy link
Contributor Author

max commented Aug 19, 2019

@aequasi You may need a separate flag for the new Actions. Feel free to email me (max at github dot com) so we can leave this PR in tact.

@xt0rted It no longer fires on those events. If you want to include those you have to add an additional attribute:

on:
  pull_request:
    types: [labeled, assigned]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants