53 lines
1.7 KiB
YAML
53 lines
1.7 KiB
YAML
name: Check Latest Release
|
|
|
|
on:
|
|
push:
|
|
branches: '*'
|
|
schedule:
|
|
- cron: '0 0 * * 0' # Weekly: Every Sunday at midnight UTC
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
TARGET_REPO: namada-net/namada-interface
|
|
CERC_REGISTRY_USER_KEY: ${{ secrets.CICD_LACONIC_USER_KEY }}
|
|
CERC_REGISTRY_BOND_ID: ${{ secrets.CICD_LACONIC_BOND_ID }}
|
|
CERC_REGISTRY_RPC_ENDPOINT: "https://laconicd-mainnet-1.laconic.com"
|
|
CERC_REGISTRY_GQL_ENDPOINT: "https://laconicd-mainnet-1.laconic.com/api"
|
|
CERC_REGISTRY_CHAIN_ID: "laconic-mainnet"
|
|
CERC_REGISTRY_DEPLOYMENT_HOSTNAME: namadillo
|
|
APP_NAME: "namada-interface"
|
|
DEPLOYER_LRN: "lrn://vaasl-provider/deployers/webapp-deployer-api.apps.vaasl.io"
|
|
AUTHORITY: "vaasl"
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: "Clone project repository"
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
|
|
- name: Get latest release and deploy
|
|
run: |
|
|
# Get release info
|
|
latest=$(curl -s https://api.github.com/repos/${{ env.TARGET_REPO }}/releases/latest)
|
|
latest_tag=$(echo $latest | jq -r .tag_name)
|
|
published_at=$(echo $latest | jq -r .published_at)
|
|
|
|
echo "Latest tag: $latest_tag"
|
|
echo "Published at: $published_at"
|
|
|
|
echo "Proceeding with deployment"
|
|
|
|
# Setup dependencies
|
|
sudo apt -y update && sudo apt -y install jq
|
|
corepack enable
|
|
npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/
|
|
npm install -g @cerc-io/laconic-registry-cli
|
|
|
|
# Run deployment
|
|
./deploy.sh ${{ env.TARGET_REPO }} $latest_tag |