|
| 1 | +name: Canary Run Equibind Tool |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + schedule: |
| 6 | + - cron: '*/10 * * * *' |
| 7 | + |
| 8 | +jobs: |
| 9 | + canary: |
| 10 | + runs-on: ubuntu-20.04 |
| 11 | + environment: ci |
| 12 | + env: |
| 13 | + GH_TOKEN: ${{ github.token }} |
| 14 | + steps: |
| 15 | + # Checkout the repository. Note we do not use anything other than the test data and tools directory |
| 16 | + - name: Checkout |
| 17 | + uses: actions/checkout@v3 |
| 18 | + |
| 19 | + - name: Download the latest release |
| 20 | + run: | |
| 21 | + # use the GitHub CLI to download the latest release |
| 22 | + gh release download --repo labdao/plex --pattern "*linux_amd64.tar.gz" |
| 23 | + # extract the package |
| 24 | + tar -xf *.tar.gz |
| 25 | +
|
| 26 | + - name: Run Equibind |
| 27 | + run: | |
| 28 | + # use tee so we can see stdout in github, and parse it later |
| 29 | + ./plex -tool equibind -input-dir testdata/binding/abl 2>&1 | tee plex_out.log |
| 30 | + # capture the exit status of the plex call |
| 31 | + plex_result_code=${PIPESTATUS[0]} |
| 32 | + # exit immediately if plex exited with an error |
| 33 | + if [ $plex_result_code -gt 0 ]; then |
| 34 | + exit $plex_result_code |
| 35 | + fi |
| 36 | + # parse the output directory from the plex stdout |
| 37 | + result_dir=$(cat plex_out.log | grep 'Finished processing, results written to' | sed -n 's/^.*Finished processing, results written to //p' | sed 's/\/io.json//') |
| 38 | + # exit if no docked files are found |
| 39 | + cd "$result_dir/entry-0/outputs" |
| 40 | + if [ "$(find . -name '*docked.sdf' | grep 'docked.sdf')" == "" ]; then |
| 41 | + echo "No docked files found" |
| 42 | + exit 1 |
| 43 | + else |
| 44 | + echo "Docked files found" |
| 45 | + fi |
| 46 | + env: |
| 47 | + PLEX_ACCESS_TOKEN: ${{ secrets.PLEX_ACCESS_TOKEN }} |
| 48 | + |
| 49 | + - name: Check in with Heii On-Call |
| 50 | + run: | |
| 51 | + curl -X POST -H 'Authorization: Bearer ${{ secrets.HEII_ON_CALL_API_KEY }}' https://api.heiioncall.com./triggers/${HEII_ON_CALL_INBOUND_TRIGGER_ID}/checkin |
| 52 | + env: |
| 53 | + HEII_ON_CALL_INBOUND_TRIGGER_ID: e720588c-35cd-4392-9d02-bec350aa34e9 |
0 commit comments