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

Request : Boilerplate plugin that implements this github action #11

Open
kevindaus opened this issue Oct 15, 2019 · 7 comments
Open

Request : Boilerplate plugin that implements this github action #11

kevindaus opened this issue Oct 15, 2019 · 7 comments
Assignees
Labels
type:enhancement New feature or request.
Milestone

Comments

@kevindaus
Copy link

Is your enhancement related to a problem? Please describe.
Not related to a problem -- more of an additional documentation.

Describe the solution you'd like
A boilerplate wordpress plugin project that anyone can just clone and easily test using this github action .

Designs
Foo Wordpress Plugin - a boilerplate wordpress plugin implements this wordpress action.

Describe alternatives you've considered
none

Additional context
It would be cool to see a project that anyone can clone and play with immediately .

Hope you would consider my suggestion . Cheers!

@kevindaus kevindaus added the type:enhancement New feature or request. label Oct 15, 2019
@helen
Copy link
Collaborator

helen commented Oct 15, 2019

Hi @kevindaus! I totally agree, we should add sample workflow files to https://github.com/10up/plugin-scaffold, which you can use as a template when starting a new repo right in GitHub. Is that something you’d be interested in submitting a pull request for? I’m also happy to take care of it.

@madiodio
Copy link

madiodio commented Oct 24, 2019

Hi there, is there at least any guide on how to get this running at all ? As #10 suggested. It would be awesome if there was a basic step by step to make sure you're not going to run on some errors that could be avoided.

I've migrated this to the new syntax (from HCL to .yml) and can't run successfully the action anymore. It constantly fails on this message that's not really helping fatal: not a git repository (or any parent up to mount point /github)

Thanks.

@helen
Copy link
Collaborator

helen commented Oct 25, 2019

@madiodio You’ve commented out the - uses: actions/checkout@master step, which is necessary to have any of the GitHub repo available for use during the run. While I’m sympathetic to confusion as people get used to the new syntax and Actions in general, I’m not sure it’s worth duplicating general Actions documentation here. What do you think would make the basic example clearer?

@madiodio
Copy link

madiodio commented Oct 26, 2019

@helen Thanks for pointing that out, including -uses: actions/checkout@master in the steps actually fixes the issue. What confused me was whether or not the npm install was needed at all.

I totally get that it could make duplicate the actual Actions documentations but a simple step by step would not hurt IMHO. I believe this would help maintain this repo like helping reduce issues like this and resolve bugs based on what step the user did get stuck on. For example:

Installation

Step 1 :

  • Register your secrets env. keys (SVN_USERNAME and SVN_PASSWORD) ...
  • Optionally add SLUG, VERSION, ASSETS_DIR ...

Step 2 : Create a file in .github/workflow named main.ymlfor example, copy the example, make changes if necessary (SLUG) and paste it inside the main.yml file that you just created

Step 3 (Optional) : Create a .distignore (or .gitattributes adding export-ignore at the end of each line) to make sure you're excluding files/folders you don't want to end in the deployed plugin folder

Step 4 : Deploy your plugin as you would by tagging a new version and pushing.

Also, you can fork this repo (link to a template repo maybe 10up/plugin-scaffold ?) clone it and deploy using the previous steps.


If this sounds ok for you I can put together a PR.

Thanks.

@helgatheviking
Copy link

@madiodio I would love a step by step. I'm meandering my way through right now. I'm stuck on what permissions you need to give your github token so a screenshot of that would be a nice addition to the docs too.

@helen
Copy link
Collaborator

helen commented Apr 11, 2020

@helgatheviking For the typical use case there shouldn’t be much more to it besides copying the base workflow file and adding the SVN_USERNAME and SVN_PASSWORD secrets to the repo settings. GITHUB_TOKEN is not required for this particular Action and is automatically provided by the Actions environment so there’s nothing to configure. Can you describe what you’re doing?

@helgatheviking
Copy link

@helen Hi Helen! thank you so much for replying. The first example I looked at for this was in ElasticPress which had a GITHUB_TOKEN in it. But looking at the docs again, and now you've confirmed, that isn't necessary. Thanks for clearing that up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request.
Projects
Status: In Progress
Development

No branches or pull requests

5 participants