diff --git a/.gitea/workflows/deploy-skip-atom.yml b/.gitea/workflows/deploy-skip-atom.yml new file mode 100644 index 0000000..f8c0493 --- /dev/null +++ b/.gitea/workflows/deploy-skip-atom.yml @@ -0,0 +1,46 @@ +name: Check Latest Release + +on: + push: + branches: '*' + workflow_dispatch: + +env: + TARGET_REPO: LaconicNetwork/skip-go-app + CERC_REGISTRY_USER_KEY: ${{ secrets.CICD_LACONIC_USER_KEY }} + CERC_REGISTRY_BOND_ID: e2271e59c85b500f97d7efcef320e7ebf5c470f1580d4479302ba20b32624adc + CERC_REGISTRY_RPC_ENDPOINT: "https://laconicd-sapo.laconic.com" + CERC_REGISTRY_GQL_ENDPOINT: "https://laconicd-sapo.laconic.com/api" + CERC_REGISTRY_CHAIN_ID: "laconic-testnet-2" + CERC_REGISTRY_DEPLOYMENT_HOSTNAME: skip-go-build + APP_NAME: "skip-go-build" + DEPLOYER_LRN: "lrn://atom/deployers/webapp-deployer-api.pwa.atom.audubon.app" + AUTHORITY: "atom" + +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) + + + # 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-atom.sh ${{ env.TARGET_REPO }} $latest_tag