mirror of
https://github.com/tloncorp/landscape.git
synced 2024-12-01 10:55:45 +03:00
commit
c6c97deafc
5
.github/helpers/deploy.sh
vendored
5
.github/helpers/deploy.sh
vendored
@ -7,7 +7,7 @@ repo=$1
|
||||
desk=$2
|
||||
ship=$3
|
||||
zone=$4
|
||||
ref=${5:-.}
|
||||
ref=${5:-master}
|
||||
folder=$ship/$desk
|
||||
|
||||
set -e
|
||||
@ -16,11 +16,10 @@ cmdfile=$(mktemp "${TMPDIR:-/tmp/}janeway.XXXXXXXXX")
|
||||
# mktemp only used for generating a random folder name below
|
||||
cmds='
|
||||
source_repo=$(mktemp --dry-run /tmp/repo.janeway.XXXXXXXXX)
|
||||
git clone --depth 1 git@github.com:'$repo'.git $source_repo
|
||||
git clone --depth 1 --branch '$ref' git@github.com:'$repo'.git $source_repo
|
||||
urbit_repo=$(mktemp --dry-run /tmp/repo.urbit.XXXXXXXXX)
|
||||
git clone --depth 1 git@github.com:urbit/urbit.git $urbit_repo -b '$URBIT_REPO_TAG' --single-branch
|
||||
cd $source_repo
|
||||
git checkout '$ref'
|
||||
cd /home/urb || return
|
||||
curl -s --data '\''{"source":{"dojo":"+hood/mount %'$desk'"},"sink":{"app":"hood"}}'\'' http://localhost:12321
|
||||
rsync -avL --delete $urbit_repo/pkg/base-dev/ '$folder'
|
||||
|
2
.github/helpers/glob.sh
vendored
2
.github/helpers/glob.sh
vendored
@ -8,7 +8,7 @@
|
||||
# $2: the location of the docket file
|
||||
|
||||
# globber is a prebooted and docked fakezod
|
||||
curl https://bootstrap.urbit.org/globberv2.tgz | tar xzk
|
||||
curl https://bootstrap.urbit.org/globberv3.tgz | tar xzk
|
||||
./zod/.run -d
|
||||
|
||||
dojo () {
|
||||
|
77
.github/workflows/deploy.yml
vendored
77
.github/workflows/deploy.yml
vendored
@ -1,46 +1,83 @@
|
||||
name: Deploy Landscape
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
type: string
|
||||
required: false
|
||||
default: master
|
||||
description: Enter the tag to deploy
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
jobs:
|
||||
deploy:
|
||||
build-frontend:
|
||||
runs-on: ubuntu-latest
|
||||
name: "Create a glob and deploy latest to ~wannec-dozzod-marzod (devstream)"
|
||||
name: 'Build Frontend'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.REPO_TOKEN }}
|
||||
ref: ${{ github.event.inputs.tag }}
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
node-version-file: ./ui/.nvmrc
|
||||
- working-directory: ./ui
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: 'ui-dist'
|
||||
path: ui/dist
|
||||
glob:
|
||||
runs-on: ubuntu-latest
|
||||
name: 'Make a glob'
|
||||
needs: build-frontend
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.REPO_TOKEN }}
|
||||
ref: ${{ github.event.inputs.tag }}
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: 'ui-dist'
|
||||
path: ui/dist
|
||||
- name: 'glob'
|
||||
uses: ./.github/actions/glob
|
||||
with:
|
||||
folder: 'ui/dist/*'
|
||||
docket: 'desk/desk.docket-0'
|
||||
- name: Commit and Push Glob
|
||||
run: |
|
||||
git config --global user.name github-actions
|
||||
git config --global user.email github-actions@github.com
|
||||
git add desk/desk.docket-0
|
||||
git commit -n -m "update glob: ${{ steps.glob.outputs.hash }} [skip actions]" || echo "No changes to commit"
|
||||
INPUT=${{ github.event.inputs.tag }}
|
||||
BRANCH=${INPUT:-"develop"}
|
||||
git pull origin $BRANCH --rebase --autostash
|
||||
git push
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
needs: glob
|
||||
name: "Deploy a glob to ~wannec-dozzod-marzod (devstream)"
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
token: ${{ secrets.REPO_TOKEN }}
|
||||
ref: ${{ github.event.inputs.tag }}
|
||||
- id: 'auth'
|
||||
uses: 'google-github-actions/auth@v1'
|
||||
with:
|
||||
credentials_json: '${{ secrets.JANEWAY_SERVICE_KEY }}'
|
||||
- name: 'Set up Cloud SDK'
|
||||
uses: 'google-github-actions/setup-gcloud@v1'
|
||||
- name: Build Frontend
|
||||
working-directory: ./ui
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
- id: glob
|
||||
uses: ./.github/actions/glob
|
||||
with:
|
||||
folder: 'ui/dist/*'
|
||||
docket: 'desk/desk.docket-0'
|
||||
- name: Commit Glob
|
||||
uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
add: '-A'
|
||||
message: 'update glob: ${{ steps.glob.outputs.hash }} [skip actions]'
|
||||
- id: deploy
|
||||
name: Deploy
|
||||
run:
|
||||
./.github/helpers/deploy.sh tloncorp/landscape garden wannec-dozzod-marzod us-west1-b
|
||||
./.github/helpers/deploy.sh tloncorp/landscape garden wannec-dozzod-marzod us-west1-b ${{ github.event.inputs.tag }}
|
||||
env:
|
||||
SSH_SEC_KEY: ${{ secrets.JANEWAY_SSH_SEC_KEY }}
|
||||
SSH_PUB_KEY: ${{ secrets.JANEWAY_SSH_PUB_KEY }}
|
||||
URBIT_REPO_TAG: ${{ vars.URBIT_REPO_TAG }}
|
||||
URBIT_REPO_TAG: ${{ vars.URBIT_REPO_TAG }}
|
||||
|
@ -4,5 +4,5 @@
|
||||
|= [our=ship =desk now=@da]
|
||||
^- (list [=dude live=?])
|
||||
%~ tap in
|
||||
.^((set [=dude live=?]) ge+/(scot %p our)/[desk]/(scot %da now))
|
||||
.^((set [=dude live=?]) ge+/(scot %p our)/[desk]/(scot %da now)/$)
|
||||
--
|
@ -27,6 +27,7 @@
|
||||
%da s+(scot %da p.c)
|
||||
%tas s+(scot %tas p.c)
|
||||
%ud (numb p.c)
|
||||
%uv s+(scot %uv p.c)
|
||||
==
|
||||
::
|
||||
++ foreign-desk
|
||||
|
@ -1,4 +1 @@
|
||||
[%zuse 417]
|
||||
[%zuse 416]
|
||||
[%zuse 415]
|
||||
[%zuse 414]
|
||||
[%zuse 413]
|
||||
|
Loading…
Reference in New Issue
Block a user