Comments (18)
Thanks @peter-evans
I hope you don't mind, but I took your python script to call this manually for now.
One small change i made that may be particular to my case: is because I'm building for multiple platforms, I want to raise multiple PRs (or all in one PR) and due to the branch names being based on the hash I get a conflict.
Your check for the branch is in origin already pr_branch_exists
will always return false
because these jobs are run in parallel and without calling git fetch
first the new branch will never be in the remotes.origin.refs
So I changed this to use a timestamp instead ๐คทโโ
You can see my implementation here if it helps:
https://github.com/rogchap/v8go/blob/master/.github/workflows/v8build.yml
PS. thanks for a great Action
from create-pull-request.
Confirmed that, currently, container actions only work on Linux virtual environments. The only way to make Mac OSX and Windows actions right now is a new Javascript actions format that was introduced with Actions v2.
https://help.github.com/en/articles/about-actions#types-of-actions
The options currently are very limited and Actions are still not GA yet, so I imagine that there are more features coming to support other platforms. This action can be made usable very easily if either:
- Container actions are supported on Mac OSX and Windows
- Python is supported as an Actions runner
https://github.com/actions/hello-world-javascript-action/blob/master/action.yml#L11-L13
e.g.runs: using: 'python3' main: 'myscript.py'
I will reach out to GitHub support and try and find out what direction they are likely to take in the near future.
By the way, I should point out that the majority of the actions currently on the Marketplace are container based actions because they were written during the Actions v1 beta when that was the only option. So none of those will work on Mac OSX and Windows either.
Update: I've discovered a way to make this action work on all three platforms without needing to rewrite it completely. Working on a test release.
from create-pull-request.
I've released a beta version of the multi-platform action. Please test it out.
- name: Create Pull Request
uses: peter-evans/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@rogchap I've added an extra parameter BRANCH_SUFFIX
that if set to timestamp
will use timestamps to suffix the branch names instead of the short SHA1 hash. (By the way, during testing I still got an unlucky clash when using timestamps, so I might add a further option to randomise a suffix)
I'm not sure what direction GitHub are going to take in the future to support multi-platform actions. I will probably leave the original action and multi platform action implementations separate until it becomes clear.
from create-pull-request.
So basically to make an ruby-action
I would have to convert the code under https://github.com/actions/setup-ruby for it and tell it to use that instead of python ๐
from create-pull-request.
Seems then the reason why I was getting this error was actually because of swift-package-dependencies-check which I was trying to use together with this one. I assumed this PR action was the reason for the error but when I removed the pull request step I still got the same error. The logs made it unclear which one was causing the problem before that.
Thank you!
from create-pull-request.
Thank you for raising this. I wasn't aware that it doesn't work on Mac OSX and Windows. I will look into this and see if it's feasible to make it multi-platform.
from create-pull-request.
Thanks for jumping on this so fast @peter-evans I will give the update a try and provide feedback. thanks again.
from create-pull-request.
@rogchap I'm going to close this issue for now. If you have any problems with the -multi
versions of this action please create a new issue. Thanks!
from create-pull-request.
No worries @peter-evens; I havenโt had a chance to test yet; but will.
from create-pull-request.
@peter-evans how exactly did you make this work? I made an action myself 2 days ago using an old v1 action as a guide to add more features to it and would like to fix this same issue.
from create-pull-request.
Hi @AraHaan
I made an action myself 2 days ago using an old v1 action as a guide
Is it a container-based action? If so, you still can't use container-based actions cross-platform. They only work on linux VMs. The only solution that I know of is to convert the action to Javascript.
from create-pull-request.
Welp that would be hard as it is in using this code atm https://github.com/Elskom/merge-dependabot/blob/main/entrypoint.sh
I changed a few lines of some other action to basically do what I wanted it to do.
I did try on my project having it use linux however .NET Core does not like building a project that imports the WindowsDesktop SDK on linux. ๐ฏ
from create-pull-request.
If a complete rewrite to Javascript/Typescript is not feasible, the only other suggestion I have is to make a Javascript wrapper action which executes whatever tooling you need to run. For an example of what I mean, see python-action, which is a wrapper around executing Python in a cross-platform way. That's how I originally made this action work cross-platform, but eventually I just rewrote it from scratch.
from create-pull-request.
@peter-evans so what do I do to make the setup-ruby into an single js file?
from create-pull-request.
Multiple versions of Ruby are available in the GitHub Actions tool-cache. So all setup-ruby
does is find the path in the cache to the version of Ruby that the user has requested.
These two lines are finding the version in the cache and building the correct path to the binary. If you run these when your action starts you should have a path to the Ruby binary that you can call to execute your script.
https://github.com/actions/setup-ruby/blob/main/src/cache.ts#L6-L8
from create-pull-request.
It the version identifier still 1.3.1-multi?
Still get the error about Linux after switching.
Download action repository 'peter-evans/[email protected]' (SHA:0fe13446aa550b789d50dc39ea9e8e7067e1ed67)
Container action is only supported on Linux, skip pull and build docker images.
from create-pull-request.
@peter-evans it is possible to have javascript bootstrap the python code to the action itself and act as an proxy (I would totally do that if I plan to eventually write my github action in .NET).
from create-pull-request.
@simondelphia This is an old issue and 1.3.1-multi
is a very old version of the action! I rewrote the action in Typescript and now all versions >2 are multi platform. Please use the latest version of this action.
from create-pull-request.
Related Issues (20)
- Error: Input 'token' not supplied. Unable to continue. HOT 1
- Changes from test folder doesn't added to the PR HOT 10
- Node version - Warning HOT 1
- Permission denied (publickey) HOT 1
- Merge conflict error for different files with different names
- Add branch-label as an output so it can be passed to other actions and easily commited to HOT 2
- PR still created with 0 files (no diffs) HOT 4
- [FEATURE] Add ability to enable auto-merge HOT 1
- Can't figure out how to include commits made during workflow HOT 2
- Action failing to update existing PRs on differently named fork HOT 3
- pr not generated HOT 1
- this works great!
- This works great
- This works great
- When the workflow is triggered with `base` and `branch`, the PR is not created HOT 1
- Syntax error line 17 HOT 2
- remote missing HOT 2
- How to always have open PR from dev to prod HOT 1
- Autosync PR out of date HOT 2
- Automatically delete body-path HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from create-pull-request.