Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update create_blast_db.yml #36

Merged
merged 1 commit into from
Jan 19, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 14 additions & 4 deletions .github/workflows/create_blast_db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@ on:
pull_request:
types: [closed]
branches: [main]
workflow_dispatch:
inputs:
json_file:
description: 'Full path to JSON file (e.g., conf/WB/databases.WB.WS296.json)'
required: true
type: string

jobs:
create-blast-db:
if: github.event.pull_request.merged == true
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
runs-on: blast

steps:
Expand All @@ -16,11 +22,15 @@ jobs:
path: config
ref: ${{ github.event.pull_request.head.sha }}

- name: Get changed files
- name: Get file to process
id: changed
run: |
CHANGED_FILE=$(git -C config diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep -E '\.json$' || true)
echo "file=$CHANGED_FILE" >> $GITHUB_OUTPUT
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "file=${{ github.event.inputs.json_file }}" >> $GITHUB_OUTPUT
else
CHANGED_FILE=$(git -C config diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep -E '\.json$' || true)
echo "file=$CHANGED_FILE" >> $GITHUB_OUTPUT
fi

- name: Run BLAST DB creation
run: |
Expand Down
Loading