Skip to content

Update mo-assert.yaml #39

Update mo-assert.yaml

Update mo-assert.yaml #39

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- uses: actions-rs/[email protected]
with:
toolchain: stable
# Runs a set of commands using the runners shell
- name: Build and run Capibara Processor
env:
CAPIBARA_PROCESSOR_SSH_KEY: ${{ secrets.CAPIBARA_PROCESSOR_SSH_DEPLOY_KEY }}
run: |
cd ..
mkdir keys
echo "$CAPIBARA_PROCESSOR_SSH_KEY" > keys/capibara_processor_ssh_key
chmod 600 keys/capibara_processor_ssh_key
ssh-agent bash -c 'ssh-add keys/capibara_processor_ssh_key; git clone [email protected]:Capibara-Tools/capibara-processor.git'
cd capibara-processor
cargo run --release -- "../capi" "https://capibara.tools"
- name: Display Output
run: |
cd ../capibara-processor
cat capibara.json
#- if: ${{ github.event_name == 'push' }}
- name: Publish to capibara.tools
env:
CAPIBARA_WEBSITE_SSH_KEY: ${{ secrets.CAPIBARA_TOOLS_USER_SSH_KEY }}
CAPIBARA_DOCUMENT_REFRESH_TOKEN: ${{ secrets.CAPIBARA_DOCUMENT_REFRESH_TOKEN }}
run: |
cd ../keys
echo "$CAPIBARA_WEBSITE_SSH_KEY" > capibara_website_ssh_key
chmod 600 capibara_website_ssh_key
cd ../capibara-processor
mkdir ~/.ssh
ssh-keyscan -t rsa capibara.tools >> ~/.ssh/known_hosts
scp -i ../keys/capibara_website_ssh_key capibara.json [email protected]:capibara.json
curl https://capibara.tools/api/v1/refresh-definitions?token=$CAPIBARA_DOCUMENT_REFRESH_TOKEN
echo " All Done"