80 lines
3.0 KiB
YAML
80 lines
3.0 KiB
YAML
name: Publish ApplicationRecord to Registry
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
env:
|
|
DOCKER_HOST: unix:///var/run/dind.sock
|
|
|
|
jobs:
|
|
setup_deps:
|
|
name: "Install project and dependencies"
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: "Clone project repository"
|
|
uses: actions/checkout@v3
|
|
|
|
# At present the stock setup-python action fails on Linux/aarch64
|
|
# Conditional steps below workaroud this by using deadsnakes for that case only
|
|
- name: "Install Python for ARM on Linux"
|
|
if: ${{ runner.arch == 'arm64' && runner.os == 'Linux' }}
|
|
uses: deadsnakes/action@v3.0.1
|
|
with:
|
|
python-version: '3.8'
|
|
|
|
- name: "Install Python cases other than ARM on Linux"
|
|
if: ${{ ! (runner.arch == 'arm64' && runner.os == 'Linux') }}
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.8'
|
|
|
|
- name: "Print Python version"
|
|
run: python3 --version
|
|
|
|
- name: "Install Stack Orchestrator"
|
|
run: |
|
|
mkdir -p /opt/laconic
|
|
curl -o /opt/laconic/quick-install-linux.sh https://raw.githubusercontent.com/cerc-io/stack-orchestrator/main/scripts/quick-install-linux.sh
|
|
chmod +x /opt/laconic/quick-install-linux.sh
|
|
CERC_SO_INSTALL_SKIP_PACKAGES=true /opt/laconic/quick-install-linux.sh -y
|
|
source ~/.profile
|
|
laconic-so version
|
|
|
|
- name: "Start dockerd" # Also needed until we can incorporate into the executor
|
|
run: |
|
|
dockerd -H $DOCKER_HOST --userland-proxy=false &
|
|
sleep 5
|
|
|
|
- name: "Use laconic-so"
|
|
run: |
|
|
source ~/.profile
|
|
laconic-so --stack uniswap-urbit-app setup-repositories --pull
|
|
laconic-so --stack uniswap-urbit-app build-containers
|
|
# laconic-so --stack uniswap-urbit-app deploy init --output uniswap-urbit-app-spec.yml
|
|
# edit the above .yml file
|
|
# laconic-so --stack uniswap-urbit-app deploy create --spec-file uniswap-urbit-app-spec.yml --deployment-dir uniswap-urbit-app-deployment
|
|
# edit the config file
|
|
# laconic-so deployment --dir uniswap-urbit-app-deployment start
|
|
|
|
cns_publish:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
- name: "Install Yarn"
|
|
run: npm install -g yarn
|
|
- name: "Install registry CLI"
|
|
run: |
|
|
npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/
|
|
yarn global add @cerc-io/laconic-registry-cli
|
|
- name: "Install jq"
|
|
run: apt -y update && apt -y install jq
|
|
- name: "Publish Record"
|
|
env:
|
|
CERC_REGISTRY_USER_KEY: ${{ secrets.CICD_LACONIC_USER_KEY }}
|
|
CERC_REGISTRY_BOND_ID: ${{ secrets.CICD_LACONIC_BOND_ID }}
|
|
CERC_REGISTRY_APP_CRN: "crn://urbit/applications/uniswap"
|
|
run: scripts/publish-app-record.sh
|