-
Notifications
You must be signed in to change notification settings - Fork 564
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
Add GitHub action to deploy the app to develop.simplenote.com #2002
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM node:10.16.3-jessie | ||
|
||
RUN dpkg --add-architecture i386 | ||
RUN apt update | ||
RUN apt -y install python make libxkbfile-dev libxkbfile-dev:i386 libx11-dev libx11-dev:i386 libxss-dev gcc-multilib g++-multilib rpm | ||
|
||
COPY "entrypoint.sh" "/entrypoint.sh" | ||
ENTRYPOINT ["/entrypoint.sh"] | ||
|
||
CMD [""] |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: 'Deploy Simplenote' | ||
description: 'Builds and deploys Simplenote to VIP Go branches' | ||
branding: | ||
icon: 'truck' | ||
color: 'green' | ||
inputs: | ||
APP_ID: | ||
description: 'Application ID' | ||
required: true | ||
GITHUB_TOKEN: | ||
description: 'GitHub Token' | ||
requried: true | ||
BRANCH: | ||
description: 'Branch' | ||
required: true | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
entrypoint: './.github/actions/deploy/entrypoint.sh' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the docs indicate that this is here to override the it seems like if it works then things could be kept simpler if we directly embedded the call to if it's the case that we need this external script in order to pass the
the docs don't seem incredibly clear to me. it would be worth verifying if we have access to the RUN dpkg…
CMD ["sh", "-c", "npm run deploy $BRANCH"] |
||
env: | ||
APP_ID: ${{ inputs.APP_ID }} | ||
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }} | ||
BRANCH: ${{ inputs.BRANCH }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh -l | ||
|
||
npm run deploy $BRANCH | ||
|
||
exit 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
on: | ||
push: | ||
branches: | ||
- develop | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v1 | ||
- uses: ./.github/actions/deploy | ||
env: | ||
APP_ID: ${{ secrets.APP_ID }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: ${{ github.ref }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fun fact, not the biggest deal here, but each of these lines creates a new "layer" in the Docker image and can carry a reasonable performance hit. since it's an automated build it won't matter too much but it's common to join these into one
RUN
statement. put differently, we've created these on separateRUN
lines for organizational purposes but that creates an unintended side-effect in the Docker image we didn't want.line-continuation marks and indentation are our friends, and now we can alphabetize the dependencies and make future diffs clearer
RUN dpkg --add-architecture i386 \ && apt update \ && apt -y install \ g++-multilib \ gcc-multilib \ libx11-dev libx11-dev:i386 \ libxkbfile-dev libxkbfile-dev:i386 \ libxss-dev \ make \ python \ rpm