├── README.md └── .github ├── workflows ├── approve-trigger.yml ├── approve-dispatch.yml └── branch-deploy.yml └── ISSUE_TEMPLATE └── model_request.yml /README.md: -------------------------------------------------------------------------------- 1 | # actions-sandbox 2 | 3 | A sandbox repo for testing GitHub Actions 4 | -------------------------------------------------------------------------------- /.github/workflows/approve-trigger.yml: -------------------------------------------------------------------------------- 1 | name: Approve Command Trigger 2 | on: 3 | issue_comment: 4 | types: [ created ] 5 | jobs: 6 | approve-command-trigger: 7 | runs-on: ubuntu-latest 8 | steps: 9 | - name: Approve Command Trigger 10 | uses: peter-evans/slash-command-dispatch@2afb49dbaafaba8005860648bf7fc178637aca0d # pin@v3 11 | with: 12 | token: ${{ secrets.PAT }} 13 | issue-type: issue 14 | permission: write 15 | reactions: false 16 | commands: | 17 | approve 18 | -------------------------------------------------------------------------------- /.github/workflows/approve-dispatch.yml: -------------------------------------------------------------------------------- 1 | name: Approve Command Dispatch 2 | 3 | on: 4 | push: 5 | 6 | jobs: 7 | approve-command-dispatch: 8 | runs-on: ubuntu-latest 9 | steps: 10 | - name: Checkout 11 | uses: actions/checkout@7884fcad6b5d53d10323aee724dc68d8b9096a2e # pin@v2.4.2 12 | 13 | - name: Get Issue Body 14 | id: get-issue-body 15 | env: 16 | PAYLOAD_CONTEXT: ${{ toJson(github.event.client_payload) }} 17 | run: | 18 | BODY="### Model Name\r\n\r\nmy cool molecule\r\n\r\n### Model Description\r\n\r\nThis is a prediction for a super cool molecule\r\n\r\n### Ersilia ID\r\n\r\neos11aa\r\n\r\n### Publication\r\n\r\nThe following link is just an example:\r\n\r\nwww.example.com\r\n\r\n### Code\r\n\r\n_No response_\r\n\r\n### License\r\n\r\n_No response_" 19 | echo "::set-output name=body::$BODY" 20 | 21 | - run: echo ${{ steps.get-issue-body.outputs.body }} 22 | 23 | - name: Issue Template Parser 24 | id: issue-parser 25 | uses: stefanbuck/github-issue-parser@v3.0.1 26 | with: 27 | issue-body: "${{ steps.get-issue-body.outputs.body }}" 28 | template-path: .github/ISSUE_TEMPLATE/model_request.yml 29 | 30 | - run: echo "$ISSUE_CONTEXT" 31 | env: 32 | ISSUE_CONTEXT: ${{ steps.issue-parser.outputs.jsonString }} 33 | -------------------------------------------------------------------------------- /.github/workflows/branch-deploy.yml: -------------------------------------------------------------------------------- 1 | name: branch-deploy 2 | 3 | on: 4 | issue_comment: 5 | types: [created] 6 | 7 | permissions: 8 | pull-requests: write 9 | deployments: write 10 | contents: write 11 | 12 | jobs: 13 | branch-deploy: 14 | if: ${{ github.event.issue.pull_request }} # only run on pull request comments 15 | environment: secrets 16 | runs-on: ubuntu-latest 17 | steps: 18 | # Start the branch deployment 19 | - uses: github/branch-deploy@main 20 | id: branch-deploy 21 | with: 22 | admins: grantbirki 23 | 24 | # Check out the ref from the output of the IssueOps command 25 | - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3.0.2 26 | if: ${{ steps.branch-deploy.outputs.continue == 'true' }} 27 | with: 28 | ref: ${{ steps.branch-deploy.outputs.ref }} 29 | 30 | # Do some fake "noop" deployment logic here 31 | - name: fake noop deploy 32 | if: ${{ steps.branch-deploy.outputs.continue == 'true' && steps.branch-deploy.outputs.noop == 'true' }} 33 | run: echo "I am doing a fake noop deploy" 34 | 35 | # Do some fake "regular" deployment logic here 36 | - name: fake regular deploy 37 | if: ${{ steps.branch-deploy.outputs.continue == 'true' && steps.branch-deploy.outputs.noop != 'true' }} 38 | run: echo "I am doing a fake regular deploy" 39 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/model_request.yml: -------------------------------------------------------------------------------- 1 | name: 🦠 Model Request 2 | description: Request a model to be included in the hub 3 | title: "🦠 Model Request: " 4 | labels: [model-request] 5 | 6 | body: 7 | - type: markdown 8 | attributes: 9 | value: "Thank you for taking the time to open a Model Request!" 10 | 11 | - type: input 12 | id: model-name 13 | attributes: 14 | label: Model Name 15 | description: "Suggest a name for your model" 16 | placeholder: "Antimicrobial activity prediction" 17 | validations: 18 | required: true 19 | 20 | - type: input 21 | id: model-description 22 | attributes: 23 | label: Model Description 24 | description: "Please provide a short description of your model" 25 | placeholder: "Prediction of the E.coli in vitro growth inhibition potential of small molecules" 26 | validations: 27 | required: true 28 | 29 | - type: input 30 | id: model-id 31 | attributes: 32 | label: Ersilia ID 33 | description: "Please provide (or suggest) an Ersilia ID for your model. This will be used to identify your model in the hub and be the repository name for your model. Format: eos - Where is four characters long and consists of lowercase letters and numbers - Ex: eos7jlv" 34 | placeholder: "eos12ab" 35 | validations: 36 | required: true 37 | 38 | - type: textarea 39 | id: model-publication 40 | attributes: 41 | label: Publication 42 | description: "Is there a link to a publication? (DOI, PMID, URL...)?" 43 | 44 | - type: textarea 45 | id: model-code 46 | attributes: 47 | label: Code 48 | description: "Is code available? If so, please provide link to repository (GitHub, GitLab, BitBucket...)?" 49 | 50 | - type: textarea 51 | id: model-license 52 | attributes: 53 | label: License 54 | description: "If there is a license, please provide the name of the license (or a link to the license)" 55 | placeholder: "MIT" 56 | --------------------------------------------------------------------------------