![]() ![]() These variables are then available to the node client.js script. This example demonstrates how to create custom variables named POSTGRES_HOST and POSTGRES_PORT. If you need to use custom environment variables, you can set these in your YAML workflow file. ![]() GitHub Actions include default environment variables for each workflow run. In this guide, we'll discuss some of the essential customization techniques such as using variables, running scripts, and sharing data and artifacts between jobs. Hence why I was looking for a better solution to add to PR instead.GitHub Actions allow you to customize your workflows to meet the unique needs of your application and team. If the generate script messes up then master could get in a bad way. It works, but it does make some people nervous that we are committing changes directly to master without reviewing them as part of a PR. Yup that's what I've ended up doing for now. Therefore I would suggest a workflow that runs only against master. github/workflows, and using the built in GITHUB_TOKEN that is set up automatically for you, this basically happens by default with no effort from the forker to setup (other than cloning after we add this action to upstream, or rebasing to pick it up if cloned before this was added).Īnd it also works for fine non-forked branches as well. Of course this only works once the action is cloned down to the fork, but with actions only requiring a simple file in the. In this case I think the action is initiated by the fork updating it's own repo, not the upstream repo trying to update the forked repo. ![]() The built-in token does not have permission to push to the fork repo where the user's branch is located. However, by only doing this when opening a pull request, the annoyance factor is much less than doing it on every push.Īdditionally, the Calibre solution will not work for forks. I would expect their solution to have the drawback you mentioned: "require the person working on that branch to pull the changes". It looks like Calibre is pushing to the user's branch. ![]() However if that's not possible, or overly complex so something you don't want to add, then I can understand this and feel free to close this issue. But does work very well, so would be really useful to be able to do with this Checkout action. Looking at their source code it appears they use the GitHub API and create a new tree and then replace the PR with that tree, so doesn't look simple. When you open a PR with images, it optimised the images and updates the PR with the optimised images. The Calibre Image optimisation app does this very well. We want to be able to accept typo pull requests from people not familiar with the site build process, and then not have the next person to build the site suddenly see changes they did not do included in their PR. Yeah this is where I really want it to work to be honest. 1) because the ref from the fork repo wont exist and 2) because you would need to push to the fork repo Do we only run this on master so it's only actioned after a pull request has been merged, but then we can't see the impact of the changes when reviewing the pull request?Īny advice appreciated as a bit new to this!Īgain note, this wont work for forks.Do we create a separate branch and create a separate PR for this auto generated stuff so now have two PRs?.Do we create a separate branch and merge it into this one to add the changes to this PR?.If that is the case, then what is the recommended workflow for this as would have thought it was a fairly common request. So is it not possible to add directly to a branch that is part of a pull request and you must create another branch from that instead? But then I ran it this detached head issue, which I'll admit I don't really understand (I'm far from a Git expert!). So I thought to only run this action when upon opening a pull request as by that time any changes should hopefully have settled down a bit. This could get tiresome if pushing a lot of commits periodically. This will then require the person working on that branch to pull the changes made by my GitHub /Action on that branch, before they can push another change. However that means this Action happens each time the code is pushed to GitHub. Now this is very easy to do when completing this action on a push. What I want to do is complete an action on that branch (let's say I've a repo with some markdown I want to auto generate HTML from when any changes are made to the markdown files). ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |