-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #33 from urbit/hm/add-github-actions
ops: adding github flows
- Loading branch information
Showing
13 changed files
with
274 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
name: Bug report | ||
about: Is something broken? | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Describe the bug, optionally with screenshots** | ||
A clear and concise description of what the bug is. If applicable, add screenshots to help explain your problem. | ||
|
||
**To Reproduce** | ||
Steps to reproduce the behavior: | ||
1. Go to '...' | ||
2. Click on '....' | ||
3. Scroll down to '....' | ||
4. See error | ||
|
||
**Expected behavior** | ||
A clear and concise description of what you expected to happen. | ||
|
||
**Additional context:** | ||
- Ship type (comet/moon/planet/star/galaxy) | ||
- Instance type (Tlon-hosted/self-hosted with Port/CLI) | ||
- OS/browser (Safari on MacOS, Chrome on Windows, Firefox on Linux, etc.) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM tloncorp/janeway:v0.16.8-dev | ||
COPY entrypoint.sh /entrypoint.sh | ||
EXPOSE 22/tcp | ||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: 'deploy' | ||
description: 'Create a glob and deploy it to a moon' | ||
inputs: | ||
app: | ||
description: "App to deploy" | ||
required: true | ||
ship: | ||
description: "Ship to deploy to" | ||
required: true | ||
credentials: | ||
description: "base64-encoded GCP Service Account credentials" | ||
required: true | ||
ssh-sec-key: | ||
description: "A base64-encoded SSH secret key for the container to use" | ||
required: true | ||
ssh-pub-key: | ||
description: "The corresponding base64-encoded SSH public key" | ||
required: true | ||
ref: | ||
description: "The github reference to checkout when deploying" | ||
required: false | ||
|
||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- ${{ inputs.app }} | ||
- ${{ inputs.ship }} | ||
- ${{ inputs.credentials }} | ||
- ${{ inputs.ssh-sec-key }} | ||
- ${{ inputs.ssh-pub-key }} | ||
- ${{ inputs.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "$3" | base64 -d > /service-account | ||
echo "$4" | base64 -d > /id_ssh | ||
echo "$5" | base64 -d > /id_ssh.pub | ||
|
||
chmod 600 /service-account | ||
chmod 600 /id_ssh | ||
chmod 600 /id_ssh.pub | ||
|
||
janeway \ | ||
--ci \ | ||
--credentials /service-account \ | ||
--ssh-key /id_ssh \ | ||
release glob \ | ||
"$1" \ | ||
| bash | ||
|
||
janeway \ | ||
--ci \ | ||
--verbose \ | ||
--credentials /service-account \ | ||
--ssh-key /id_ssh \ | ||
release ota \ | ||
"$1" "$2" \ | ||
${6:+"--ref"} ${6:+"$6"} \ | ||
| bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM tloncorp/janeway:v0.16.8-dev | ||
COPY entrypoint.sh /entrypoint.sh | ||
EXPOSE 22/tcp | ||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: 'release' | ||
description: 'Release to a moon' | ||
inputs: | ||
app: | ||
description: "App to deploy" | ||
required: true | ||
ship: | ||
description: "Ship to deploy to" | ||
required: true | ||
credentials: | ||
description: "base64-encoded GCP Service Account credentials" | ||
required: true | ||
ssh-sec-key: | ||
description: "A base64-encoded SSH secret key for the container to use" | ||
required: true | ||
ssh-pub-key: | ||
description: "The corresponding base64-encoded SSH public key" | ||
required: true | ||
ref: | ||
description: "The github reference to checkout when deploying" | ||
required: false | ||
|
||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- ${{ inputs.app }} | ||
- ${{ inputs.ship }} | ||
- ${{ inputs.credentials }} | ||
- ${{ inputs.ssh-sec-key }} | ||
- ${{ inputs.ssh-pub-key }} | ||
- ${{ inputs.ref }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "$3" | base64 -d > /service-account | ||
echo "$4" | base64 -d > /id_ssh | ||
echo "$5" | base64 -d > /id_ssh.pub | ||
|
||
chmod 600 /service-account | ||
chmod 600 /id_ssh | ||
chmod 600 /id_ssh.pub | ||
|
||
janeway \ | ||
--ci \ | ||
--verbose \ | ||
--credentials /service-account \ | ||
--ssh-key /id_ssh \ | ||
release ota \ | ||
"$1" "$2" \ | ||
${6:+"--ref"} ${6:+"$6"} \ | ||
| bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: Version Bump | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
type: string | ||
required: true | ||
description: Enter the version | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
name: "Bumps versions and pushes to master" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
token: ${{ secrets.REPO_TOKEN }} | ||
- name: Bump | ||
run: | | ||
sed -i "s/version\+\[.*]/version+[${{ github.event.inputs.tag }}]/" desk/desk.docket-0 | ||
- name: Commit | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
add: '-A' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Deploy Landscape (canary) | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
type: string | ||
required: false | ||
description: Enter the tag to deploy | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
name: "Release to ~binnec-dozzod-marzod (canary)" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/release | ||
with: | ||
app: 'landscape' | ||
ship: 'canary' | ||
credentials: ${{ secrets.JANEWAY_SERVICE_KEY }} | ||
ssh-sec-key: ${{ secrets.JANEWAY_SSH_SEC_KEY }} | ||
ssh-pub-key: ${{ secrets.JANEWAY_SSH_PUB_KEY }} | ||
ref: ${{ github.event.inputs.tag }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Deploy Landscape (external) | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
type: string | ||
required: true | ||
description: Enter the tag to deploy | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
name: "Release to ~doznec-dozzod-marzod (external)" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/release | ||
with: | ||
app: 'landscape' | ||
ship: 'external' | ||
credentials: ${{ secrets.JANEWAY_SERVICE_KEY }} | ||
ssh-sec-key: ${{ secrets.JANEWAY_SSH_SEC_KEY }} | ||
ssh-pub-key: ${{ secrets.JANEWAY_SSH_PUB_KEY }} | ||
ref: ${{ github.event.inputs.tag }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Deploy Landscape (internal) | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
type: string | ||
required: true | ||
description: Enter the tag to deploy | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
name: "Release to ~marnec-dozzod-marzod (internal)" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/release | ||
with: | ||
app: 'landscape' | ||
ship: 'internal' | ||
credentials: ${{ secrets.JANEWAY_SERVICE_KEY }} | ||
ssh-sec-key: ${{ secrets.JANEWAY_SSH_SEC_KEY }} | ||
ssh-pub-key: ${{ secrets.JANEWAY_SSH_PUB_KEY }} | ||
ref: ${{ github.event.inputs.tag }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Deploy Landscape (livenet) | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
type: string | ||
required: true | ||
description: Enter the tag to deploy | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
name: "Release to ~mister-dister-dozzod-dozzod (livenet)" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/release | ||
with: | ||
app: 'landscape' | ||
ship: 'mister' | ||
credentials: ${{ secrets.JANEWAY_SERVICE_KEY }} | ||
ssh-sec-key: ${{ secrets.JANEWAY_SSH_SEC_KEY }} | ||
ssh-pub-key: ${{ secrets.JANEWAY_SSH_PUB_KEY }} | ||
ref: ${{ github.event.inputs.tag }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: Deploy Landscape | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- 'master' | ||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
name: "Create and deploy a glob to ~wannec-dozzod-marzod (devstream)" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ./.github/actions/deploy | ||
with: | ||
app: 'landscape' | ||
ship: 'devstream' | ||
credentials: ${{ secrets.JANEWAY_SERVICE_KEY }} | ||
ssh-sec-key: ${{ secrets.JANEWAY_SSH_SEC_KEY }} | ||
ssh-pub-key: ${{ secrets.JANEWAY_SSH_PUB_KEY }} |
e4a7573
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.
Successfully deployed to the following URLs:
garden – ./
garden-git-master-urbit.vercel.app
garden-beige.vercel.app
garden-urbit.vercel.app