Initial commit#1
Conversation
|
@benjambles please take a look at the Javascript code. Let me know if you have any questions. I will raise a new PR against gp-web that will use this action so you can see how it works together. This action will likely be thrown away in future, it's part of a MVP to get a preview system ready for gp-web. The action is in a public repo as this is a requirement of Github actions. |
| end_of_line = lf | ||
|
|
||
| [*.html] | ||
| indent_size = 2 |
There was a problem hiding this comment.
These should probably all still be 4 as that's whats used on Miyagi and GP-Web
|
|
||
| ARG KUBECTL_VERSION="1.17.7" | ||
|
|
||
| RUN apk add py-pip curl wget ca-certificates git bash jq |
|
|
||
| RUN apk add py-pip curl wget ca-certificates git bash jq | ||
| RUN pip install awscli | ||
| RUN curl -L -o /usr/bin/kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.17.7/2020-07-08/bin/linux/amd64/kubectl |
There was a problem hiding this comment.
https://amazon-eks.s3.us-west-2.amazonaws.com/1.17.7/2020-07-08/bin/linux/amd64/kubectl any way to pull that from an env file rather than it being hardcoded, or does it not matter that much?
There was a problem hiding this comment.
I hope to replace this action shortly, using it to test concepts. I will leave fixed for the moment if that o.k.
| const options = {}; | ||
| options.listeners = { | ||
| stdout: (data) => { | ||
| cmdOutput += data.toString(); | ||
| }, | ||
| stderr: (data) => { | ||
| cmdError += data.toString(); | ||
| } | ||
| }; |
There was a problem hiding this comment.
Not massively important (it's not code thats run millions of times) but the following is better for performance:
| const options = {}; | |
| options.listeners = { | |
| stdout: (data) => { | |
| cmdOutput += data.toString(); | |
| }, | |
| stderr: (data) => { | |
| cmdError += data.toString(); | |
| } | |
| }; | |
| const options = { | |
| listeners = { | |
| stdout: (data) => { | |
| cmdOutput += data.toString(); | |
| }, | |
| stderr: (data) => { | |
| cmdError += data.toString(); | |
| } | |
| } | |
| }; |
| "@actions/core": "^1.2.6", | ||
| "@actions/exec": "^1.0.4", | ||
| "@actions/github": "^4.0.0", | ||
| "common-tags": "^1.8.0" |
There was a problem hiding this comment.
Main thing I would say is to add prettier to ensure consistent formatting in regards to spaces and semicolons. But that isn't needed for an MVP.
There was a problem hiding this comment.
I added prettier, any tips for rules?
A new Github action that deploys gp-web to EKS when the trigger phrase
/previewis used in a comment on a PR.
This role will also delete a deployment when a PR is closed.